Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

adxl-simple.c File Reference

Bridge code, read DI-194(RS) and send data to NEESgrid driver. More...

#include <sys/types.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <time.h>
#include <getopt.h>
#include <sys/termios.h>
#include <fcntl.h>
#include <stdbool.h>
#include "flog.h"
#include "nsds_util.h"
#include "adxl_util.h"

Go to the source code of this file.

Functions

void adxl_do_work (const char *port)
 Main worker function, called from main. Run until break.

int main (int argc, char *argv[])
 Init the network, talk to all.


Detailed Description

Bridge code, read DI-194(RS) and send data to NEESgrid driver.

Note:
Requires the flog messaging library, nsds_util lib as well
Based on fake_daq.c

Date:
5/2/03
Author:
Paul Hubbard

Definition in file adxl-simple.c.


Function Documentation

void adxl_do_work const char *  port  ) 
 

Main worker function, called from main. Run until break.

Open connection to ADXL, stream data to screen until error or break.

Definition at line 45 of file adxl-simple.c.

References adxl_close(), adxl_open(), adxl_read(), control_break, adxl_reading_t::G, and NUM_ADXL_CHANNELS.

Referenced by main().

int main int  argc,
char *  argv[]
 

Init the network, talk to all.

Sets up messaging, installs signal handler, calls worker routine.

Note:
Driver port passed on command line

Ditto w/sample rate

Parameters:
argc Argc as passed by shell
argv Argv as passed by shell
Returns:
0 All is good

Non-zero All is not good

Definition at line 127 of file adxl-simple.c.

References adxl_do_work(), adxl_sighandler(), control_break, and NUM_ADXL_CHANNELS.


Generated on Fri May 2 15:13:15 2003 for ADXL202-NEESgrid driver by doxygen1.3