analog_in_impl.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined (__ANALOG_IN_IMPL_H)
00025 #define __ANALOG_IN_IMPL_H
00026
00027 #include "claraty/share.h"
00028
00029 namespace claraty {
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #if 0
00041
00042 const int AI_DISABLE_SCAN = 0;
00043 const int AI_UNIFORM_CONT = 1;
00044 const int AI_UNIFORM_SINGLE = 2;
00045 const int AI_BURST_CONT = 3;
00046 const int AI_BURST_SINGLE = 4;
00047 const int AI_EXT_TRIG = 5;
00048 const int AI_BURST_SINGLE_PER_CHANNEL = 6;
00049 #endif
00050
00051
00052
00053
00054
00055 class AI_impl {
00056
00057 public:
00058
00059
00060 virtual void set_scan_mode(int scan_mode, int int_mode, int timer_mode,
00061 int conv_time = -1, int timer_prescaler = -1) {}
00062 virtual void set_start_end_channels(int start_ch, int end_ch) {}
00063 virtual void conv_start() {}
00064 virtual void conv_wait() {}
00065 virtual int conv_read(int channel) {}
00066 virtual void conv_stop() {}
00067
00068 virtual void set_ch_gain(int channel, int gain_index) {}
00069 virtual void calibrate() {}
00070
00071 virtual float get_gain_for_V(int channel) {return 0.;}
00072 virtual float get_offset_for_V(int channel) {return 0.;}
00073
00074 virtual int input(int channel) = 0;
00075 };
00076
00077
00078
00079 class AI_impl_null : public AI_impl
00080 {
00081 public:
00082 int input(int channel) {return 0;}
00083 };
00084
00085
00086 }
00087
00088 #endif // __ANALOG_IN_IMPL_H