nidas v1.2.3
|
A class for reading NMEA records from a GPS. More...
#include <GPS_NMEA_Serial.h>
Public Member Functions | |
GPS_NMEA_Serial () | |
void | validate () |
bool | process (const Sample *samp, std::list< const Sample * > &results) throw () |
Virtual method that is called to convert a raw sample containing an ASCII NMEA message to a processed floating point sample. | |
SampleScanner * | buildSampleScanner () |
Override SerialSensor::buildSampleScanner() and CharacterSensor::buildSampleScanner(), which create a DatagramSampleScanner if the device name starts with "usock:". | |
dsm_time_t | parseGGA (const char *input, double *dout, int nvars, dsm_time_t tt) throw () |
Parse GGA NMEA message. | |
dsm_time_t | parseRMC (const char *input, double *dout, int nvars, dsm_time_t tt) throw () |
Parse RMC NMEA record. | |
dsm_time_t | parseHDT (const char *input, double *dout, int nvars, dsm_time_t tt) throw () |
Parse HDT NMEA message. | |
nidas::util::Termios & | termios () |
Expose the Termios. | |
const nidas::util::Termios & | getTermios () const |
Get a read-only copy of the Termios. | |
IODevice * | buildIODevice () |
Creates an IODevice depending on the device name prefix: name prefix type of IODevice inet: TCPSocketIODevice sock: TCPSocketIODevice usock: UDPSocketIODevice btspp: BluetoothRFCommSocketIODevice all others SerialPortIODevice. | |
void | open (int flags) |
Open the device connected to the sensor. | |
void | close () |
close my associated device. | |
void | applyTermios () |
If the underlying IODevice is a SerialPortIODevice, update the current Termios to the device. | |
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 from the IODevice. | |
void | printStatus (std::ostream &ostr) throw () |
bool | isPrompting () const |
Is prompting active, i.e. | |
void | startPrompting () |
Start the prompters. | |
void | stopPrompting () |
void | fromDOMElement (const xercesc::DOMElement *node) |
int | getUsecsPerByte () const |
If the underlying IODevice is a SerialPortIODevice, return the value of SerialPortIODevice::getUsecsPerByte(), otherwise return 0, which means no timetag correction for transmission delay will be applied. | |
void | init () |
Initialize the CharacterSensor instance for post-processing. | |
const std::string & | getMessageSeparator () const |
Get message separator with backslash sequences replaced by their intended character. | |
const std::string | getBackslashedMessageSeparator () const |
Get message separator with backslash sequences added back. | |
bool | getMessageSeparatorAtEOM () const |
int | getMessageLength () const |
virtual void | addPrompt (const std::string &promptString, double promptRate, double promptOffset) |
Prompting Sensors can have multiple prompts and rates. | |
const std::list< Prompt > & | getPrompts () const |
virtual bool | isPrompted () const |
Is this a prompted sensor. | |
virtual void | togglePrompting () |
void | setInitString (const std::string &val) |
Set the initialization string(s) for this sensor. | |
const std::string & | getInitString () const |
virtual void | sendInitString () |
bool | getNullTerminated () const |
int | getNumScanfFailures () const |
How many samples have resulted in complete scanf failures - nothing parsed, because the sensor messages do not correspond to the sscanf format. | |
int | getNumScanfPartials () const |
How many samples have been partially scanned, because a character in the middle of a message conflicts with the sscanf format. | |
const std::list< AsciiSscanf * > & | getScanfers () const |
Return the list of AsciiSscanfs requested for this CharacterSensor. | |
int | getMaxScanfFields () const |
The maximum number of fields in any of the AsciiSscanfs for this CharacterSensor. | |
virtual void | validateSscanfs () |
Virtual method to check that the Sscanfs for this CharacterSensor are OK. | |
bool | doesAsciiSscanfs () |
void | setDSMConfig (const DSMConfig *val) |
Set the DSMConfig for this sensor. | |
const DSMConfig * | getDSMConfig () const |
What DSMConfig am I associated with? | |
const Site * | getSite () const |
What Site am I associated with? | |
virtual void | setDeviceName (const std::string &val) |
Set the name of the system device that the sensor is connected to. | |
virtual const std::string & | getDeviceName () const |
Fetch the name of the system device that the sensor is connected to. | |
virtual void | setClassName (const std::string &val) |
Set the class name. | |
virtual const std::string & | getClassName () const |
Fetch the class name. | |
virtual void | setCatalogName (const std::string &val) |
Set the name of the catalog entry for this sensor. | |
virtual const std::string & | getCatalogName () const |
Fetch the name of the catalog entry for this sensor. | |
const std::string & | getDSMName () const |
Fetch the DSM name. | |
virtual std::string | getName () const |
Return a name that should fully identify this sensor. | |
const std::string & | getLocation () const |
Location string. | |
void | setLocation (const std::string &val) |
const std::string & | getSuffix () const |
Sensor suffix, which is added to variable names. | |
void | setSuffix (const std::string &val) |
int | getStation () const |
void | setStation (int val) |
void | setHeight (const std::string &val) |
Set sensor height above ground via a string which is added to variable names. | |
void | setHeight (float val) |
Set sensor height above ground. | |
const std::string & | getHeightString () const |
Get sensor height above ground in a string. | |
float | getHeight () const |
Get sensor height above ground. | |
void | setDepth (const std::string &val) |
Set sensor depth below ground via a string which is added to variable names. | |
void | setDepth (float val) |
Set sensor depth below ground. | |
const std::string & | getDepthString () const |
Get sensor depth below ground in a string. | |
float | getDepth () const |
Get sensor depth below ground. | |
const std::string & | getFullSuffix () const |
Full sensor suffix, the concatenation of the sensor suffix, if any, and the height or depth string, if any. | |
std::string | expandString (const std::string &input) const |
Utility function to expand ${TOKEN} or $TOKEN fields in a string with their value from getTokenValue(). | |
bool | getTokenValue (const std::string &token, std::string &value) const |
Implement a lookup for tokens that I know about, like $HEIGHT. | |
const Dictionary & | getDictionary () const |
SampleSource * | getRawSampleSource () |
Implementation of SampleSource::getRawSampleSource(). | |
SampleSource * | getProcessedSampleSource () |
Implementation of SampleSource::getProcessedSampleSource(). | |
const SampleTag * | getRawSampleTag () const |
Convenience function to get my one-and-only raw SampleTag(). | |
virtual void | addSampleTag (SampleTag *val) |
Add a SampleTag to this sensor. | |
virtual void | removeSampleTag (SampleTag *val) |
Remove val from the list of SampleTags, and delete it. | |
std::list< const SampleTag * > | getSampleTags () const |
Implementation of SampleSource::getSampleTags(). | |
std::list< SampleTag * > & | getSampleTags () |
Non-const method to get a list of non-const pointers to SampleTags. | |
SampleTagIterator | getSampleTagIterator () const |
void | addSampleClient (SampleClient *c) throw () |
Add a SampleClient to this SampleSource. | |
void | removeSampleClient (SampleClient *c) throw () |
Remove a SampleClient from this SampleSource This will also remove a SampleClient if it has been added with addSampleClientForTag(). | |
void | addSampleClientForTag (SampleClient *client, const SampleTag *tag) throw () |
Add a SampleClient to this SampleSource. | |
void | removeSampleClientForTag (SampleClient *client, const SampleTag *tag) throw () |
Remove a SampleClient for a given SampleTag from this SampleSource. | |
int | getClientCount () const throw () |
How many SampleClients are currently in my list. | |
void | flush () |
Implementation of SampleClient::flush(). | |
void | distributeRaw (const Sample *s) |
Distribute a raw sample which has been read from my file descriptor in real time. | |
const SampleStats & | getSampleStats () const |
virtual int | getReadFd () const |
virtual int | getWriteFd () const |
virtual bool | reopenOnIOException () const |
Whether to reopen this sensor on an IOException. | |
void | setId (dsm_sample_id_t val) |
Set the various levels of the sensor identification. | |
void | setSensorId (unsigned int val) |
void | setDSMId (unsigned int val) |
dsm_sample_id_t | getId () const |
Get the various levels of the samples identification. | |
unsigned int | getDSMId () const |
unsigned int | getSensorId () const |
virtual void | setLatency (float val) |
Set desired latency, providing some control over the response time vs buffer efficiency tradeoff. | |
virtual float | getLatency () const |
virtual void | setTimeoutMsecs (int val) |
Set the sensor timeout value in milliseconds. | |
virtual int | getTimeoutMsecs () const |
int | getTimeoutCount () const |
void | incrementTimeoutCount () |
void | addParameter (Parameter *val) |
Add a parameter to this DSMSensor. | |
const std::list< const Parameter * > & | getParameters () const |
Get list of parameters. | |
const Parameter * | getParameter (const std::string &name) const |
Fetch a parameter by name. | |
void | setIODevice (IODevice *val) |
Set the IODevice for this sensor. | |
void | setSampleScanner (SampleScanner *val) |
Set the SampleScanner for this sensor. | |
virtual int | getDefaultMode () const |
How do I want to be opened. | |
virtual void | setDefaultMode (int val) |
virtual size_t | getBytesAvailable () const |
How many bytes are available to read on this sensor. | |
virtual size_t | read (void *buf, size_t len) |
Read from the device (duh). | |
virtual size_t | read (void *buf, size_t len, int msecTimeout) |
Read from the device with a timeout. | |
virtual size_t | write (const void *buf, size_t len) |
Write to the device (duh). | |
virtual void | ioctl (int request, void *buf, size_t len) |
Perform an ioctl on the device. | |
virtual bool | readSamples () |
Read samples from my associated file descriptor, and distribute() them to my RawSampleClient's. | |
virtual Sample * | nextSample () |
Extract the next sample from the buffer. | |
virtual Sample * | readSample () |
Return the next sample. | |
bool | receive (const Sample *s) |
A DSMSensor can be used as a SampleClient, meaning it receives its own raw samples. | |
void | printStatusHeader (std::ostream &ostr) |
void | printStatusTrailer (std::ostream &ostr) |
void | calcStatistics (unsigned int periodUsec) |
Update the sensor sampling statistics. | |
unsigned int | getMaxSampleLength () const |
unsigned int | getMinSampleLength () const |
float | getObservedSamplingRate () const |
float | getObservedDataRate () const |
size_t | getBadTimeTagCount () const |
VariableIterator | getVariableIterator () const |
xercesc::DOMElement * | toDOMParent (xercesc::DOMElement *parent, bool complete) const |
xercesc::DOMElement * | toDOMElement (xercesc::DOMElement *node, bool complete) const |
virtual void | setTypeName (const std::string &val) |
Set the type name of this sensor, e.g.: "ACME Model 99 Mach7 Particle Disambiguator". | |
virtual const std::string & | getTypeName (void) const |
Get the type name of this sensor. | |
bool | getDuplicateIdOK () const |
getDuplicateIdOK will be true if it is OK for samples from this sensor to have identical IDs to samples from another sensor. | |
void | setDuplicateIdOK (bool val) |
Set the duplicate ID attribute of this DSMSensor. | |
virtual bool | getApplyVariableConversions () const |
virtual void | setApplyVariableConversions (bool val) |
virtual int | getDriverTimeTagUsecs () const |
virtual void | setDriverTimeTagUsecs (int val) |
void | addCalFile (CalFile *val) |
Add a calibration file for this DSMSensor. | |
const std::map< std::string, CalFile * > & | getCalFiles () |
Return the collection of CalFiles, mapped by name. | |
CalFile * | getCalFile (const std::string &name) |
Return a CalFile by its getName(). | |
void | removeCalFiles () |
Remove all CalFiles. | |
virtual void | executeXmlRpc (XmlRpc::XmlRpcValue &, XmlRpc::XmlRpcValue &) |
Method invoked when the DSMEngineIntf XmlRpcServer receives a "SensorAction" request, with a "device" string matching the string that this DSMSensor registers via DSMEngine::registerSensorWithXmlRpc(string,DSMServer*). | |
virtual const std::list< SampleTag * > & | getNonConstSampleTags () |
We'll allow derived classes and calibration applications to change the SampleTags, so this method returns a list of non-constant SampleTags. | |
bool | allowOpen () |
bool | readBuffer () |
Read into my SampleScanner's buffer. | |
bool | readBuffer (int msecTimeout) |
Read into my SampleScanner's buffer. | |
Static Public Member Functions | |
static bool | checksumOK (const char *rec, int len) |
Calculate the checksum of the NMEA message and return a logical indicating whether it is equal to the checksum at the end of the message. | |
static bool | findChecksum (char &checksum, const char *rec, int len) |
Given a NMEA message in rec of length len , look for the checksum and convert it to a byte value. | |
static char | calcChecksum (const char *rec, int len) |
Given a NMEA message in rec of length len , calculate the checksum of the message and return it. | |
static void | appendChecksum (char *rec, int len, int maxlen) |
Calculate the checksum for the given message and append it in the form "*%2X", but only if the length would not exceed maxlen, including the null terminator. | |
static const std::string | getClassName (const xercesc::DOMElement *node, const Project *project) |
Crawl through the DOM tree for a DSMSensor to find the class name - scanning the catalog entry if necessary. | |
static void | deleteLooper () |
static const XMLCh * | getNamespaceURI () |
Protected Member Functions | |
void | initPrompting () |
Perform whatever is necessary to initialize prompting right after the device is opened. | |
void | shutdownPrompting () |
Shutdown prompting, typically done when a device is closed. | |
void | unixDevInit (int flags) |
void | setPromptRate (const double val) |
Set the rate at which <sensor> prompts are sent to this sensor. | |
double | getPromptRate () const |
void | setPromptOffset (const double val) |
double | getPromptOffset () const |
void | setPromptString (const std::string &val) |
Set the <sensor> prompt string for this sensor. | |
const std::string & | getPromptString () const |
virtual int | scanSample (AsciiSscanf *sscanf, const char *inputstr, float *data_ptr) |
SampleT< float > * | searchSampleScanners (const Sample *samp, SampleTag **stag_out=0) throw () |
Search through the AsciiSscanf instances attached to this sensor, looking for the next scanner which parses at least one variable from the given raw sample. | |
void | adjustTimeTag (SampleTag *stag, SampleT< float > *outs) |
Apply TimetagAdjuster and lag adjustments to the timetag of the given sample. | |
void | clearBuffer () |
Clear the internal buffer. | |
IODevice * | getIODevice () const |
SampleScanner * | getSampleScanner () const |
void | setFullSuffix (const std::string &val) |
virtual int | getLagUsecs () const |
Return the sampling lag for this sensor in microseconds. | |
virtual double | getLagSecs () const |
Return the sampling lag for this sensor in seconds. | |
virtual void | setLagSecs (double val) |
Set the sampling lag for this sensor in seconds. | |
void | applyConversions (SampleTag *stag, SampleT< float > *outs, float *results=0) |
Perform variable conversions for the variables in stag whose values and sample time have been set in outs . | |
void | trimUnparsed (SampleTag *stag, SampleT< float > *outs, int nparsed) |
Fill with floatNAN all the values past nparsed values in output sample outs , and trim the length of the sample to match the length of the variables in SampleTag stag . | |
VariableIndex | findVariableIndex (const std::string &vprefix) |
Search all the sample tags for a variable whose name starts with the given prefix, and return it's index in the list of variables in the sample tag. | |
Static Protected Member Functions | |
static Looper * | getLooper () |
Fetch a pointer to a static instance of a Looper thread. | |
Protected Attributes | |
dsm_time_t | _ttgps |
Timetag set by parseGGA and parseRMC, used by parseHDT. | |
int | _ggaNvars |
Number of variables requested from GGA record (sample id == 1) | |
dsm_sample_id_t | _ggaId |
Full sample id of GGA variables. | |
int | _rmcNvars |
Number of variables requested from RMC record (sample id == 2) | |
dsm_sample_id_t | _rmcId |
Full sample id of RMC variables. | |
int | _hdtNvars |
Number of variables requested from HDT record (sample id == 3) | |
dsm_sample_id_t | _hdtId |
Full sample id of HDT variables. | |
unsigned int | _badChecksums |
unsigned int | _badChecksumsCount |
std::map< int, std::string > | _allowedSampleIds |
Derived classes should add their supported sample ids to the map, along with a short descriptive name, so that addSampleTag() does not throw an exception on an unrecognized id. | |
std::map< const SampleTag *, TimetagAdjuster * > | _ttadjusters |
bool | _openable |
Whether this sensor is allowed to be opened. | |
Static Protected Attributes | |
static const int | GGA_SAMPLE_ID = 1 |
Id of sample from GGA NMEA record. | |
static const int | RMC_SAMPLE_ID = 2 |
Id of sample from RMC NMEA record. | |
static const int | HDT_SAMPLE_ID = 3 |
Id of sample from HDT NMEA record. | |
Private Member Functions | |
void | addSampleTag (const SampleTag *val) |
DSMSensor does provide public support for SampleSource::addSampleTag(const SampleTag* val). | |
void | removeSampleTag (const SampleTag *val) |
DSMSensor does not provide public support for SampleSource::removeSampleTag(const SampleTag* val) | |
Static Private Attributes | |
static bool | zebra = false |
static Looper * | _looper = 0 |
static nidas::util::Mutex | _looperMutex |
static XMLCh * | namespaceURI = 0 |
A class for reading NMEA records from a GPS.
The process() method parses GGA, RMC, and HDT NMEA messages and generates double precision floating point samples.
GPS_NMEA_Serial::GPS_NMEA_Serial | ( | ) |
References nidas::util::Logger::getScheme().
Add a calibration file for this DSMSensor.
After this method is finished, DSMSensor will own the pointer, and will delete it in the DSMSensor destructor.
References nidas::core::DSMSensor::_calFiles, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Add a parameter to this DSMSensor.
DSMSensor will then own the pointer and will delete it in its destructor. If a Parameter exists with the same name, it will be replaced with the new Parameter.
References nidas::core::DSMSensor::_constParameters, nidas::core::DSMSensor::_parameters, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
|
inlinevirtualinherited |
Prompting Sensors can have multiple prompts and rates.
Add another prompt and rate to this sensor.
promptString | May contain backslash escape sequences. |
promptRate | prompts/sec. |
References nidas::core::CharacterSensor::_prompted, nidas::core::CharacterSensor::_prompts, and nidas::core::getSample().
Referenced by nidas::core::CharacterSensor::validate().
|
inlinevirtualinherited |
Add a SampleClient to this SampleSource.
The pointer to the SampleClient must remain valid, until after it is removed.
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::addSampleClient().
Referenced by nidas::core::SamplePipeline::addSampleClient(), and nidas::core::SamplePipeline::addSampleClientForTag().
|
inlinevirtualinherited |
Add a SampleClient to this SampleSource.
The pointer to the SampleClient must remain valid, until after it is removed.
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::addSampleClientForTag().
Referenced by nidas::core::SamplePipeline::addSampleClientForTag().
DSMSensor does provide public support for SampleSource::addSampleTag(const SampleTag* val).
nidas::util::InvalidParameterException |
Implements nidas::core::SampleSource.
References nidas::core::getSample().
Add a SampleTag to this sensor.
DSMSensor will own the SampleTag. Throw an exception the DSMSensor cannot support the sample (bad rate, wrong number of variables, etc). Note that a SampleTag may be changed after it has been added. addSampleTag() is called when a sensor is initialized from the sensor catalog. The SampleTag may be modified later if it is overridden in the actual sensor entry. For this reason, it is wise to wait to scan the SampleTags of a DSMSensor in the validate(), init() or open() methods, which are invoked after fromDOMElement.
nidas::util::InvalidParameterException |
Reimplemented in nidas::dynld::iss::TiltSensor, nidas::dynld::iss::WICORSensor, and nidas::dynld::isff::DAUSensor.
References nidas::core::DSMSensor::_sampleTags, nidas::core::DSMSensor::_source, nidas::core::SampleSourceSupport::addSampleTag(), GET_DSM_ID, GET_SHORT_ID, nidas::core::DSMSensor::getName(), nidas::core::getSample(), and LOG_WARNING.
Referenced by nidas::dynld::isff::WisardMote::addMoteSampleTag(), nidas::dynld::iss::WICORSensor::addSampleTag(), nidas::dynld::RawSampleService::connect(), nidas::core::DSMSensor::fromDOMElement(), nidas::dynld::RawSampleService::fromDOMElement(), nidas::dynld::raf::SyncServer::initSensors(), and main().
|
protectedinherited |
Apply TimetagAdjuster and lag adjustments to the timetag of the given sample.
References nidas::core::CharacterSensor::_ttadjusters, and nidas::core::DSMSensor::getLagUsecs().
Referenced by nidas::dynld::isff::NCAR_TRH::process(), nidas::core::CharacterSensor::process(), and nidas::dynld::ModbusRTU::process().
|
inlineinherited |
References nidas::core::DSMSensor::_openable.
Referenced by nidas::core::DSMConfig::addSensor().
Calculate the checksum for the given message and append it in the form "*%2X", but only if the length would not exceed maxlen, including the null terminator.
References calcChecksum(), cksum(), nidas::core::getSample(), and len.
|
protectedinherited |
Perform variable conversions for the variables in stag
whose values and sample time have been set in outs
.
This method can be used by subclasses to apply any variable conversions associated with the variables in the given SampleTag, using a general algorithm which loops over each value in each variable. The min/max value limits of a variable are applied also, so if a variable value is converted but lies outside the min/max range, the value is set to floatNAN. Typically this can be the last step applied to the output sample of a sensor's process() method, and note that the sample time must already be set in the output sample outs
, since that time will be used to look up conversions in calibration files.
If results
is non-null, then the converted values are written into results
instead of overwriting the values in outs
. This is used when one variable's results may be used to filter other variables without replacing the one variable's results. An example is the Ifan variable in the TRH WisardMote. results
must point to enough memory to hold all of the values in outs
, including for any Variables with multiple values (getLength() > 1).
See Variable::convert().
References fp, nidas::core::getSample(), and nidas::core::SampleTag::getVariables().
Referenced by nidas::dynld::isff::WisardMote::convert(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::iss::TiltSensor::process(), nidas::core::CharacterSensor::process(), and nidas::dynld::raf::A2D_Serial::process().
|
inherited |
If the underlying IODevice is a SerialPortIODevice, update the current Termios to the device.
nidas::util::IOException |
References nidas::core::SerialSensor::_serialDevice, nidas::core::SerialSensor::_termios, nidas::core::SerialPortIODevice::applyTermios(), and nidas::core::SerialPortIODevice::termios().
Referenced by nidas::core::RemoteSerialConnection::doEscCmds().
|
virtualinherited |
Creates an IODevice depending on the device name prefix: name prefix type of IODevice inet: TCPSocketIODevice sock: TCPSocketIODevice usock: UDPSocketIODevice btspp: BluetoothRFCommSocketIODevice all others SerialPortIODevice.
If a SerialPortIODevice is created, the Termios of this SerialSensor is copied to the device, which will then be applied when the device is opened.
nidas::util::IOException |
Reimplemented from nidas::core::CharacterSensor.
References nidas::core::SerialSensor::_rts485, nidas::core::SerialSensor::_serialDevice, nidas::core::SerialSensor::_termios, nidas::core::DSMSensor::getDeviceName(), nidas::core::getSample(), nidas::core::SerialPortIODevice::setRTS485(), and nidas::core::SerialPortIODevice::termios().
Referenced by nidas::dynld::ModbusRTU::open().
|
virtual |
Override SerialSensor::buildSampleScanner() and CharacterSensor::buildSampleScanner(), which create a DatagramSampleScanner if the device name starts with "usock:".
Javad GPS units output UDP packets, containing more than one newline terminated NMEA message in each UDP packet. So, instead we want to scan with a MessageStreamScanner(), breaking up the packet into separate samples.
nidas::util::InvalidParameterException |
Reimplemented from nidas::core::CharacterSensor.
References DLOG, nidas::core::CharacterSensor::doesAsciiSscanfs(), nidas::core::CharacterSensor::getMessageLength(), nidas::core::CharacterSensor::getMessageSeparator(), nidas::core::CharacterSensor::getMessageSeparatorAtEOM(), nidas::core::DSMSensor::getName(), nidas::core::getSample(), and nidas::core::SerialSensor::getUsecsPerByte().
Given a NMEA message in rec
of length len
, calculate the checksum of the message and return it.
This only calculates the checksum up to '*' or the end of the message, in case the message already contains a checksum.
References nidas::core::getSample(), and len.
Referenced by appendChecksum().
Update the sensor sampling statistics.
Should be called every periodUsec by a user of this sensor.
periodUsec | Statistics period. |
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::calcStatistics().
Calculate the checksum of the NMEA message and return a logical indicating whether it is equal to the checksum at the end of the message.
References len, and nidas::util::NMEAchecksumOK().
|
inlineprotectedinherited |
Clear the internal buffer.
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::clearBuffer().
Referenced by nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::dynld::isff::CSAT3_Sonic::querySonic(), nidas::dynld::raf::SppSerial::sendInitPacketAndCheckAck(), nidas::dynld::raf::UHSAS_Serial::sendInitString(), and nidas::dynld::isff::CSAT3_Sonic::sendRateCommand().
|
virtualinherited |
close my associated device.
nidas::util::IOException; |
Reimplemented from nidas::core::DSMSensor.
Reimplemented in nidas::dynld::raf::VCSEL2_Serial, and nidas::dynld::raf::VCSEL_Serial.
References nidas::core::DSMSensor::close(), and nidas::core::SerialSensor::shutdownPrompting().
Referenced by nidas::dynld::isff::MOSMote::close(), nidas::dynld::raf::AlicatSDI::close(), nidas::dynld::raf::PPT_Serial::close(), nidas::dynld::raf::VCSEL2_Serial::close(), and nidas::dynld::raf::VCSEL_Serial::close().
|
staticinherited |
References nidas::core::DSMSensor::_looper, nidas::core::DSMSensor::_looperMutex, and nidas::core::getSample().
Referenced by nidas::core::DSMEngine::main().
Distribute a raw sample which has been read from my file descriptor in real time.
References nidas::core::DSMSensor::_rawSource, and nidas::core::SampleSourceSupport::distribute().
Referenced by nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::dynld::raf::AlicatSDI::open(), nidas::dynld::isff::CSAT3_Sonic::querySonic(), nidas::dynld::raf::A2D_Serial::readConfig(), nidas::dynld::isff::CSAT3_Sonic::sendRateCommand(), and nidas::dynld::isff::CSAT3_Sonic::terminalMode().
|
inherited |
References nidas::core::DSMSensor::getSampleTagIterator(), nidas::core::SampleTag::getScanfFormat(), and nidas::core::SampleTagIterator::hasNext().
Referenced by nidas::core::CharacterSensor::buildSampleScanner(), buildSampleScanner(), and nidas::dynld::UDPSocketSensor::buildSampleScanner().
|
inlinevirtualinherited |
Method invoked when the DSMEngineIntf XmlRpcServer receives a "SensorAction" request, with a "device" string matching the string that this DSMSensor registers via DSMEngine::registerSensorWithXmlRpc(string,DSMServer*).
The default base class method does nothing.
Reimplemented in nidas::dynld::DSC_A2DSensor, nidas::dynld::raf::A2D_Serial, nidas::dynld::raf::DSMAnalogSensor, and nidas::dynld::raf::PSI9116_Sensor.
Referenced by nidas::core::DSMEngineIntf::SensorAction::execute().
|
inlineinherited |
Utility function to expand ${TOKEN} or $TOKEN fields in a string with their value from getTokenValue().
If curly brackets are not used, then the TOKEN should be delimited by a '/', a '.' or the end of string, e.g.: xxx/yyy/$ZZZ.dat
References nidas::core::DSMSensor::_dictionary, and nidas::core::Dictionary::expandString().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Given a NMEA message in rec
of length len
, look for the checksum and convert it to a byte value.
If found, set checksum
and return true. Otherwise return false without changing checksum
.
References cksum(), nidas::core::getSample(), and len.
|
protectedinherited |
Search all the sample tags for a variable whose name starts with the given prefix, and return it's index in the list of variables in the sample tag.
If no such variable is found, return -1.
References nidas::core::getSample(), nidas::core::DSMSensor::getSampleTags(), and nidas::core::SampleTag::getVariables().
Referenced by nidas::dynld::isff::CSI_IRGA_Sonic::checkSampleTags(), and nidas::dynld::isff::NCAR_TRH::validate().
|
inlinevirtualinherited |
Implementation of SampleClient::flush().
This is where a DSMSensor's process() method could send out any buffered results that might be ready.
Implements nidas::core::SampleSource.
nidas::util::InvalidParameterException |
Reimplemented from nidas::core::CharacterSensor.
Reimplemented in nidas::dynld::isff::Wind2D, and nidas::dynld::iss::TiltSensor.
References nidas::core::SerialSensor::_rts485, nidas::core::SerialSensor::_termios, nidas::core::CharacterSensor::fromDOMElement(), nidas::core::DSMSensor::getName(), nidas::core::getSample(), nidas::util::Termios::setBaudRate(), nidas::util::Termios::setDataBits(), nidas::util::Termios::setParity(), and nidas::util::Termios::setStopBits().
Referenced by nidas::dynld::isff::DAUSensor::fromDOMElement(), nidas::dynld::isff::Wind2D::fromDOMElement(), and nidas::dynld::iss::TiltSensor::fromDOMElement().
|
inlineinherited |
Get message separator with backslash sequences added back.
References nidas::core::CharacterSensor::_messageSeparator, and nidas::util::addBackslashSequences().
Referenced by nidas::core::RemoteSerialConnection::setSensor().
|
inlineinherited |
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::getBadTimeTagCount().
Referenced by nidas::core::DSMSensor::printStatus().
How many bytes are available to read on this sensor.
nidas::util::IOException |
References nidas::core::DSMSensor::_iodev, and nidas::core::IODevice::getBytesAvailable().
Referenced by nidas::core::DatagramSampleScanner::readBuffer().
Return a CalFile by its getName().
Will return NULL if not found.
References nidas::core::DSMSensor::_calFiles.
Referenced by nidas::dynld::ParoSci_202BG_P::init(), nidas::dynld::ParoSci_202BG_T::init(), and nidas::dynld::isff::Wind3D::parseParameters().
Return the collection of CalFiles, mapped by name.
References nidas::core::DSMSensor::_calFiles.
Referenced by nidas::dynld::A2DSensor::init(), nidas::dynld::raf::A2D_Serial::init(), sensorTitle(), and PConfig::showCalFiles().
Fetch the name of the catalog entry for this sensor.
References nidas::core::DSMSensor::_catalogName.
Referenced by SampleCounter::collectMetadata(), parseOther(), nidas::core::DSMSensor::printStatus(), ExtractFast2D::run(), ExtractDMT::run(), sensorTitle(), and PConfig::showCalFiles().
Fetch the class name.
References nidas::core::DSMSensor::_className.
Referenced by SampleCounter::collectMetadata(), nidas::core::DSMSensor::fromDOMElement(), nidas::core::DSMSensor::getClassName(), parseAnalog(), parseOther(), nidas::core::DSMSensor::printStatus(), nidas::core::DSMConfig::sensorFromDOMElement(), sensorTitle(), PConfig::showAll(), PConfig::showCalFiles(), PConfig::showSensorClasses(), and nidas::dynld::raf::UDPArincSensor::~UDPArincSensor().
|
staticinherited |
Crawl through the DOM tree for a DSMSensor to find the class name - scanning the catalog entry if necessary.
nidas::util::InvalidParameterException |
References nidas::core::DSMSensor::getClassName(), and nidas::core::getSample().
|
inlinevirtualinherited |
How many SampleClients are currently in my list.
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::getClientCount().
How do I want to be opened.
The user can ignore it if they want to.
References nidas::core::DSMSensor::_defaultMode.
Referenced by nidas::core::DSMSensor::fromDOMElement(), and nidas::core::SensorOpener::run().
|
inlineinherited |
Get sensor depth below ground.
References nidas::core::DSMSensor::_height.
|
inlineinherited |
Get sensor depth below ground in a string.
References nidas::core::DSMSensor::_depthString.
Referenced by SampleCounter::collectMetadata().
Fetch the name of the system device that the sensor is connected to.
References nidas::core::DSMSensor::_devname.
Referenced by nidas::core::SensorHandler::add(), nidas::core::CharacterSensor::buildIODevice(), nidas::core::SerialSensor::buildIODevice(), nidas::core::CharacterSensor::buildSampleScanner(), nidas::dynld::IR104_Relays::clearOutputs(), nidas::core::DSMSensor::close(), SampleCounter::collectMetadata(), DataStats::createCounters(), nidas::dynld::raf::DSMArincSensor::fromDOMElement(), nidas::dynld::IR104_Relays::getInputs(), nidas::core::DSMSensor::getName(), nidas::dynld::IR104_Relays::getOutputs(), nidas::core::DSMSensor::open(), nidas::core::SerialSensor::open(), nidas::dynld::DSC_A2DSensor::open(), nidas::dynld::IR104_Relays::open(), nidas::dynld::ModbusRTU::open(), nidas::dynld::raf::A2D_Serial::open(), nidas::dynld::raf::DSMAnalogSensor::open(), nidas::dynld::raf::PSI9116_Sensor::open(), nidas::dynld::raf::UDPArincSensor::open(), parseOther(), nidas::core::DSMSensor::printStatus(), nidas::dynld::ModbusRTU::process(), nidas::dynld::raf::DSMArincSensor::registerWithUDPArincSensor(), nidas::core::CharacterSensor::sendInitString(), sensorTitle(), nidas::dynld::IR104_Relays::setOutputs(), nidas::dynld::IR104_Relays::setOutputs(), PConfig::showCalFiles(), and nidas::core::DSMSensor::validate().
|
inlineinherited |
References nidas::core::DSMSensor::_dictionary.
References nidas::core::DSMSensor::_driverTimeTagUsecs.
Referenced by nidas::core::DriverSampleScanner::nextSample().
What DSMConfig am I associated with?
References nidas::core::DSMSensor::_dsm.
Referenced by SampleCounter::collectMetadata(), DataStats::createCounters(), nidas::core::DSMSensor::fromDOMElement(), SampleCounter::generateStreamId(), nidas::core::DSMSensor::MyDictionary::getTokenValue(), nidas::dynld::isff::CSAT3_Sonic::open(), nidas::core::DSMSensor::printStatusHeader(), nidas::core::DSMSensor::readSamples(), nidas::dynld::raf::DSMArincSensor::registerWithUDPArincSensor(), and nidas::core::DSMSensor::validate().
References nidas::core::DSMSensor::_id, and GET_DSM_ID.
Referenced by nidas::core::Site::findSensor(), nidas::core::DSMSensor::fromDOMElement(), nidas::dynld::isff::CSAT3_Sonic::open(), nidas::core::SampleScanner::readBuffer(), nidas::core::DSMSensor::readSamples(), sensorTitle(), PConfig::showAll(), PConfig::showSensorClasses(), nidas::core::Site::validate(), nidas::core::DSMConfig::validateSensorAndSampleIds(), nidas::core::MessageStreamScanner::warnBackwardsStepTimeTag(), and nidas::core::MessageStreamScanner::warnNonIncrTimeTag().
|
inherited |
Fetch the DSM name.
References nidas::core::DSMSensor::_dsm, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::getName().
|
inlineinherited |
getDuplicateIdOK will be true if it is OK for samples from this sensor to have identical IDs to samples from another sensor.
That other sensor must also agree that dupicateIdOK are OK. This can be useful if one may not be certain of the device name, e.g. /dev/ttyUSB*, that the system will assign to a sensor may use, but there are identifiers in the data returned that allow one to sort things out. In general, getDuplicateID is false.
References nidas::core::DSMSensor::_duplicateIdOK.
Referenced by nidas::core::Site::validate(), and nidas::core::DSMConfig::validateSensorAndSampleIds().
|
inlineinherited |
Full sensor suffix, the concatenation of the sensor suffix, if any, and the height or depth string, if any.
The full sensor suffix are words 2 and 3 in the dot-separated name: variable[.sensor][.height][.site]
References nidas::core::DSMSensor::_fullSuffix.
Referenced by nidas::core::DSMSensor::fromDOMElement().
|
inlineinherited |
Get sensor height above ground.
References nidas::core::DSMSensor::_height.
|
inlineinherited |
Get sensor height above ground in a string.
References nidas::core::DSMSensor::_heightString.
Referenced by SampleCounter::collectMetadata(), nidas::core::DSMSensor::MyDictionary::getTokenValue(), ARLIngest::prepareHeaderIds(), SampleToDatabase::SampleToDatabase(), and PConfig::showCalFiles().
|
inlineinherited |
Get the various levels of the samples identification.
A sample tag ID is a 32-bit value comprised of four parts: 6-bit sample type id(not used by DSMSensor), a 10-bit DSM id, 16-bit sensor+sample ids.
References nidas::core::DSMSensor::_id, and GET_FULL_ID.
Referenced by DataStats::createCounters(), nidas::core::Site::findSensor(), nidas::core::TimetagAdjuster::log(), nidas::core::DriverSampleScanner::nextSample(), nidas::core::DatagramSampleScanner::nextSample(), nidas::core::MessageStreamScanner::nextSampleByLength(), nidas::core::MessageStreamScanner::nextSampleSepBOM(), nidas::core::MessageStreamScanner::nextSampleSepEOM(), nidas::dynld::IR104_Relays::process(), nidas::dynld::raf::DSMArincSensor::process(), nidas::dynld::isff::WisardMote::process(), nidas::dynld::raf::A2D_Serial::process(), nidas::dynld::raf::CDP_Serial::process(), nidas::dynld::raf::DSMMesaSensor::process(), nidas::dynld::raf::LamsSensor::process(), nidas::dynld::raf::PHIPS_UDP::process(), nidas::dynld::raf::PIP_Serial::process(), nidas::dynld::raf::SPP100_Serial::process(), nidas::dynld::raf::SPP200_Serial::process(), nidas::dynld::raf::SPP300_Serial::process(), nidas::dynld::raf::UHSAS_Serial::process(), nidas::dynld::raf::VCSEL_Serial::process(), nidas::dynld::raf::DSMArincSensor::processAlta(), nidas::dynld::isff::WisardMote::validate(), and nidas::core::DSMConfig::validateSensorAndSampleIds().
|
inlineinherited |
References nidas::core::CharacterSensor::_initString.
Referenced by nidas::core::CharacterSensor::sendInitString().
|
inlineprotectedinherited |
References nidas::core::DSMSensor::_iodev.
Return the sampling lag for this sensor in seconds.
See getLagUsecs().
References nidas::core::DSMSensor::_lag, and USECS_PER_SEC.
Return the sampling lag for this sensor in microseconds.
A positive lag means one should adjust the sample time tags for this sensor earlier in time to achieve a better estimate of the actual time to be associated for each sample. Derived classes can use this method in their process method to correct for inherent, constant, sampling lags of a sensor. A fixed sample lag, in fractional seconds, can be set for a sensor in the XML:
The DSMSensor::fromDOM() method parses this parameter and sets the value of the lag.
References nidas::core::DSMSensor::_lag.
Referenced by nidas::core::CharacterSensor::adjustTimeTag(), nidas::dynld::raf::A2D_Serial::process(), nidas::dynld::raf::DSMMesaSensor::process(), and nidas::dynld::raf::UHSAS_Serial::process().
References nidas::core::DSMSensor::_latency.
Referenced by nidas::dynld::DSC_A2DSensor::open(), nidas::dynld::DSC_Event::open(), and nidas::dynld::raf::DSMAnalogSensor::open().
|
inherited |
Location string.
A DSMConfig also has a Location. If the location has not been set for this DSMSensor, then the location of the DSMConfig will be returned.
References nidas::core::DSMSensor::_dsm, and nidas::core::DSMSensor::_location.
Referenced by SampleCounter::collectMetadata(), and nidas::core::DSMSensor::printStatusHeader().
|
staticprotectedinherited |
Fetch a pointer to a static instance of a Looper thread.
Use this Looper for periodic callbacks, as for prompting, in support of a DSMSensor.
References nidas::core::DSMSensor::_looper, nidas::core::DSMSensor::_looperMutex, nidas::core::getSample(), and LOG_WARNING.
Referenced by nidas::dynld::isff::MOSMote::close(), nidas::dynld::isff::MOSMote::open(), nidas::core::SerialSensor::startPrompting(), and nidas::core::SerialSensor::stopPrompting().
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::getMaxSampleLength().
Referenced by nidas::core::DSMSensor::printStatus().
|
inlineinherited |
The maximum number of fields in any of the AsciiSscanfs for this CharacterSensor.
Prior to scanning a message, a sample of this size must be allocated.
References nidas::core::CharacterSensor::_maxScanfFields.
|
inlineinherited |
References nidas::core::CharacterSensor::_messageLength.
Referenced by nidas::core::CharacterSensor::buildSampleScanner(), buildSampleScanner(), nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::core::SerialSensor::open(), nidas::dynld::isff::CSAT3_Sonic::open(), and nidas::core::RemoteSerialConnection::setSensor().
|
inlineinherited |
Get message separator with backslash sequences replaced by their intended character.
References nidas::core::CharacterSensor::_messageSeparator.
Referenced by nidas::core::CharacterSensor::buildSampleScanner(), buildSampleScanner(), nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::core::SerialSensor::open(), nidas::dynld::isff::CSAT3_Sonic::open(), nidas::dynld::raf::PSI9116_Sensor::open(), nidas::dynld::isff::DAUSensor::process(), and nidas::dynld::raf::CDP_Serial::validate().
|
inlineinherited |
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::getMinSampleLength().
Referenced by nidas::core::DSMSensor::printStatus().
|
inlinevirtualinherited |
Return a name that should fully identify this sensor.
This name could be used in informative messages. The returned name has this format: dsmName:deviceName.
References nidas::core::DSMSensor::getDeviceName(), and nidas::core::DSMSensor::getDSMName().
Referenced by nidas::core::SensorHandler::add(), nidas::dynld::isff::WisardMote::addMoteSampleTag(), nidas::core::SamplePipeline::addSampleClient(), nidas::dynld::iss::TiltSensor::addSampleTag(), nidas::dynld::iss::WICORSensor::addSampleTag(), nidas::core::DSMSensor::addSampleTag(), nidas::core::SerialSensor::buildSampleScanner(), buildSampleScanner(), nidas::dynld::raf::A2D_Serial::checkCkSum(), nidas::dynld::isff::WisardMote::checkCRC(), nidas::dynld::isff::WisardMote::checkEOM(), nidas::dynld::isff::ATIK_Sonic::checkSampleTags(), nidas::dynld::isff::CSAT3_Sonic::checkSampleTags(), nidas::dynld::isff::CSI_IRGA_Sonic::checkSampleTags(), nidas::dynld::raf::A2DBoardTempSensor::close(), nidas::dynld::raf::PPT_Serial::close(), nidas::core::SamplePipeline::connect(), nidas::dynld::raf::CVIProcessor::connectSource(), nidas::dynld::isff::WisardMote::createSampleTags(), nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::dynld::raf::LamsSensor::derivedDataNotify(), nidas::core::RemoteSerialConnection::doEscCmds(), nidas::dynld::raf::A2D_Serial::dumpConfig(), nidas::dynld::raf::PSI9116_Sensor::executeXmlRpc(), nidas::core::CharacterSensor::fromDOMElement(), nidas::core::DSMSensor::fromDOMElement(), nidas::dynld::raf::Arinc_IRS::fromDOMElement(), nidas::dynld::raf::DSMArincSensor::fromDOMElement(), nidas::dynld::raf::DSMMesaSensor::fromDOMElement(), nidas::dynld::raf::IRIGSensor::fromDOMElement(), nidas::core::SerialSensor::fromDOMElement(), nidas::dynld::isff::Wind2D::fromDOMElement(), nidas::dynld::raf::LamsSensor::fromDOMElement(), nidas::core::SensorHandler::PolledDSMSensor::getName(), nidas::dynld::GPS_Novatel_Serial::gps_to_utc(), nidas::dynld::isff::NCAR_TRH::handleRawRH(), nidas::dynld::isff::NCAR_TRH::handleRawT(), nidas::core::SensorHandler::incrementFullBufferReads(), nidas::core::CharacterSensor::init(), nidas::dynld::DSC_Event::init(), nidas::dynld::ParoSci_202BG_P::init(), nidas::dynld::ParoSci_202BG_T::init(), nidas::dynld::raf::A2D_Serial::init(), nidas::dynld::raf::DSMArincSensor::init(), nidas::dynld::raf::UHSAS_Serial::init(), nidas::dynld::WxtSensor::init(), nidas::dynld::raf::TwoD64_USB::init_parameters(), nidas::dynld::raf::TwoD64_USB_v3::init_parameters(), nidas::dynld::raf::TwoD_USB::init_parameters(), nidas::dynld::raf::TwoDS::init_parameters(), nidas::core::TimetagAdjuster::log(), nidas::dynld::isff::MOSMote::MOS_TimeSyncer::looperNotify(), nidas::core::SerialSensor::open(), nidas::dynld::DSC_A2DSensor::open(), nidas::dynld::isff::CSAT3_Sonic::open(), nidas::dynld::ModbusRTU::open(), nidas::dynld::raf::A2DBoardTempSensor::open(), nidas::dynld::raf::AlicatSDI::open(), nidas::dynld::raf::DSMAnalogSensor::open(), nidas::dynld::raf::LamsSensor::open(), nidas::dynld::raf::PIP_Serial::open(), nidas::dynld::raf::TwoD_USB::open(), nidas::dynld::raf::UHSAS_Serial::open(), nidas::dynld::raf::VCSEL2_Serial::open(), nidas::dynld::raf::VCSEL_Serial::open(), nidas::dynld::raf::A2D_Serial::parseConfigLine(), nidas::dynld::isff::ATIK_Sonic::parseParameters(), nidas::dynld::isff::CSAT3_Sonic::parseParameters(), nidas::dynld::isff::CSI_IRGA_Sonic::parseParameters(), nidas::dynld::isff::Wind3D::parseParameters(), nidas::dynld::DSC_Event::printStatus(), nidas::dynld::DSC_FreqCounter::printStatus(), nidas::dynld::DSC_PulseCounter::printStatus(), nidas::dynld::raf::DSMArincSensor::printStatus(), nidas::dynld::raf::LamsSensor::printStatus(), nidas::dynld::raf::TwoD_USB::printStatus(), nidas::core::DSMSensor::printStatusHeader(), nidas::dynld::iss::TiltSensor::process(), nidas::dynld::isff::WisardMote::process(), nidas::dynld::isff::CSI_IRGA_Sonic::process(), nidas::dynld::raf::PPT_Serial::process(), nidas::dynld::raf::PSI9116_Sensor::process(), nidas::dynld::raf::UDPArincSensor::process(), nidas::dynld::raf::UHSAS_Serial::process(), nidas::dynld::raf::TwoD64_USB::processImageRecord(), nidas::dynld::isff::CSAT3_Sonic::querySonic(), nidas::core::SampleScanner::readBuffer(), nidas::core::DatagramSampleScanner::readBuffer(), nidas::core::SampleScanner::readBuffer(), nidas::dynld::raf::A2D_Serial::readConfig(), nidas::dynld::isff::WisardMote::readHead(), nidas::dynld::DSC_FreqCounter::readParams(), nidas::dynld::ParoSci_202BG_P::readParams(), nidas::dynld::ParoSci_202BG_T::readParams(), nidas::core::DSMSensor::readSamples(), nidas::dynld::isff::CU_Coldwire::reportBadChecksum(), nidas::dynld::isff::CSI_CRX_Binary::reportBadCRC(), nidas::dynld::isff::CSI_IRGA_Sonic::reportBadCRC(), nidas::core::SensorOpener::run(), nidas::dynld::WxtSensor::scanSample(), nidas::dynld::raf::PSI9116_Sensor::sendCommand(), nidas::dynld::raf::DSMMesaSensor::sendFPGACodeToDriver(), nidas::dynld::raf::SppSerial::sendInitPacketAndCheckAck(), nidas::dynld::raf::BCPD_Serial::sendInitString(), nidas::dynld::raf::CDP_Serial::sendInitString(), nidas::dynld::raf::PIP_Serial::sendInitString(), nidas::dynld::raf::SPP100_Serial::sendInitString(), nidas::dynld::raf::SPP200_Serial::sendInitString(), nidas::dynld::raf::SPP300_Serial::sendInitString(), nidas::dynld::raf::UHSAS_Serial::sendInitString(), nidas::dynld::isff::CSAT3_Sonic::sendRateCommand(), nidas::dynld::raf::TwoD_USB::sendTrueAirspeed(), nidas::core::DSMConfig::sensorFromDOMElement(), nidas::dynld::DSC_A2DSensor::setGainBipolar(), nidas::dynld::raf::DSMAnalogSensor::setGainBipolar(), nidas::core::CharacterSensor::setMessageParameters(), nidas::core::RemoteSerialConnection::setSensor(), PConfig::showAll(), nidas::core::CharacterSensor::startPrompting(), nidas::core::CharacterSensor::stopPrompting(), nidas::dynld::isff::CSAT3_Sonic::terminalMode(), nidas::dynld::isff::WisardMote::unpackTsoil(), nidas::core::CharacterSensor::validate(), nidas::core::DSMSensor::validate(), nidas::core::Site::validate(), nidas::dynld::A2DSensor::validate(), nidas::dynld::DSC_A2DSensor::validate(), nidas::dynld::DSC_FreqCounter::validate(), nidas::dynld::DSC_PulseCounter::validate(), validate(), nidas::dynld::GPS_Novatel_Serial::validate(), nidas::dynld::IEEE_Float::validate(), nidas::dynld::isff::CSI_CRX_Binary::validate(), nidas::dynld::isff::CU_Coldwire::validate(), nidas::dynld::isff::NCAR_TRH::validate(), nidas::dynld::isff::Wind2D::validate(), nidas::dynld::isff::WisardMote::validate(), nidas::dynld::ModbusRTU::validate(), nidas::dynld::raf::A2D_Serial::validate(), nidas::dynld::raf::AlicatSDI::validate(), nidas::dynld::raf::CDP_Serial::validate(), nidas::dynld::raf::DSMAnalogSensor::validate(), nidas::dynld::raf::PIP_Serial::validate(), nidas::dynld::raf::PSI9116_Sensor::validate(), nidas::dynld::raf::SPP100_Serial::validate(), nidas::dynld::raf::SPP200_Serial::validate(), nidas::dynld::raf::SPP300_Serial::validate(), nidas::dynld::raf::SppSerial::validate(), nidas::dynld::raf::TwoD64_USB_v3::validate(), nidas::dynld::raf::UDPArincSensor::validate(), nidas::dynld::raf::UDPiPMSensor::validate(), nidas::dynld::Uio48Sensor::validate(), nidas::core::DSMConfig::validateSensorAndSampleIds(), nidas::core::CharacterSensor::validateSscanfs(), nidas::dynld::isff::Wind2D::validateSscanfs(), nidas::dynld::isff::Wind3D::validateSscanfs(), nidas::core::MessageStreamScanner::warnBackwardsStepTimeTag(), nidas::core::MessageStreamScanner::warnNonIncrTimeTag(), nidas::dynld::WxtSensor::wxtValidateSscanfs(), nidas::dynld::raf::A2D_Serial::~A2D_Serial(), and nidas::dynld::raf::UHSAS_Serial::~UHSAS_Serial().
References nidas::core::DOMable::namespaceURI.
Referenced by nidas::dynld::UDPSampleOutput::getProjectDOM(), nidas::core::Dataset::toDOMElement(), nidas::core::ProjectConfig::toDOMElement(), nidas::core::Dataset::toDOMParent(), nidas::core::Datasets::toDOMParent(), nidas::core::ProjectConfig::toDOMParent(), nidas::core::ProjectConfigs::toDOMParent(), nidas::core::DSMConfig::toDOMParent(), nidas::core::DSMSensor::toDOMParent(), nidas::core::Project::toDOMParent(), nidas::core::SampleTag::toDOMParent(), nidas::core::Site::toDOMParent(), nidas::core::ServerSocket::toDOMParent(), nidas::core::Variable::toDOMParent(), nidas::core::Datasets::writeXML(), and nidas::core::ProjectConfigs::writeXML().
|
inlinevirtualinherited |
We'll allow derived classes and calibration applications to change the SampleTags, so this method returns a list of non-constant SampleTags.
References nidas::core::DSMSensor::_sampleTags.
|
inlineinherited |
References nidas::core::SampleScanner::getNullTerminate(), and nidas::core::DSMSensor::getSampleScanner().
Referenced by nidas::core::RemoteSerialConnection::setSensor().
|
inlineinherited |
How many samples have resulted in complete scanf failures - nothing parsed, because the sensor messages do not correspond to the sscanf format.
References nidas::core::CharacterSensor::_scanfFailures.
|
inlineinherited |
How many samples have been partially scanned, because a character in the middle of a message conflicts with the sscanf format.
References nidas::core::CharacterSensor::_scanfPartials.
|
inlineinherited |
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::getObservedDataRate().
Referenced by nidas::core::DSMSensor::printStatus().
|
inlineinherited |
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::getObservedSamplingRate().
Referenced by nidas::core::DSMSensor::printStatus().
Fetch a parameter by name.
Returns a NULL pointer if no such parameter exists.
References nidas::core::DSMSensor::_parameters.
Referenced by nidas::dynld::raf::LamsSensor::fromDOMElement(), nidas::dynld::raf::DSMArincSensor::init(), nidas::dynld::raf::TwoD_USB::init(), nidas::dynld::raf::TwoDS::init(), nidas::dynld::raf::UHSAS_Serial::init(), nidas::dynld::WxtSensor::init(), nidas::dynld::raf::TwoD_USB::init_parameters(), nidas::dynld::raf::TwoDS::init_parameters(), nidas::dynld::isff::MOSMote::open(), nidas::dynld::ModbusRTU::open(), nidas::dynld::raf::DSMAnalogSensor::open(), nidas::dynld::raf::UHSAS_Serial::open(), ExtractFast2D::run(), ExtractDMT::run(), nidas::dynld::raf::DSMMesaSensor::sendFPGACodeToDriver(), sensorTitle(), nidas::dynld::isff::WisardMote::validate(), nidas::dynld::raf::A2D_Serial::validate(), nidas::dynld::raf::AlicatSDI::validate(), nidas::dynld::raf::CDP_Serial::validate(), nidas::dynld::raf::PIP_Serial::validate(), nidas::dynld::raf::SPP100_Serial::validate(), nidas::dynld::raf::SPP200_Serial::validate(), nidas::dynld::raf::SPP300_Serial::validate(), nidas::dynld::raf::SppSerial::validate(), nidas::dynld::raf::UDPArincSensor::validate(), and nidas::dynld::raf::UDPiPMSensor::validate().
|
inlineinherited |
Get list of parameters.
References nidas::core::DSMSensor::_constParameters.
Referenced by nidas::dynld::isff::Wind2D::fromDOMElement(), nidas::dynld::isff::ATIK_Sonic::parseParameters(), nidas::dynld::isff::CSAT3_Sonic::parseParameters(), nidas::dynld::isff::CSI_IRGA_Sonic::parseParameters(), nidas::dynld::isff::Wind3D::parseParameters(), nidas::dynld::A2DSensor::validate(), nidas::dynld::DSC_FreqCounter::validate(), and nidas::dynld::IEEE_Float::validate().
|
inlinevirtualinherited |
Implementation of SampleSource::getProcessedSampleSource().
Return the SampleSource for processed samples from this DSMSensor.
Implements nidas::core::SampleSource.
Referenced by nidas::dynld::RawSampleService::schedule().
|
inlineprotectedinherited |
References nidas::core::CharacterSensor::_promptOffset.
Referenced by nidas::core::CharacterSensor::validate().
|
inlineprotectedinherited |
References nidas::core::CharacterSensor::_promptRate.
Referenced by nidas::core::CharacterSensor::validate().
References nidas::core::CharacterSensor::_prompts.
Referenced by nidas::core::SerialSensor::initPrompting(), and nidas::core::CharacterSensor::validate().
|
inlineprotectedinherited |
References nidas::core::CharacterSensor::_promptString.
Referenced by nidas::core::CharacterSensor::validate().
|
inlinevirtualinherited |
Implementation of SampleSource::getRawSampleSource().
Return the SampleSource for raw samples from this DSMSensor. A DSMSensor is only a SampleSource of raw samples when running in real-time, not during post-processing.
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_rawSource.
Referenced by nidas::core::RemoteSerialConnection::close(), and nidas::dynld::RawSampleService::schedule().
Convenience function to get my one-and-only raw SampleTag().
Equivalent to: getRawSampleSource()->getSampleTags()->front()
References nidas::core::DSMSensor::_rawSampleTag.
Referenced by nidas::core::SamplePipeline::addSampleClient(), nidas::core::SamplePipeline::addSampleClientForTag(), nidas::dynld::RawSampleService::connect(), nidas::dynld::RawSampleService::fromDOMElement(), nidas::dynld::raf::SyncServer::initSensors(), nidas::core::SamplePipeline::removeSampleClient(), nidas::core::SamplePipeline::removeSampleClientForTag(), DataStats::run(), DataPrep::run(), and StatsProcess::run().
References nidas::core::DSMSensor::_iodev, and nidas::core::IODevice::getReadFd().
Referenced by nidas::dynld::IR104_Relays::clearOutputs(), nidas::core::SensorHandler::PolledDSMSensor::getFd(), nidas::dynld::IR104_Relays::getInputs(), nidas::dynld::IR104_Relays::getOutputs(), nidas::core::SerialSensor::open(), nidas::dynld::IR104_Relays::open(), nidas::dynld::DSC_Event::printStatus(), nidas::dynld::DSC_FreqCounter::printStatus(), nidas::dynld::DSC_PulseCounter::printStatus(), nidas::dynld::raf::DSMArincSensor::printStatus(), nidas::dynld::raf::TwoD_USB::printStatus(), nidas::dynld::raf::TwoDS::printStatus(), nidas::core::SampleScanner::readBuffer(), nidas::dynld::IR104_Relays::setOutputs(), and nidas::dynld::IR104_Relays::setOutputs().
|
inlineprotectedinherited |
|
inlinevirtualinherited |
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::getSampleStats().
|
inlinevirtualinherited |
Implements nidas::core::SampleSource.
Referenced by nidas::core::SamplePipeline::connect(), DataStats::createCounters(), nidas::core::SamplePipeline::disconnect(), nidas::core::CharacterSensor::doesAsciiSscanfs(), nidas::core::Site::findSensor(), nidas::dynld::raf::DSMMesaSensor::fromDOMElement(), nidas::dynld::raf::A2DBoardTempSensor::init(), nidas::dynld::WxtSensor::init(), PConfig::loadVariables(), parseAnalog(), parseOther(), DataPrep::run(), StatsProcess::run(), SampleDispatcher::SampleDispatcher(), DumpClient::setSensors(), PConfig::showAll(), and nidas::core::DSMSensor::toDOMParent().
|
inlineinherited |
Non-const method to get a list of non-const pointers to SampleTags.
References nidas::core::DSMSensor::_sampleTags.
|
inlinevirtualinherited |
Implementation of SampleSource::getSampleTags().
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::getSampleTags().
Referenced by nidas::dynld::isff::WisardMote::addMoteSampleTag(), nidas::dynld::iss::TiltSensor::addSampleTag(), nidas::dynld::iss::WICORSensor::addSampleTag(), nidas::dynld::isff::ATIK_Sonic::checkSampleTags(), nidas::dynld::isff::CSAT3_Sonic::checkSampleTags(), nidas::dynld::isff::CSI_IRGA_Sonic::checkSampleTags(), nidas::dynld::isff::Wind3D::checkSampleTags(), nidas::core::DSMSensor::findVariableIndex(), nidas::core::DSMSensor::fromDOMElement(), nidas::dynld::raf::IRIGSensor::fromDOMElement(), nidas::core::SampleTagIterator::hasNext(), nidas::core::CharacterSensor::init(), nidas::dynld::DSC_Event::init(), nidas::dynld::raf::A2D_Serial::init(), nidas::dynld::raf::DSMArincSensor::init(), nidas::dynld::raf::TwoD_USB::init(), nidas::dynld::raf::TwoDS::init(), nidas::dynld::raf::UHSAS_Serial::init(), nidas::dynld::raf::TwoD64_USB::init_parameters(), nidas::dynld::raf::TwoD64_USB_v3::init_parameters(), nidas::dynld::raf::DSMArincSensor::open(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::iss::TiltSensor::process(), nidas::dynld::isff::CU_Coldwire::process(), nidas::dynld::isff::CSI_IRGA_Sonic::process(), nidas::dynld::isff::DAUSensor::process(), nidas::dynld::raf::A2D_Serial::process(), nidas::dynld::raf::SyncRecordSource::selectVariablesFromSensor(), PConfig::showCalFiles(), nidas::core::CharacterSensor::validate(), nidas::dynld::A2DSensor::validate(), nidas::dynld::DSC_FreqCounter::validate(), nidas::dynld::DSC_PulseCounter::validate(), validate(), nidas::dynld::GPS_Novatel_Serial::validate(), nidas::dynld::IEEE_Float::validate(), nidas::dynld::isff::CSI_CRX_Binary::validate(), nidas::dynld::isff::CU_Coldwire::validate(), nidas::dynld::isff::Licor7500::validate(), nidas::dynld::isff::NCAR_TRH::validate(), nidas::dynld::isff::Wind2D::validate(), nidas::dynld::isff::WisardMote::validate(), nidas::dynld::ModbusRTU::validate(), nidas::dynld::raf::A2D_Serial::validate(), nidas::dynld::raf::DSMAnalogSensor::validate(), nidas::dynld::raf::PSI9116_Sensor::validate(), nidas::dynld::raf::SppSerial::validate(), nidas::dynld::raf::TwoD64_USB_v3::validate(), nidas::dynld::Uio48Sensor::validate(), and nidas::core::DSMConfig::validateSensorAndSampleIds().
|
inlineinherited |
Return the list of AsciiSscanfs requested for this CharacterSensor.
This list is only valid after the init() method has been called.
References nidas::core::CharacterSensor::_sscanfers.
Referenced by nidas::dynld::isff::CSI_IRGA_Sonic::checkSampleTags(), nidas::dynld::raf::UHSAS_Serial::init(), nidas::dynld::WxtSensor::init(), nidas::dynld::isff::ATIK_Sonic::process(), nidas::dynld::isff::Wind2D::validateSscanfs(), nidas::dynld::isff::Wind3D::validateSscanfs(), and nidas::dynld::WxtSensor::wxtValidateSscanfs().
References nidas::core::DSMSensor::_id, and GET_SPS_ID.
Referenced by nidas::core::Site::findSensor(), nidas::core::DSMSensor::fromDOMElement(), nidas::dynld::isff::CSAT3_Sonic::open(), ARLIngest::prepareHeaderIds(), nidas::dynld::isff::WisardMote::process(), nidas::core::SampleScanner::readBuffer(), nidas::core::DSMSensor::readSamples(), sensorTitle(), PConfig::showAll(), PConfig::showSensorClasses(), nidas::core::DSMSensor::validate(), nidas::core::Site::validate(), nidas::core::DSMConfig::validateSensorAndSampleIds(), nidas::core::MessageStreamScanner::warnBackwardsStepTimeTag(), and nidas::core::MessageStreamScanner::warnNonIncrTimeTag().
What Site am I associated with?
References nidas::core::DSMSensor::_dsm.
Referenced by SampleCounter::collectMetadata(), and nidas::core::DSMSensor::fromDOMElement().
|
inlineinherited |
References nidas::core::DSMSensor::_station.
Referenced by nidas::core::DSMSensor::fromDOMElement().
|
inlineinherited |
Sensor suffix, which is added to variable names.
It is only necessary to have a sensor suffix to make variable names unique. For example, if there are multiple sensors at the same height, with common variable names, then one can use a sensor suffix to make unique names. The sensor suffix is the second dot-separated word in a variable name, where only the first word is required: variable[.sensor][.height][.site]
References nidas::core::DSMSensor::_suffix.
Referenced by nidas::core::DSMSensor::fromDOMElement(), nidas::core::DSMSensor::MyDictionary::getTokenValue(), nidas::dynld::raf::TwoD64_USB::processImageRecord(), sensorTitle(), nidas::core::DSMSensor::setDepth(), nidas::core::DSMSensor::setDepth(), nidas::core::DSMSensor::setHeight(), and nidas::core::DSMSensor::setHeight().
|
inlineinherited |
Get a read-only copy of the Termios.
References nidas::core::SerialSensor::_termios.
Referenced by nidas::dynld::ModbusRTU::open(), and nidas::core::RemoteSerialConnection::setSensor().
|
inlineinherited |
References nidas::core::DSMSensor::_nTimeouts.
Referenced by nidas::core::DSMSensor::close().
|
inlineinherited |
Implement a lookup for tokens that I know about, like $HEIGHT.
For other tokens, call getDSMConfig()->getTokenValue(token,value);
References nidas::core::DSMSensor::_dictionary, and nidas::core::DSMSensor::MyDictionary::getTokenValue().
|
inlinevirtualinherited |
Get the type name of this sensor.
References nidas::core::DSMSensor::_typeName.
|
inherited |
If the underlying IODevice is a SerialPortIODevice, return the value of SerialPortIODevice::getUsecsPerByte(), otherwise return 0, which means no timetag correction for transmission delay will be applied.
References nidas::core::SerialSensor::_serialDevice, and nidas::core::SerialPortIODevice::getUsecsPerByte().
Referenced by nidas::core::SerialSensor::buildSampleScanner(), and buildSampleScanner().
|
inherited |
References nidas::core::DSMSensor::_iodev, and nidas::core::IODevice::getWriteFd().
Referenced by nidas::dynld::isff::MOSMote::MOS_TimeSyncer::looperNotify(), and nidas::core::SerialSensor::open().
|
inlineinherited |
References nidas::core::DSMSensor::_nTimeouts.
Referenced by nidas::core::SensorOpener::run().
|
virtualinherited |
Initialize the CharacterSensor instance for post-processing.
This should only be done after the CharacterSensor has been initialized with fromDOMElement. Calls validateSscanfs.
nidas::util::InvalidParameterException |
Reimplemented from nidas::core::DSMSensor.
Reimplemented in nidas::dynld::IEEE_Float, nidas::dynld::isff::DAUSensor, nidas::dynld::ModbusRTU, nidas::dynld::raf::SidsNetSensor, nidas::dynld::raf::TwoDS, nidas::dynld::raf::UHSAS_Serial, and nidas::dynld::WxtSensor.
References nidas::core::CharacterSensor::_maxScanfFields, nidas::core::CharacterSensor::_nextSscanfer, nidas::core::CharacterSensor::_sscanfers, nidas::core::CharacterSensor::_ttadjusters, nidas::core::SampleTag::getId(), nidas::core::DSMSensor::getName(), nidas::core::AsciiSscanf::getNumberOfFields(), nidas::core::SampleTag::getRate(), nidas::core::getSample(), nidas::core::DSMSensor::getSampleTags(), nidas::core::SampleTag::getScanfFormat(), nidas::core::SampleTag::getTimetagAdjust(), nidas::core::SampleTag::getVariables(), nidas::core::DSMSensor::init(), nidas::util::replaceBackslashSequences(), nidas::core::AsciiSscanf::setFormat(), nidas::core::AsciiSscanf::setSampleTag(), and nidas::core::CharacterSensor::validateSscanfs().
Referenced by nidas::dynld::raf::BCPD_Serial::BCPD_Serial(), nidas::dynld::raf::CDP_Serial::CDP_Serial(), nidas::dynld::raf::A2D_Serial::init(), nidas::dynld::raf::TwoDS::init(), nidas::dynld::raf::UHSAS_Serial::init(), nidas::dynld::WxtSensor::init(), nidas::dynld::raf::CVI_LV_Input::open(), nidas::dynld::raf::PIP_Serial::PIP_Serial(), nidas::dynld::raf::SPP100_Serial::SPP100_Serial(), nidas::dynld::raf::SPP200_Serial::SPP200_Serial(), and nidas::dynld::raf::SPP300_Serial::SPP300_Serial().
|
protectedinherited |
Perform whatever is necessary to initialize prompting right after the device is opened.
nidas::util::IOException |
References nidas::core::SerialSensor::_prompters, nidas::core::CharacterSensor::getPrompts(), nidas::core::getSample(), nidas::core::CharacterSensor::isPrompted(), MSECS_PER_SEC, nidas::util::replaceBackslashSequences(), and nidas::core::SerialSensor::startPrompting().
Referenced by nidas::core::SerialSensor::open().
|
inlinevirtualinherited |
Perform an ioctl on the device.
request is an integer value which must be supported by the device. Normally this is a value from a header file for the device.
nidas::util::IOException |
References nidas::core::DSMSensor::_iodev, nidas::core::IODevice::ioctl(), and len.
Referenced by nidas::dynld::raf::IRIGSensor::checkClock(), nidas::dynld::IR104_Relays::clearOutputs(), nidas::dynld::DSC_A2DSensor::close(), nidas::dynld::DSC_PulseCounter::close(), nidas::dynld::raf::LamsSensor::derivedDataNotify(), nidas::dynld::IR104_Relays::getInputs(), nidas::dynld::raf::IRIGSensor::getIRIGTime(), nidas::dynld::IR104_Relays::getOutputs(), nidas::dynld::raf::DSMAnalogSensor::getTemp(), nidas::dynld::DSC_A2DSensor::open(), nidas::dynld::DSC_Event::open(), nidas::dynld::DSC_FreqCounter::open(), nidas::dynld::DSC_PulseCounter::open(), nidas::dynld::IR104_Relays::open(), nidas::dynld::raf::DSMAnalogSensor::open(), nidas::dynld::raf::DSMArincSensor::open(), nidas::dynld::raf::DSMMesaSensor::open(), nidas::dynld::raf::LamsSensor::open(), nidas::dynld::raf::TwoD_USB::open(), nidas::dynld::DSC_Event::printStatus(), nidas::dynld::DSC_FreqCounter::printStatus(), nidas::dynld::DSC_PulseCounter::printStatus(), nidas::dynld::raf::DSMArincSensor::printStatus(), nidas::dynld::raf::LamsSensor::printStatus(), nidas::dynld::raf::TwoD_USB::printStatus(), nidas::dynld::raf::DSMMesaSensor::sendFPGACodeToDriver(), nidas::dynld::raf::TwoD_USB::sendTrueAirspeed(), nidas::dynld::raf::IRIGSensor::setIRIGTime(), nidas::dynld::IR104_Relays::setOutputs(), and nidas::dynld::IR104_Relays::setOutputs().
Is this a prompted sensor.
Will be true if setPromptString() has been called with a non-empty string, and setPromptRate() has been called with a rate other than IRIG_ZERO_HZ.
References nidas::core::CharacterSensor::_prompted.
Referenced by nidas::core::SerialSensor::initPrompting(), nidas::core::RemoteSerialConnection::setSensor(), nidas::core::SerialSensor::startPrompting(), and nidas::core::SerialSensor::stopPrompting().
|
inlinevirtualinherited |
Is prompting active, i.e.
isPrompted() is true, and startPrompting has been called?
Reimplemented from nidas::core::CharacterSensor.
References nidas::core::SerialSensor::_prompting.
Extract the next sample from the buffer.
Returns a null pointer if there are no samples left in the buffer.
Reimplemented in nidas::dynld::raf::A2D_Serial, nidas::dynld::raf::AlicatSDI, and nidas::dynld::raf::UDPArincSensor.
References nidas::core::DSMSensor::_scanner, and nidas::core::SampleScanner::nextSample().
Referenced by nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::dynld::raf::AlicatSDI::nextSample(), nidas::dynld::raf::UDPArincSensor::nextSample(), nidas::dynld::isff::CSAT3_Sonic::querySonic(), nidas::core::DSMSensor::readSample(), nidas::core::DSMSensor::readSamples(), nidas::dynld::raf::UHSAS_Serial::sendInitString(), nidas::dynld::isff::CSAT3_Sonic::sendRateCommand(), and nidas::dynld::isff::CSAT3_Sonic::terminalMode().
Open the device connected to the sensor.
This calls CharacterSensor::open(), and then sets up the port prompting if it is required.
Reimplemented from nidas::core::CharacterSensor.
Reimplemented in nidas::dynld::raf::UHSAS_Serial, nidas::dynld::raf::VCSEL2_Serial, and nidas::dynld::raf::VCSEL_Serial.
References nidas::core::DSMSensor::getDeviceName(), nidas::core::CharacterSensor::getMessageLength(), nidas::core::CharacterSensor::getMessageSeparator(), nidas::core::DSMSensor::getName(), nidas::core::DSMSensor::getReadFd(), nidas::core::getSample(), nidas::core::DSMSensor::getWriteFd(), nidas::core::SerialSensor::initPrompting(), nidas::core::CharacterSensor::open(), and nidas::core::CharacterSensor::sendInitString().
Referenced by nidas::dynld::isff::CSAT3_Sonic::open(), nidas::dynld::isff::CSI_IRGA_Sonic::open(), nidas::dynld::isff::MOSMote::open(), nidas::dynld::ModbusRTU::open(), nidas::dynld::raf::A2D_Serial::open(), nidas::dynld::raf::AlicatSDI::open(), nidas::dynld::raf::PPT_Serial::open(), nidas::dynld::raf::UHSAS_Serial::open(), nidas::dynld::raf::VCSEL2_Serial::open(), and nidas::dynld::raf::VCSEL_Serial::open().
dsm_time_t GPS_NMEA_Serial::parseGGA | ( | const char * | input, | |||
double * | dout, | |||||
int | nvars, | |||||
dsm_time_t | ttraw ) | |||||
throw | ( | ) |
Parse GGA NMEA message.
If user asks for 10 variables this will parse the GGA and output these variables: seconds of day latitude longitude qual nsat hordil alt geoidht dage (seconds since last DGPS update) did (DGPS station number) If user asks for 7 variables this will parse the GGA and output these variables. latitude longitude qual nsat hordil alt geoidht If user asks for 2 variable this will parse the GGA and output these variables. qual hordil If user asks for 1 variable this will parse the GGA and output these variables. nsat
References nidas::core::doubleNAN, nidas::core::getSample(), MSECS_PER_DAY, MSECS_PER_SEC, USECS_PER_DAY, and USECS_PER_MSEC.
dsm_time_t GPS_NMEA_Serial::parseHDT | ( | const char * | input, | |||
double * | dout, | |||||
int | nvars, | |||||
dsm_time_t | ttraw ) | |||||
throw | ( | ) |
Parse HDT NMEA message.
True Heading in degrees.
References nidas::core::doubleNAN, and nidas::core::getSample().
dsm_time_t GPS_NMEA_Serial::parseRMC | ( | const char * | input, | |||
double * | dout, | |||||
int | nvars, | |||||
dsm_time_t | ttraw ) | |||||
throw | ( | ) |
Parse RMC NMEA record.
If user asks for 12 variables this will parse the RMC and output these variables: seconds of day receiver status latitude longitude sog cog vel ew vel ns day month year mag dev If user asks for 8 variables this will parse the RMC and output these variables. This is typically the case if a GGA record is also being parsed making some of the above variables redundant: receiver status sog cog vel ew vel ns day month year
If user asks for 6 variables this will parse the RMC and output these variables. receiver status sog cog vel ew vel ns rmclag, time difference in seconds between received sample time tag and the time stamped in the RMC record If user asks for 2 variable this will parse the RMC and output these variables. receiver status rmclag, time difference in seconds between received sample time tag and the date and time in the RMC record If user asks for 1 variable this will parse the RMC and output these variables. receiver status
References nidas::core::doubleNAN, nidas::core::getSample(), nidas::core::MS_PER_KNOT, MSECS_PER_SEC, nidas::util::UTime::toUsecs(), USECS_PER_MSEC, and USECS_PER_SEC.
|
virtualinherited |
Reimplemented from nidas::core::DSMSensor.
References nidas::core::getSample(), LOG_ERR, and nidas::core::DSMSensor::printStatus().
|
inherited |
|
inherited |
References nidas::core::getSample().
Referenced by nidas::core::DSMEngineStat::run().
|
virtual |
Virtual method that is called to convert a raw sample containing an ASCII NMEA message to a processed floating point sample.
These processed samples contain double precision rather than single precision values because the latitude and longitude reported by GPS's may have more than 7 digits of precision.
Reimplemented from nidas::core::CharacterSensor.
Reimplemented in nidas::dynld::GPS_Novatel_Serial.
References nidas::core::CHAR_ST, nidas::util::UTime::format(), nidas::core::getSample(), nidas::util::NMEAchecksumOK(), and WLOG.
Referenced by nidas::dynld::GPS_Novatel_Serial::process().
Read from the device (duh).
Behaves like the read(2) system call, without a file descriptor argument, and with an IOException.
nidas::util::IOException |
References nidas::core::DSMSensor::_iodev, len, and nidas::core::IODevice::read().
Referenced by main(), nidas::core::SampleScanner::readBuffer(), nidas::core::DatagramSampleScanner::readBuffer(), nidas::dynld::raf::PSI9116_Sensor::sendCommand(), nidas::dynld::raf::SppSerial::sendInitPacketAndCheckAck(), and nidas::dynld::raf::PSI9116_Sensor::stopStreams().
|
inlinevirtualinherited |
Read from the device with a timeout.
nidas::util::IOException |
References nidas::core::DSMSensor::_iodev, len, and nidas::core::IODevice::read().
|
inlineinherited |
Read into my SampleScanner's buffer.
nidas::util::IOException |
References nidas::core::DSMSensor::_scanner, nidas::core::getSample(), and nidas::core::SampleScanner::readBuffer().
Referenced by nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::dynld::raf::AlicatSDI::open(), nidas::dynld::isff::CSAT3_Sonic::querySonic(), nidas::dynld::raf::A2D_Serial::readConfig(), nidas::core::DSMSensor::readSample(), nidas::core::DSMSensor::readSamples(), nidas::dynld::raf::SppSerial::sendInitPacketAndCheckAck(), nidas::dynld::raf::UHSAS_Serial::sendInitString(), nidas::dynld::isff::CSAT3_Sonic::sendRateCommand(), and nidas::dynld::isff::CSAT3_Sonic::terminalMode().
Read into my SampleScanner's buffer.
nidas::util::IOException |
References nidas::core::DSMSensor::_scanner, nidas::core::getSample(), and nidas::core::SampleScanner::readBuffer().
|
virtualinherited |
Return the next sample.
Buffer(s) will be read if necessary.
nidas::util::IOException |
References nidas::core::getSample(), nidas::core::DSMSensor::nextSample(), and nidas::core::DSMSensor::readBuffer().
|
virtualinherited |
Read samples from my associated file descriptor, and distribute() them to my RawSampleClient's.
This method is called by SensorHander, when select/poll indicates that data is available on the file descriptor returned by getReadFd(). This is a convienence method which does a readBuffer() to read available data from the DSMSensor into a buffer, and then repeatedly calls nextSample() to extract all samples out of that buffer.
nidas::util::IOException; |
References nidas::core::DSMSensor::_rawSource, nidas::core::SampleSourceSupport::distribute(), DLOG, nidas::core::DSMSensor::getDSMConfig(), nidas::core::DSMSensor::getDSMId(), nidas::core::DSMSensor::getName(), nidas::core::getSample(), nidas::core::DSMSensor::getSensorId(), nidas::core::DSMSensor::nextSample(), and nidas::core::DSMSensor::readBuffer().
A DSMSensor can be used as a SampleClient, meaning it receives its own raw samples.
In real-time operations, a DSMSensor can be added as a raw SampleClient of itself, using addRawSampleClient(). In post-processing, a DSMSensor typically receives samples with its own sample id from a SampleSorter. receive() then applies further processing via the process() method.
Implements nidas::core::SampleClient.
References nidas::core::DSMSensor::_source, nidas::core::SampleSourceSupport::distribute(), nidas::core::getSample(), and nidas::core::DSMSensor::process().
|
inherited |
Remove all CalFiles.
References nidas::core::DSMSensor::_calFiles.
Referenced by nidas::core::DSMSensor::~DSMSensor().
|
inlinevirtualinherited |
Remove a SampleClient from this SampleSource This will also remove a SampleClient if it has been added with addSampleClientForTag().
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::removeSampleClient().
Referenced by nidas::core::SamplePipeline::removeSampleClient(), and nidas::core::SamplePipeline::removeSampleClientForTag().
|
inlinevirtualinherited |
Remove a SampleClient for a given SampleTag from this SampleSource.
The pointer to the SampleClient must remain valid, until after it is removed.
Implements nidas::core::SampleSource.
References nidas::core::DSMSensor::_source, and nidas::core::SampleSourceSupport::removeSampleClientForTag().
Referenced by nidas::core::SamplePipeline::removeSampleClientForTag().
DSMSensor does not provide public support for SampleSource::removeSampleTag(const SampleTag* val)
)
Implements nidas::core::SampleSource.
References nidas::core::getSample().
Remove val from the list of SampleTags, and delete it.
References nidas::core::DSMSensor::_sampleTags, nidas::core::DSMSensor::_source, nidas::core::getSample(), and nidas::core::SampleSourceSupport::removeSampleTag().
Referenced by nidas::dynld::isff::WisardMote::validate().
Whether to reopen this sensor on an IOException.
The base method returns true. Over-ride if a reopen should not be attempted.
|
protectedvirtualinherited |
Reimplemented in nidas::dynld::WxtSensor.
References nidas::core::AsciiSscanf::getNumberOfFields(), and nidas::core::AsciiSscanf::sscanf().
|
protectedinherited |
Search through the AsciiSscanf instances attached to this sensor, looking for the next scanner which parses at least one variable from the given raw sample.
The search picks up after the last scanner which matched a sample. The parsed values are added to a new Sample, and a pointer to the new Sample is returned. If stag_out is non-null, it is set to the SampleTag pointer for the AsciiSscanf which matched. If no scanners match this sample, then this returns null. The returned Sample has a reference which must be freed by the caller or passed on. Any unparsed variables in the returned sample are filled with NaN using trimUnparsed(). The time tag of the new Sample is set to the time of raw sample samp
. No other time tag adjustments or variable conversions are applied, that is up to the caller.
References nidas::core::CHAR_ST, nidas::core::AsciiSscanf::getFormat(), nidas::core::SampleTag::getId(), nidas::core::AsciiSscanf::getNumberOfFields(), nidas::core::getSample(), nidas::core::AsciiSscanf::getSampleTag(), nidas::util::LogMessage::log(), and LOG_DEBUG.
Referenced by nidas::dynld::isff::NCAR_TRH::process(), and nidas::core::CharacterSensor::process().
|
virtualinherited |
nidas::util::IOException |
Reimplemented in nidas::dynld::raf::BCPD_Serial, nidas::dynld::raf::CDP_Serial, nidas::dynld::raf::PIP_Serial, nidas::dynld::raf::SPP100_Serial, nidas::dynld::raf::SPP200_Serial, nidas::dynld::raf::SPP300_Serial, and nidas::dynld::raf::UHSAS_Serial.
References DLOG, nidas::core::DSMSensor::getDeviceName(), nidas::core::CharacterSensor::getInitString(), nidas::util::replaceBackslashSequences(), and nidas::core::DSMSensor::write().
Referenced by nidas::core::SerialSensor::open().
References nidas::core::DSMSensor::_applyVariableConversions, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
|
inlinevirtualinherited |
Set the name of the catalog entry for this sensor.
References nidas::core::DSMSensor::_catalogName, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set the class name.
In the usual usage this method is not used, and getClassName() is over-ridden in a derived class to return a constant string.
References nidas::core::DSMSensor::_className, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set sensor depth below ground via a string which is added to variable names.
val | String containing sensor below and units in meters (m) or centimeters(cm), e.g. "5cm". This depth string is added to all the variable names, with a "." separator, so that a variable "Tsoil" for this sensor becomes "Tsoil.5cm". |
References nidas::core::DSMSensor::_depthString, nidas::core::DSMSensor::_height, nidas::core::DSMSensor::_heightString, nidas::core::floatNAN, nidas::core::getSample(), nidas::core::DSMSensor::getSuffix(), and nidas::core::DSMSensor::setFullSuffix().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set sensor depth below ground.
val | depth below ground, in meters. The depth is converted to centimeters and is added to all the variable names, with a "." separator, so that a variable "Tsoil" for this sensor becomes "Tsoil.5cm". |
References nidas::core::DSMSensor::_depthString, nidas::core::DSMSensor::_height, nidas::core::DSMSensor::_heightString, nidas::core::getSample(), nidas::core::DSMSensor::getSuffix(), and nidas::core::DSMSensor::setFullSuffix().
|
inlinevirtualinherited |
Set the name of the system device that the sensor is connected to.
val | Name of device, e.g. "/dev/xxx0". |
References nidas::core::DSMSensor::_devname, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement(), and main().
References nidas::core::DSMSensor::_driverTimeTagUsecs, and nidas::core::getSample().
Referenced by nidas::dynld::raf::DSMArincSensor::buildIODevice(), nidas::dynld::raf::DSMMesaSensor::buildIODevice(), nidas::dynld::raf::A2DBoardTempSensor::buildSampleScanner(), nidas::dynld::raf::DSMAnalogSensor::buildSampleScanner(), nidas::dynld::raf::IRIGSensor::buildSampleScanner(), and nidas::dynld::raf::LamsSensor::buildSampleScanner().
Set the DSMConfig for this sensor.
References nidas::core::DSMSensor::_dsm, nidas::core::getSample(), and nidas::core::DSMSensor::setDSMId().
Referenced by nidas::core::DSMConfig::sensorFromDOMElement(), and nidas::core::SensorHandler::~SensorHandler().
References nidas::core::DSMSensor::_id, and SET_DSM_ID.
Referenced by nidas::core::DSMSensor::setDSMConfig().
Set the duplicate ID attribute of this DSMSensor.
References nidas::core::DSMSensor::_duplicateIdOK, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set sensor height above ground via a string which is added to variable names.
val | String containing sensor height and units in meters (m) or centimeters(cm), e.g. "15m". This height string is added to all the variable names, with a "." separator, so that a variable "u" for this sensor becomes "u.15m". |
References nidas::core::DSMSensor::_depthString, nidas::core::DSMSensor::_height, nidas::core::DSMSensor::_heightString, nidas::core::floatNAN, nidas::core::getSample(), nidas::core::DSMSensor::getSuffix(), and nidas::core::DSMSensor::setFullSuffix().
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set sensor height above ground.
val | height above ground, in meters. The height is added to all the variable names, with a "." separator, so that a variable "u" for this sensor becomes "u.15m". |
References nidas::core::DSMSensor::_depthString, nidas::core::DSMSensor::_height, nidas::core::DSMSensor::_heightString, nidas::core::getSample(), nidas::core::DSMSensor::getSuffix(), and nidas::core::DSMSensor::setFullSuffix().
|
inlineinherited |
Set the various levels of the sensor identification.
A sensor ID is a 32-bit value comprised of four parts: 6-bit sample type id (not used by DSMSensor), 10-bit DSM id, and 16-bit sensor+sample ids.
References nidas::core::DSMSensor::_id, and SET_FULL_ID.
Set the initialization string(s) for this sensor.
The init string may contain backslash escape sequences like the prompt string.
References nidas::core::CharacterSensor::_initString, and nidas::core::getSample().
Referenced by nidas::core::CharacterSensor::fromDOMElement().
Set the IODevice for this sensor.
DSMSensor then owns the pointer and will delete it in its destructor.
References nidas::core::DSMSensor::_iodev, and nidas::core::getSample().
Set the sampling lag for this sensor in seconds.
This lag should then used to correct the timetags of the processed samples in the process() method of derived classes. Note that this lag is not used to alter the timetags of the raw samples. Raw samples are saved with the un-altered timetag that was determined at the moment they were sampled.
The lag is stored as a signed integer of microseconds, so lags should be between += 2147 seconds. No warning or exception is given if the value exceeds that limit. If your lag is greater than that I suggest you junk your sensor! A positive lag means one should adjust the sample time tags for this sensor earlier in time to achieve a better estimate of the actual time to be associated for each sample. A fixed sample lag, in fractional seconds, can be set for a sensor in the XML:
The DSMSensor::fromDOM() method parses this parameter and calls this method to set the lag. process() methods in derived classes must apply this lag value. The DSMSensor base class does not adjust time tags of processed samples.
References nidas::core::DSMSensor::_lag, nidas::core::getSample(), and USECS_PER_SEC.
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set desired latency, providing some control over the response time vs buffer efficiency tradeoff.
Setting a latency of 1/10 sec means buffer data in the driver for a 1/10 sec, then send the data to user space. Generally it should be set before doing a sensor open().
val | Latency, in seconds. |
nidas::util::InvalidParameterException |
References nidas::core::DSMSensor::_latency, and nidas::core::getSample().
Referenced by nidas::dynld::A2DSensor::A2DSensor(), nidas::core::DSMSensor::fromDOMElement(), and nidas::dynld::A2DSensor::validate().
References nidas::core::DSMSensor::_location, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
|
virtualinherited |
Set message separator and message length parameters, which are used to parse and time-tag samples from the IODevice.
Reimplemented from nidas::core::CharacterSensor.
References len, and nidas::core::CharacterSensor::setMessageParameters().
Referenced by nidas::dynld::isff::CSAT3_Sonic::open(), nidas::dynld::raf::SppSerial::sendInitPacketAndCheckAck(), nidas::dynld::raf::BCPD_Serial::sendInitString(), nidas::dynld::raf::CDP_Serial::sendInitString(), nidas::dynld::raf::PIP_Serial::sendInitString(), nidas::dynld::raf::SPP100_Serial::sendInitString(), nidas::dynld::raf::SPP200_Serial::sendInitString(), nidas::dynld::raf::SPP300_Serial::sendInitString(), nidas::dynld::isff::CSAT3_Sonic::terminalMode(), nidas::dynld::raf::CDP_Serial::validate(), and nidas::dynld::raf::PIP_Serial::validate().
References nidas::core::CharacterSensor::_promptOffset, and nidas::core::getSample().
Referenced by nidas::core::CharacterSensor::fromDOMElement().
Set the rate at which <sensor>
prompts are sent to this sensor.
This will be set on a CharacterSensor if a <prompt>
element is found for <sensor>
, not as a sub-element of <sample>
.
References nidas::core::CharacterSensor::_promptRate, and nidas::core::getSample().
Referenced by nidas::core::CharacterSensor::fromDOMElement().
|
inlineprotectedinherited |
Set the <sensor>
prompt string for this sensor.
The prompt string may contain backslash escape sequences and null characters, so be carefull when copying to a char*.
References nidas::core::CharacterSensor::_promptString, and nidas::core::getSample().
Referenced by nidas::core::CharacterSensor::fromDOMElement().
|
inlineinherited |
Set the SampleScanner for this sensor.
DSMSensor then owns the pointer and will delete it in its destructor.
References nidas::core::DSMSensor::_scanner, and nidas::core::getSample().
References nidas::core::DSMSensor::_id, and SET_SPS_ID.
Referenced by nidas::core::DSMSensor::fromDOMElement().
Set the sensor timeout value in milliseconds.
A value of 0 means no timeout (e.g. infinite). If no data is received for this period, then the sensor is closed, and re-opened. For efficiency reasons, the system may not actually detect a sensor timeout of less than 1 second, so setting it to less than 1000 milliseconds will likely not reduce the time before a sensor timeout is detected.
References nidas::core::DSMSensor::_timeoutMsecs, and nidas::core::getSample().
Referenced by nidas::core::RemoteSerialConnection::close(), nidas::core::RemoteSerialConnection::doEscCmds(), nidas::core::DSMSensor::fromDOMElement(), and nidas::dynld::ModbusRTU::open().
Set the type name of this sensor, e.g.: "ACME Model 99 Mach7 Particle Disambiguator".
This is meant for descriptive purposes only, and is not meant to change the behavior of a sensor object.
References nidas::core::DSMSensor::_typeName, and nidas::core::getSample().
Referenced by nidas::core::DSMSensor::fromDOMElement().
|
protectedinherited |
Shutdown prompting, typically done when a device is closed.
nidas::util::IOException |
References nidas::core::SerialSensor::_prompters, nidas::core::getSample(), and nidas::core::SerialSensor::stopPrompting().
Referenced by nidas::core::SerialSensor::close().
|
virtualinherited |
Start the prompters.
They can be started and stopped multiple times once a SerialSensor is opened.
nidas::util::IOException |
Reimplemented from nidas::core::CharacterSensor.
References nidas::core::SerialSensor::_prompters, nidas::core::SerialSensor::_prompting, nidas::core::DSMSensor::getLooper(), nidas::core::getSample(), and nidas::core::CharacterSensor::isPrompted().
Referenced by nidas::core::SerialSensor::initPrompting().
|
virtualinherited |
nidas::util::IOException |
Reimplemented from nidas::core::CharacterSensor.
References nidas::core::SerialSensor::_prompters, nidas::core::SerialSensor::_prompting, nidas::core::DSMSensor::getLooper(), nidas::core::getSample(), and nidas::core::CharacterSensor::isPrompted().
Referenced by nidas::core::SerialSensor::shutdownPrompting().
|
inlineinherited |
Expose the Termios.
One must call applyTermios() to apply any changes to the serial port.
References nidas::core::SerialSensor::_termios.
Referenced by nidas::core::RemoteSerialConnection::doEscCmds(), and nidas::dynld::ModbusRTU::open().
|
virtualinherited |
xercesc::DOMException; |
Reimplemented from nidas::core::DOMable.
Referenced by nidas::core::DSMSensor::toDOMParent().
|
virtualinherited |
xercesc::DOMException |
Reimplemented from nidas::core::DOMable.
References nidas::core::DOMable::getNamespaceURI(), nidas::core::getSample(), nidas::core::DSMSensor::getSampleTagIterator(), nidas::core::SampleTagIterator::hasNext(), nidas::core::DSMSensor::toDOMElement(), and nidas::core::SampleTag::toDOMParent().
Referenced by nidas::core::DSMConfig::toDOMElement().
|
protectedinherited |
Fill with floatNAN all the values past nparsed
values in output sample outs
, and trim the length of the sample to match the length of the variables in SampleTag stag
.
process() methods which support partial scans of messages can use this to finalize an output sample according to the SampleTag that was matched with it and the number of values parsed.
References nidas::core::floatNAN, fp, nidas::core::getSample(), and nidas::core::SampleTag::getVariables().
Referenced by nidas::dynld::iss::WICORSensor::process().
nidas::util::IOException |
|
virtual |
nidas::util::InvalidParameterException |
Reimplemented from nidas::core::CharacterSensor.
Reimplemented in nidas::dynld::GPS_Novatel_Serial.
References _allowedSampleIds, _ggaId, _ggaNvars, _hdtId, _hdtNvars, _rmcId, _rmcNvars, nidas::core::SampleTag::getId(), nidas::core::DSMSensor::getName(), nidas::core::getSample(), nidas::core::SampleTag::getSampleId(), nidas::core::DSMSensor::getSampleTags(), nidas::core::SampleTag::getVariables(), GGA_SAMPLE_ID, HDT_SAMPLE_ID, and RMC_SAMPLE_ID.
Referenced by nidas::dynld::GPS_Novatel_Serial::validate().
|
virtualinherited |
Virtual method to check that the Sscanfs for this CharacterSensor are OK.
The default implementation checks that the number of parse fields in each sscanf parser matches the number of variables in the associated output sample.
nidas::util::InvalidParameterException |
Reimplemented in nidas::dynld::isff::Wind2D, nidas::dynld::isff::Wind3D, and nidas::dynld::WxtSensor.
References nidas::core::CharacterSensor::_sscanfers, nidas::core::DSMSensor::getName(), nidas::core::AsciiSscanf::getNumberOfFields(), nidas::core::getSample(), nidas::core::AsciiSscanf::getSampleTag(), nidas::core::SampleTag::getVariables(), and LOG_WARNING.
Referenced by nidas::core::CharacterSensor::init().
|
inlinevirtualinherited |
Write to the device (duh).
Behaves like write(2) system call, without a file descriptor argument, and with an IOException.
nidas::util::IOException |
References nidas::core::DSMSensor::_iodev, len, and nidas::core::IODevice::write().
Referenced by nidas::dynld::isff::CSAT3_Sonic::dataMode(), nidas::dynld::isff::MOSMote::MOS_TimeSyncer::looperNotify(), nidas::dynld::isff::CSAT3_Sonic::open(), nidas::dynld::raf::AlicatSDI::open(), nidas::dynld::isff::CSAT3_Sonic::querySonic(), nidas::dynld::raf::A2D_Serial::readConfig(), nidas::dynld::raf::VCSEL_Serial::sendAmbientTemperature(), nidas::dynld::raf::PSI9116_Sensor::sendCommand(), nidas::dynld::raf::AlicatSDI::sendFlow(), nidas::dynld::raf::SppSerial::sendInitPacketAndCheckAck(), nidas::core::CharacterSensor::sendInitString(), nidas::dynld::raf::UHSAS_Serial::sendInitString(), nidas::dynld::isff::CSAT3_Sonic::sendRateCommand(), nidas::dynld::raf::VCSEL2_Serial::sendTemperaturePressure(), and nidas::dynld::isff::CSAT3_Sonic::terminalMode().
|
protected |
Derived classes should add their supported sample ids to the map, along with a short descriptive name, so that addSampleTag() does not throw an exception on an unrecognized id.
Referenced by validate().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::getCatalogName(), and nidas::core::DSMSensor::setCatalogName().
|
privateinherited |
Class name attribute of this sensor.
Only used here for informative messages.
Referenced by nidas::core::DSMSensor::getClassName(), and nidas::core::DSMSensor::setClassName().
List of const pointers to Parameters for providing via getParameters().
Referenced by nidas::core::DSMSensor::addParameter(), and nidas::core::DSMSensor::getParameters().
|
privateinherited |
Referenced by nidas::core::DSMSensor::getDefaultMode(), and nidas::core::DSMSensor::setDefaultMode().
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::getDeviceName(), and nidas::core::DSMSensor::setDeviceName().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::getDuplicateIdOK(), and nidas::core::DSMSensor::setDuplicateIdOK().
|
privateinherited |
|
privateinherited |
Concatenation of sensor suffix, and the height or depth string.
Referenced by nidas::core::DSMSensor::getFullSuffix(), and nidas::core::DSMSensor::setFullSuffix().
|
protected |
Full sample id of GGA variables.
Referenced by validate().
|
protected |
Number of variables requested from GGA record (sample id == 1)
Referenced by validate().
|
protected |
Full sample id of HDT variables.
Referenced by validate().
|
protected |
Number of variables requested from HDT record (sample id == 3)
Referenced by validate().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Id of this sensor.
Raw samples from this sensor will have this id.
Referenced by nidas::core::DSMSensor::getDSMId(), nidas::core::DSMSensor::getId(), nidas::core::DSMSensor::getSensorId(), nidas::core::DSMSensor::setDSMId(), nidas::core::DSMSensor::setId(), and nidas::core::DSMSensor::setSensorId().
|
privateinherited |
String that is sent once after sensor is opened.
Referenced by nidas::core::CharacterSensor::getInitString(), and nidas::core::CharacterSensor::setInitString().
|
privateinherited |
Referenced by nidas::core::DSMSensor::close(), nidas::core::DSMSensor::getBytesAvailable(), nidas::core::DSMSensor::getIODevice(), nidas::core::DSMSensor::getReadFd(), nidas::core::DSMSensor::getWriteFd(), nidas::core::DSMSensor::ioctl(), nidas::core::DSMSensor::open(), nidas::core::DSMSensor::read(), nidas::core::DSMSensor::read(), nidas::core::DSMSensor::setIODevice(), nidas::core::DSMSensor::write(), and nidas::core::DSMSensor::~DSMSensor().
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::getLatency(), and nidas::core::DSMSensor::setLatency().
|
privateinherited |
Referenced by nidas::core::DSMSensor::getLocation(), and nidas::core::DSMSensor::setLocation().
|
staticprivateinherited |
Referenced by nidas::core::DSMSensor::deleteLooper(), and nidas::core::DSMSensor::getLooper().
|
staticprivateinherited |
Referenced by nidas::core::DSMSensor::deleteLooper(), and nidas::core::DSMSensor::getLooper().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::CharacterSensor::init().
|
privateinherited |
|
protectedinherited |
Whether this sensor is allowed to be opened.
Most cases the answer is yes/true. But certain sensors should not be opened due to implementation. e.g. DSMArincSensor when used in conjunction with the UDPArincSensor for then Alta ENET appliance.
The fallout from setting this to false is that the sensor will not be added to SensorHandler.
Referenced by nidas::core::DSMSensor::allowOpen(), and nidas::dynld::raf::DSMArincSensor::fromDOMElement().
|
privateinherited |
Map of parameters by name.
Referenced by nidas::core::DSMSensor::addParameter(), nidas::core::DSMSensor::getParameter(), and nidas::core::DSMSensor::~DSMSensor().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::CharacterSensor::addPrompt(), and nidas::core::CharacterSensor::getPrompts().
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::fromDOMElement(), and nidas::core::DSMSensor::getRawSampleTag().
|
privateinherited |
|
protected |
Full sample id of RMC variables.
Referenced by validate().
|
protected |
Number of variables requested from RMC record (sample id == 2)
Referenced by validate().
|
privateinherited |
Should the RTS line on this port be controled for half-duplex 485? See SerialPortIODevice.h.
Referenced by nidas::core::SerialSensor::buildIODevice(), and nidas::core::SerialSensor::fromDOMElement().
|
privateinherited |
Referenced by nidas::core::DSMSensor::addSampleTag(), nidas::core::DSMSensor::fromDOMElement(), nidas::core::DSMSensor::getNonConstSampleTags(), nidas::core::DSMSensor::getSampleTags(), nidas::core::DSMSensor::removeSampleTag(), nidas::core::DSMSensor::setStation(), and nidas::core::DSMSensor::~DSMSensor().
|
privateinherited |
Referenced by nidas::core::CharacterSensor::getNumScanfFailures().
|
privateinherited |
Referenced by nidas::core::CharacterSensor::getNumScanfPartials().
|
privateinherited |
Referenced by nidas::core::DSMSensor::calcStatistics(), nidas::core::DSMSensor::clearBuffer(), nidas::core::DSMSensor::getBadTimeTagCount(), nidas::core::DSMSensor::getMaxSampleLength(), nidas::core::DSMSensor::getMinSampleLength(), nidas::core::DSMSensor::getObservedDataRate(), nidas::core::DSMSensor::getObservedSamplingRate(), nidas::core::DSMSensor::getSampleScanner(), nidas::core::DSMSensor::nextSample(), nidas::core::DSMSensor::open(), nidas::core::DSMSensor::readBuffer(), nidas::core::DSMSensor::readBuffer(), nidas::core::DSMSensor::setSampleScanner(), and nidas::core::DSMSensor::~DSMSensor().
|
privateinherited |
|
privateinherited |
Non-null if the underlying IODevice is a SerialPortIODevice.
Referenced by nidas::core::SerialSensor::applyTermios(), nidas::core::SerialSensor::buildIODevice(), and nidas::core::SerialSensor::getUsecsPerByte().
|
privateinherited |
Referenced by nidas::core::DSMSensor::addSampleClient(), nidas::core::DSMSensor::addSampleClientForTag(), nidas::core::DSMSensor::addSampleTag(), nidas::core::DSMSensor::getClientCount(), nidas::core::DSMSensor::getSampleStats(), nidas::core::DSMSensor::getSampleTags(), nidas::core::DSMSensor::receive(), nidas::core::DSMSensor::removeSampleClient(), nidas::core::DSMSensor::removeSampleClientForTag(), and nidas::core::DSMSensor::removeSampleTag().
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::getStation(), and nidas::core::DSMSensor::setStation().
|
privateinherited |
Sensor suffix, which is added to variable names.
Referenced by nidas::core::DSMSensor::getSuffix(), and nidas::core::DSMSensor::setSuffix().
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::DSMSensor::getTimeoutMsecs(), and nidas::core::DSMSensor::setTimeoutMsecs().
|
protectedinherited |
|
protected |
Timetag set by parseGGA and parseRMC, used by parseHDT.
Referenced by nidas::dynld::GPS_Novatel_Serial::gps_to_utc().
|
privateinherited |
Referenced by nidas::core::DSMSensor::getTypeName(), and nidas::core::DSMSensor::setTypeName().
|
staticprivateinherited |
Referenced by nidas::core::DOMable::getNamespaceURI().
Referenced by nidas::core::DSMSensor::printStatus(), and nidas::core::DSMSensor::printStatusHeader().