#ifndef _RT_INFO_H #define _RT_INFO_H // this .h file depends on "comedilib.h" #ifndef _COMEDILIB_H #define _COMEDILIB_H #include "comedilib.h" #endif #define MAXFILENAMELEN 255 // max. length for filename // global properties const int VERBOSE=0; // board and conversion properties const int PRECISION=16; // bits precision of the a/d and d/a const int RANGE_HIGH=10; // high range of the acquisition and output const int RANGE_LOW=-10; // low range of the acquisition and output const int BIPOLAR=1; // bipolar =0,1 const int AI_SUBDEV=0; // device number for analog input for the ni-6052e const int AO_SUBDEV=1; // device number for analog output for the ni-6052e // primary params const int STACKSIZE=10000; // size of the kernel module stack const int PRIORITY=1; // priority at which the kernel module runs at // fifos for interprocess comunication const int FIFO=0; const int FIFOSIZE=120000; const int FIFO1=1; const int FIFO2=2; const int FIFO3=3; #define RT_PERIOD 100000 // 1e5 corresponds to 100 microseconds period, 10KHz rate #define CYCLES_per_ms (1000000/RT_PERIOD) #define TIME_UNIT_ns 10000 // 10 microseconds const int TIME_UNITS_per_ms = (int)(1e6/TIME_UNIT_ns) ; const int TIME_UNITS_per_sec = (int)(1e9/TIME_UNIT_ns) ; struct data_packet_struct { //long long int timestamp ; // since system startup lsampl_t ad_samples[4]; // input channels 0 and 1,2,3 lsampl_t da_samples[2]; // output channels 0 and 1 }; #endif