22 #include "PassiveTimer.h"
25 #include "DigitalFilter.h"
26 #include "Calibration.h"
27 #include "IOController.h"
28 #include "SMInterface.h"
33 static const int DefaultSubdev = -1;
34 static const int DefaultChannel = -1;
35 static const int NoSafety = -1;
50 stype(UniversalIO::UnknownIOType),
67 debounce_pause(
false),
74 d_iotype(UniversalIO::UnknownIOType),
77 front_type(ftUnknown),
78 front_prev_state(
false),
100 bool check_depend(
const std::shared_ptr<SMInterface>& shm );
140 IOController::IOStateList::iterator d_it;
143 UniversalIO::IOType d_iotype;
151 IOController::IOStateList::iterator t_ait;
161 friend std::ostream& operator<<( std::ostream& os,
const FrontType& f );
164 FrontType front_type;
165 bool front_prev_state;
170 IOController::IOStateList::iterator ioit;
173 IOBase make_iobase_copy();
174 void create_from_iobase(
const IOBase& b );
176 friend std::ostream& operator<<(std::ostream& os,
const IOBase& inf );
178 static void processingFasAI(
IOBase* it,
float new_val,
const std::shared_ptr<SMInterface>& shm,
bool force );
179 static void processingAsAI(
IOBase* it,
long new_val,
const std::shared_ptr<SMInterface>& shm,
bool force );
180 static void processingAsDI(
IOBase* it,
bool new_set,
const std::shared_ptr<SMInterface>& shm,
bool force );
181 static long processingAsAO(
IOBase* it,
const std::shared_ptr<SMInterface>& shm,
bool force );
182 static float processingFasAO(
IOBase* it,
const std::shared_ptr<SMInterface>& shm,
bool force );
183 static bool processingAsDO(
IOBase* it,
const std::shared_ptr<SMInterface>& shm,
bool force );
184 static void processingThreshold(
IOBase* it,
const std::shared_ptr<SMInterface>& shm,
bool force );
190 const std::string& prefix,
bool init_prefix_only,
191 std::shared_ptr<DebugStream> dlog =
nullptr, std::string myname =
"",
192 int def_filtersize = 0,
float def_filterT = 0.0,
193 float def_lsparam = 0.2,
float def_iir_coeff_prev = 0.5,
194 float def_iir_coeff_new = 0.5 );
198 static std::string initProp(
UniXML::iterator& it,
const std::string& prop,
const std::string& prefix,
bool prefonly,
const std::string&
defval =
"" );
199 static int initIntProp(
UniXML::iterator& it,
const std::string& prop,
const std::string& prefix,
bool prefonly,
const int defval = 0 );
200 static timeout_t initTimeoutProp(
UniXML::iterator& it,
const std::string& prop,
const std::string& prefix,
bool prefonly,
const timeout_t
defval);