nidas
v1.2-1520
|
Support for a GOES transmitter, implemented as an IOChannel. More...
#include <GOESXmtr.h>
Public Member Functions | |
GOESXmtr () | |
Constructor. More... | |
GOESXmtr (const GOESXmtr &) | |
Copy constructor. More... | |
virtual | ~GOESXmtr () |
Destructor. More... | |
const std::string & | getName () const |
void | setName (const std::string &val) |
void | setId (unsigned long val) |
unsigned long | getId () const |
void | setChannel (int val) |
int | getChannel () const |
void | setXmitInterval (long val) |
Set the transmission interval. More... | |
int | getXmitInterval () const |
void | setXmitOffset (long val) |
Set the transmission offset. More... | |
int | getXmitOffset () const |
virtual void | setRFBaud (long val)=0 throw (nidas::util::InvalidParameterException) |
Set the RF baud rate. More... | |
virtual int | getRFBaud () const =0 |
void | requestConnection (IOChannelRequester *rqstr) throw (nidas::util::IOException) |
Request a connection. More... | |
IOChannel * | connect () throw (nidas::util::IOException) |
Establish a connection. More... | |
void | setNonBlocking (bool val __attribute__((unused))) throw (nidas::util::IOException) |
bool | isNonBlocking () const throw (nidas::util::IOException) |
virtual void | open () throw (nidas::util::IOException) |
virtual void | init ()=0 throw (nidas::util::IOException) |
Initialize tranmitter. More... | |
virtual void | transmitData (const nidas::util::UTime &at, int configid, const Sample *)=0 throw (nidas::util::IOException) |
Queue a sample for writing to a GOES transmitter. More... | |
virtual unsigned long | checkId ()=0 throw (nidas::util::IOException) |
virtual int | checkClock ()=0 throw (nidas::util::IOException) |
Check transmitter clock, and correct it if necessary. More... | |
virtual void | reset ()=0 throw (nidas::util::IOException) |
virtual void | printStatus ()=0 throw () |
Request that transmitter status be printed to an output stream. More... | |
void | flush () throw (nidas::util::IOException) |
Default flush implementation does nothing. More... | |
void | close () throw (nidas::util::IOException) |
int | getFd () const |
void | setStatusFile (const std::string &val) |
const std::string & | getStatusFile () const |
void | fromDOMElement (const xercesc::DOMElement *node) throw (nidas::util::InvalidParameterException) |
Initialize myself from a xercesc::DOMElement. More... | |
virtual IOChannel * | clone () const =0 |
Derived classes must provide clone. More... | |
virtual void | setRequestType (enum McSocketRequest) |
virtual enum McSocketRequest | getRequestType () const |
virtual bool | isNewInput () const |
Some IOChannels, namely FileSet, which opens successive files, need to indicate when a read is from the start of a new file. More... | |
virtual int | getReconnectDelaySecs () const |
virtual void | setNonBlocking (bool val)=0 throw (nidas::util::IOException) |
virtual const ConnectionInfo & | getConnectionInfo () const |
What is the IP address of the host at the other end of the connection. More... | |
virtual void | setConnectionInfo (const ConnectionInfo &val) |
virtual size_t | getBufferSize () const throw () |
Return suggested buffer length. More... | |
virtual size_t | read (void *buf, size_t len)=0 throw (nidas::util::IOException) |
Physical read method which must be implemented in derived classes. More... | |
virtual size_t | write (const void *buf, size_t len)=0 throw (nidas::util::IOException) |
Physical write method which must be implemented in derived classes. More... | |
virtual size_t | write (const struct iovec *iov, int iovcnt)=0 throw (nidas::util::IOException) |
Physical write method which must be implemented in derived classes. More... | |
virtual dsm_time_t | createFile (dsm_time_t t, bool exact) |
Request that an IOChannel open a new file, with a name based on a time. More... | |
virtual bool | writeNidasHeader () const |
Should the NIDAS header be written to this IOChannel? NIDAS headers are not written to DatagramSockets, because there is no guarantee they will get there. More... | |
virtual void | setDSMConfig (const DSMConfig *val) |
What DSM is this IOChannel connected to? More... | |
virtual const DSMConfig * | getDSMConfig () const |
What DSM is this IOChannel connected to? May be NULL. More... | |
virtual xercesc::DOMElement * | toDOMParent (xercesc::DOMElement *parent, bool complete) const throw (xercesc::DOMException) |
Create a DOMElement and append it to the parent. More... | |
virtual xercesc::DOMElement * | toDOMElement (xercesc::DOMElement *node, bool complete) const throw (xercesc::DOMException) |
Add my content into a DOMElement. More... | |
Static Public Member Functions | |
static IOChannel * | createIOChannel (const xercesc::DOMElement *node) throw (nidas::util::InvalidParameterException) |
static const XMLCh * | getNamespaceURI () |
Protected Attributes | |
nidas::util::SerialPort | _port |
Private Attributes | |
unsigned long | _id |
int | _channel |
int | _xmitInterval |
int | _xmitOffset |
std::string | _statusFile |
Support for a GOES transmitter, implemented as an IOChannel.
GOESXmtr::GOESXmtr | ( | ) |
Constructor.
GOESXmtr::GOESXmtr | ( | const GOESXmtr & | x | ) |
Copy constructor.
|
virtual |
Destructor.
|
pure virtual |
Check transmitter clock, and correct it if necessary.
Implemented in nidas::dynld::isff::SE_GOESXmtr, and nidas::dynld::isff::SimGOESXmtr.
|
pure virtual |
Implemented in nidas::dynld::isff::SE_GOESXmtr, and nidas::dynld::isff::SimGOESXmtr.
|
pure virtualinherited |
Derived classes must provide clone.
Implemented in nidas::core::ServerSocket, nidas::core::FileSet, nidas::dynld::isff::SE_GOESXmtr, nidas::dynld::isff::SimGOESXmtr, nidas::core::DatagramSocket, nidas::core::Socket, nidas::core::McSocketUDP, nidas::core::UnixIOChannel, nidas::core::McSocket, nidas::dynld::psql::PSQLChannel, and nidas::core::MultipleUDPSockets.
|
inlinevirtual |
Implements nidas::core::IOChannel.
Reimplemented in nidas::dynld::isff::SE_GOESXmtr.
|
virtual |
Establish a connection.
On return, the connection has been established. It may return a new instance of an IOChannel.
Implements nidas::core::IOChannel.
References open().
|
inlinevirtualinherited |
Request that an IOChannel open a new file, with a name based on a time.
This should be implemented by derived classes which write to disk files. Other derived classes (e.g. sockets) can just use this default implementation - basically ignoring the request.
t | Time to use when creating file name. |
exact | Use exact time when creating file name, else the time is adjusted to an even time interval. |
Reimplemented in nidas::core::FileSet.
Referenced by nidas::core::IOStream::createFile().
|
staticinherited |
References nidas::core::DOMObjectFactory::createObject(), nidas::core::Socket::createSocket(), nidas::util::Process::expandEnvVars(), nidas::core::XDOMElement::getAttributeValue(), and nidas::core::XDOMElement::getNodeName().
Referenced by nidas::dynld::psql::PSQLSampleOutput::fromDOMElement(), nidas::core::DSMService::fromDOMElement(), nidas::dynld::isff::GOESOutput::fromDOMElement(), nidas::core::SampleOutputBase::fromDOMElement(), and nidas::dynld::SampleInputStream::fromDOMElement().
|
inlinevirtual |
Default flush implementation does nothing.
Reimplemented from nidas::core::IOChannel.
Reimplemented in nidas::dynld::isff::SE_GOESXmtr.
|
virtual |
Initialize myself from a xercesc::DOMElement.
Implements nidas::core::DOMable.
References nidas::util::Termios::EVEN, nidas::core::XDOMAttr::getName(), nidas::util::Termios::NONE, nidas::util::Termios::ODD, nidas::util::Termios::setBaudRate(), nidas::util::Termios::setDataBits(), nidas::util::Termios::setParity(), and nidas::util::Termios::setStopBits().
|
inlinevirtualinherited |
Return suggested buffer length.
Reimplemented in nidas::core::Socket, nidas::core::DatagramSocket, and nidas::core::MultipleUDPSockets.
Referenced by nidas::dynld::isff::PacketInputStream::init(), nidas::dynld::isff::PacketInputStream::PacketInputStream(), and nidas::dynld::SampleInputStream::SampleInputStream().
|
inline |
|
inlinevirtualinherited |
What is the IP address of the host at the other end of the connection.
If this IOChannel is not a socket then return INADDR_ANY, using the default constructor of an Inet4Address. Socket subclasses should override this.
Referenced by nidas::dynld::SampleInputStream::setIOChannel().
|
inlinevirtualinherited |
What DSM is this IOChannel connected to? May be NULL.
Referenced by nidas::core::FileSet::setDir(), and nidas::core::FileSet::setFileName().
|
inlinevirtual |
Implements nidas::core::IOChannel.
|
inline |
|
inlinevirtual |
Implements nidas::core::IOChannel.
Referenced by nidas::dynld::isff::SE_GOESXmtr::checkClock(), nidas::dynld::isff::SE_GOESXmtr::checkId(), nidas::dynld::isff::SE_GOESXmtr::checkStatus(), nidas::dynld::isff::SE_GOESXmtr::decodeClock(), nidas::dynld::isff::SE_GOESXmtr::detectModel(), nidas::dynld::isff::SE_GOESXmtr::doSelfTest(), nidas::dynld::isff::SE_GOESXmtr::getSelfTestResults(), nidas::dynld::isff::SE_GOESXmtr::recv(), nidas::dynld::isff::SE_GOESXmtr::reset(), nidas::dynld::isff::SE_GOESXmtr::testTransmitSE120(), nidas::dynld::isff::SE_GOESXmtr::tosleep(), and nidas::dynld::isff::SE_GOESXmtr::wakeup().
|
inlinestaticinherited |
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::ProjectConfig::toDOMParent(), nidas::core::Datasets::toDOMParent(), nidas::core::ProjectConfigs::toDOMParent(), nidas::core::DSMConfig::toDOMParent(), nidas::core::Project::toDOMParent(), nidas::core::Site::toDOMParent(), nidas::core::SampleTag::toDOMParent(), nidas::core::ServerSocket::toDOMParent(), nidas::core::Variable::toDOMParent(), nidas::core::DSMSensor::toDOMParent(), nidas::core::Datasets::writeXML(), and nidas::core::ProjectConfigs::writeXML().
|
inlinevirtualinherited |
Reimplemented in nidas::core::FileSet.
Referenced by nidas::core::SampleOutputBase::getReconnectDelaySecs().
|
inlinevirtualinherited |
Reimplemented in nidas::core::Socket, nidas::core::McSocketUDP, and nidas::core::McSocket.
|
pure virtual |
Implemented in nidas::dynld::isff::SimGOESXmtr, and nidas::dynld::isff::SE_GOESXmtr.
|
inline |
Referenced by nidas::dynld::isff::SE_GOESXmtr::printStatus().
|
inline |
|
inline |
|
pure virtual |
Initialize tranmitter.
Implemented in nidas::dynld::isff::SimGOESXmtr, and nidas::dynld::isff::SE_GOESXmtr.
Referenced by nidas::dynld::isff::GOESOutput::run().
|
inlinevirtualinherited |
Some IOChannels, namely FileSet, which opens successive files, need to indicate when a read is from the start of a new file.
This method is used by code which may need to do special things at the beginning of a file, like read a SampleInputHeader.
Reimplemented in nidas::core::UnixIOChannel, nidas::core::McSocketUDP, nidas::core::McSocket, nidas::core::Socket, nidas::core::DatagramSocket, and nidas::core::FileSet.
Referenced by nidas::core::IOStream::read().
|
inlinevirtual |
Implements nidas::core::IOChannel.
|
virtual |
Reimplemented in nidas::dynld::isff::SimGOESXmtr.
References _port, nidas::util::SerialPort::flushBoth(), and nidas::util::SerialPort::open().
|
pure virtual |
Request that transmitter status be printed to an output stream.
Implemented in nidas::dynld::isff::SE_GOESXmtr, and nidas::dynld::isff::SimGOESXmtr.
Referenced by nidas::dynld::isff::GOESOutput::run().
|
pure virtualinherited |
Physical read method which must be implemented in derived classes.
Returns the number of bytes written, which may be less than the number requested.
Implemented in nidas::dynld::isff::SE_GOESXmtr, nidas::core::ServerSocket, nidas::core::Socket, nidas::core::McSocket, nidas::core::FileSet, nidas::core::McSocketUDP, nidas::core::DatagramSocket, nidas::core::UnixIOChannel, nidas::dynld::isff::SimGOESXmtr, nidas::dynld::psql::PSQLChannel, and nidas::core::MultipleUDPSockets.
Referenced by nidas::core::IOStream::read().
|
virtual |
Request a connection.
Implements nidas::core::IOChannel.
|
pure virtual |
Implemented in nidas::dynld::isff::SE_GOESXmtr, and nidas::dynld::isff::SimGOESXmtr.
Referenced by nidas::dynld::isff::GOESOutput::run().
|
inline |
Referenced by main().
|
inlinevirtualinherited |
|
inlinevirtualinherited |
What DSM is this IOChannel connected to?
Referenced by nidas::core::SampleOutputBase::fromDOMElement(), nidas::core::SampleOutputBase::SampleOutputBase(), and nidas::core::SampleOutputBase::setIOChannel().
|
inline |
Referenced by main().
|
inlinevirtual |
Implements nidas::core::IOChannel.
Referenced by main().
|
pure virtualinherited |
|
inline |
|
inlinevirtualinherited |
Reimplemented in nidas::core::Socket, nidas::core::McSocketUDP, and nidas::core::McSocket.
Referenced by nidas::dynld::XMLConfigService::schedule().
|
pure virtual |
Set the RF baud rate.
val | RF baud, in bits/sec. |
Implemented in nidas::dynld::isff::SE_GOESXmtr, and nidas::dynld::isff::SimGOESXmtr.
|
inline |
|
inline |
Set the transmission interval.
val | Interval, in seconds. |
|
inline |
Set the transmission offset.
val | Offset, in seconds. |
|
virtualinherited |
Add my content into a DOMElement.
Reimplemented in nidas::core::DSMSensor, nidas::core::Variable, nidas::core::ServerSocket, nidas::core::SampleTag, nidas::core::Site, nidas::core::Project, and nidas::core::DSMConfig.
Referenced by nidas::core::ServerSocket::toDOMParent().
|
virtualinherited |
Create a DOMElement and append it to the parent.
Reimplemented in nidas::core::DSMSensor, nidas::core::Variable, nidas::core::ServerSocket, nidas::core::SampleTag, nidas::core::Site, nidas::core::Project, and nidas::core::DSMConfig.
|
pure virtual |
Queue a sample for writing to a GOES transmitter.
Implemented in nidas::dynld::isff::SimGOESXmtr, and nidas::dynld::isff::SE_GOESXmtr.
Referenced by nidas::dynld::isff::GOESOutput::run().
|
pure virtualinherited |
Physical write method which must be implemented in derived classes.
Returns the number of bytes written, which may be less than the number requested.
Implemented in nidas::dynld::isff::SE_GOESXmtr, nidas::core::ServerSocket, nidas::core::Socket, nidas::core::McSocket, nidas::core::McSocketUDP, nidas::core::FileSet, nidas::core::DatagramSocket, nidas::core::UnixIOChannel, nidas::dynld::isff::SimGOESXmtr, nidas::dynld::psql::PSQLChannel, and nidas::core::MultipleUDPSockets.
Referenced by nidas::core::IOStream::flush(), and nidas::dynld::AsciiOutput::printHeader().
|
pure virtualinherited |
Physical write method which must be implemented in derived classes.
Returns the number of bytes written, which may be less than the number requested.
Implemented in nidas::dynld::isff::SE_GOESXmtr, nidas::core::ServerSocket, nidas::core::Socket, nidas::core::McSocket, nidas::core::McSocketUDP, nidas::core::FileSet, nidas::core::DatagramSocket, nidas::core::UnixIOChannel, nidas::dynld::isff::SimGOESXmtr, and nidas::core::MultipleUDPSockets.
|
inlinevirtualinherited |
Should the NIDAS header be written to this IOChannel? NIDAS headers are not written to DatagramSockets, because there is no guarantee they will get there.
Reimplemented in nidas::core::DatagramSocket.
Referenced by nidas::dynld::SampleInputStream::setIOChannel().
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |