26 #ifndef NIDAS_DYNLD_SERIALSENSOR_H
27 #define NIDAS_DYNLD_SERIALSENSOR_H
33 namespace nidas {
namespace core {
35 using namespace nidas::core;
94 throw(nidas::util::InvalidParameterException);
108 IODevice* buildIODevice() throw(nidas::util::IOException);
115 void open(
int flags) throw(nidas::util::IOException,
116 nidas::util::InvalidParameterException);
121 void close() throw(nidas::util::IOException);
127 void applyTermios() throw(nidas::util::IOException);
133 void setMessageParameters(
unsigned int len,const std::
string& sep,
bool eom)
134 throw(nidas::util::InvalidParameterException,nidas::util::IOException);
136 void printStatus(std::ostream& ostr) throw();
142 bool isPrompting()
const {
return _prompting; }
148 void startPrompting() throw(nidas::util::IOException);
150 void stopPrompting() throw(nidas::util::IOException);
152 void fromDOMElement(const xercesc::DOMElement* node)
153 throw(nidas::util::InvalidParameterException);
161 int getUsecsPerByte() const;
169 void initPrompting() throw(nidas::util::IOException);
174 void shutdownPrompting() throw(nidas::util::IOException);
176 void unixDevInit(
int flags)
177 throw(nidas::util::IOException);
184 nidas::util::Termios _termios;
195 _prompt(0),_promptLen(0), _promptPeriodMsec(0),
196 _promptOffsetMsec(0) {}
200 void setPrompt(
const std::string& val);
203 void setPromptPeriodMsec(
const int);
206 void setPromptOffsetMsec(
const int);
212 void looperNotify() throw();
217 int _promptPeriodMsec;
218 int _promptOffsetMsec;
224 Prompter& operator=(const Prompter&);
227 std::list<Prompter*> _prompters;
241 SerialSensor& operator=(const SerialSensor&);
A serial port.
Definition: SerialPortIODevice.h:47
Interface of a client of Looper.
Definition: LooperClient.h:38
Definition: SerialSensor.h:191
Implementation of support for a sensor which generates character output.
Definition: CharacterSensor.h:46
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition: SerialSensor.h:64
nidas::util::Termios & termios()
Expose the Termios.
Definition: SerialSensor.h:81
const nidas::util::Termios & getTermios() const
Get a read-only copy of the Termios.
Definition: SerialSensor.h:86
An interface to an IO device.
Definition: IODevice.h:41
int len
Definition: sing.cc:934
int getPromptPeriodMsec() const
Definition: SerialSensor.h:204
A scanner of sample data.
Definition: SampleScanner.h:73
Prompter(SerialSensor *sensor)
Definition: SerialSensor.h:194
const std::string getPrompt() const
Definition: SerialSensor.h:201
int getPromptOffsetMsec() const
Definition: SerialSensor.h:207
A class providing get/set methods into a termios structure.
Definition: Termios.h:48