class DAQSocket The DAQD socket class
| | rate_bps_pair pair representing data rate (in Hz) & byte per sample |
| | channellist list of channels: map between channel name and rate/pbs pair |
| | Channel_iter channel list iterator |
| | mChannel List of channel names to be read |
| | DAQSocket () Construct an unopened socket |
| | DAQSocket (const char* ipaddr, int ipport = DAQD_PORT, int RcvBufferLen = 16384) Create a socket and connect it to a server |
| | ~DAQSocket () Disconnect and close a socket |
| | open (const char* ipaddr, int ipport = DAQD_PORT, int RcvBufferLen = 16384) Open an existing socket and connect it to a server |
| | close () Disconnect and close a socket |
| | flush () flushes the input data from the socket |
| | isOpen () const true if socket is open and connected |
| | StopWriter () Stop a data writer |
| | RequestFrames () Start reading frame data |
| | RequestOnlineData (bool fast = false, long timeout = -1) Start reading CDS data |
| | RequestData (unsigned long start, unsigned long duration, long timeout = -1) Start reading CDS data |
| | RequestTrend (unsigned long start, unsigned long duration, bool mintrend = false, long timeout = -1) Start reading CDS trend data |
| | RequestNames (long timeout = -1) Start reading file names |
| | WaitforData (bool poll = false) Wait for data to arrive |
| | AddChannel (const char* chan, rate_bps_pair rb = rate_bps_pair (0, 0)) Add a channel to the request list |
| | RmChannel (const char* chan) Remove a channel from the request list |
| | GetData (char* buf, int len, long timeout = -1) Receive block of data in the CDS proprietary format |
| | GetData (char** buf, long timeout = -1) Receive block of data in the CDS proprietary format |
| | GetName (char *buf, int len) Receive a file name |
| | GetFrame (char *buf, int len) Receive a data frame |
| | Available (DAQDChannel list[], int N) List all known channels |
| | setDebug (bool debug=true) Set debug mode |
| | TestOpen (void) Test that connection is open |
| | Version (void) Get the server version ID |
The DAQD socket class. DAQSocket provides a client interface to the Network Data Server. The server provides data in the CDS proprietary format or as standard frames. The interface may also be used to list channel names, or to specify the channels to be read in.
typedef std::map <std::string, rate_bps_pair> channellist
typedef channellist::iterator Channel_iter
channellist mChannel
DAQSocket()
explicit DAQSocket(const char* ipaddr, int ipport = DAQD_PORT, int RcvBufferLen = 16384)
~DAQSocket()
int open(const char* ipaddr, int ipport = DAQD_PORT, int RcvBufferLen = 16384)
void close()
void flush()
bool isOpen() const
int StopWriter()
int RequestFrames()
int RequestOnlineData(bool fast = false, long timeout = -1)
int RequestData(unsigned long start, unsigned long duration, long timeout = -1)
int RequestTrend(unsigned long start, unsigned long duration, bool mintrend = false, long timeout = -1)
int RequestNames(long timeout = -1)
int WaitforData(bool poll = false)
int AddChannel(const char* chan, rate_bps_pair rb = rate_bps_pair (0, 0))
void RmChannel(const char* chan)
int GetData(char* buf, int len, long timeout = -1)
int GetData(char** buf, long timeout = -1)
int GetName(char *buf, int len)
int GetFrame(char *buf, int len)
int Available(DAQDChannel list[], int N)
void setDebug(bool debug=true)
bool TestOpen(void)
float Version(void)
alphabetic index hierarchy of classes
Please send questions and comments to sigg_d@ligo-wa.caltech.edu
generated by doc++