26#ifndef NIDAS_DYNLD_SERIALSENSOR_H
27#define NIDAS_DYNLD_SERIALSENSOR_H
33namespace nidas {
namespace core {
121 void open(
int flags);
Implementation of support for a sensor which generates character output.
Definition CharacterSensor.h:46
An interface to an IO device.
Definition IODevice.h:42
Interface of a client of Looper.
Definition LooperClient.h:38
A scanner of sample data.
Definition SampleScanner.h:74
A serial port.
Definition SerialPortIODevice.h:47
Definition SerialSensor.h:215
const std::string getPrompt() const
Definition SerialSensor.h:224
int getPromptOffsetMsec() const
Definition SerialSensor.h:230
int _promptPeriodMsec
Definition SerialSensor.h:240
~Prompter()
Definition SerialSensor.cc:345
Prompter(SerialSensor *sensor)
Definition SerialSensor.h:217
int _promptOffsetMsec
Definition SerialSensor.h:241
SerialSensor * _sensor
Definition SerialSensor.h:237
int getPromptPeriodMsec() const
Definition SerialSensor.h:227
int _promptLen
Definition SerialSensor.h:239
void looperNotify()
Method called by Looper in order to send a prompt.
Definition SerialSensor.cc:370
void setPromptPeriodMsec(const int)
Definition SerialSensor.cc:360
void setPrompt(const std::string &val)
Definition SerialSensor.cc:350
char * _prompt
Definition SerialSensor.h:238
void setPromptOffsetMsec(const int)
Definition SerialSensor.cc:365
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition SerialSensor.h:65
void unixDevInit(int flags)
void fromDOMElement(const xercesc::DOMElement *node)
Definition SerialSensor.cc:233
~SerialSensor()
Definition SerialSensor.cc:57
void applyTermios()
If the underlying IODevice is a SerialPortIODevice, update the current Termios to the device.
Definition SerialSensor.cc:142
int _rts485
Should the RTS line on this port be controled for half-duplex 485? See SerialPortIODevice....
Definition SerialSensor.h:258
std::list< Prompter * > _prompters
Definition SerialSensor.h:250
SampleScanner * buildSampleScanner()
Calls CharacterSensor::buildSampleScanner(), and then sets the per-byte transmission delay for that s...
Definition SerialSensor.cc:63
void stopPrompting()
Definition SerialSensor.cc:193
SerialPortIODevice * _serialDevice
Non-null if the underlying IODevice is a SerialPortIODevice.
Definition SerialSensor.h:212
const nidas::util::Termios & getTermios() const
Get a read-only copy of the Termios.
Definition SerialSensor.h:86
IODevice * buildIODevice()
Creates an IODevice depending on the device name prefix: name prefix type of IODevice inet: TCPSocket...
Definition SerialSensor.cc:71
bool isPrompting() const
Is prompting active, i.e.
Definition SerialSensor.h:152
int getUsecsPerByte() const
If the underlying IODevice is a SerialPortIODevice, return the value of SerialPortIODevice::getUsecsP...
Definition SerialSensor.cc:91
void open(int flags)
Open the device connected to the sensor.
Definition SerialSensor.cc:97
nidas::util::Termios _termios
Serial I/O parameters.
Definition SerialSensor.h:207
void close()
close my associated device.
Definition SerialSensor.cc:136
void startPrompting()
Start the prompters.
Definition SerialSensor.cc:178
void initPrompting()
Perform whatever is necessary to initialize prompting right after the device is opened.
Definition SerialSensor.cc:150
SerialSensor()
No arg constructor.
Definition SerialSensor.cc:47
bool _prompting
Definition SerialSensor.h:252
void shutdownPrompting()
Shutdown prompting, typically done when a device is closed.
Definition SerialSensor.cc:170
void setMessageParameters(unsigned int len, const std::string &sep, bool eom)
Set message separator and message length parameters, which are used to parse and time-tag samples fro...
Definition SerialSensor.cc:123
void printStatus(std::ostream &ostr)
Definition SerialSensor.cc:206
nidas::util::Termios & termios()
Expose the Termios.
Definition SerialSensor.h:81
A class providing get/set methods into a termios structure.
Definition Termios.h:48
The essential core classes of nidas.
Definition A2DConverter.h:31
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
int len
Definition sing.cc:948