ACQ2XX_API
Data Structures | Public Member Functions
Dt100Transport Class Reference
Inheritance diagram for Dt100Transport:
Transport

Data Structures

struct  State

Public Member Functions

 Dt100Transport (const char *id)
 Transport implementation connects to dt100d service on card.
virtual ~Dt100Transport ()
virtual STATUS acqcmd (const char *command, char *response, int maxresponse)
 send an "acqcmd" (acquisition command or query) to the card.
virtual STATUS acq2sh (const char *command, char *response, int maxresponse)
 run a remote shell command or query.
virtual STATUS waitStateChange (int timeout, char *response, int maxresponse)
 block until remote state changes or timeout.
virtual STATUS readChannel (int channel, short *data, int nsamples, int start=0, int stride=1)
 read and output raw data for channel
virtual STATUS startStreaming (void)
 streaming interface: not all transports can do this.
virtual STATUS readStreamingFrame (Frame *frame, unsigned id)
 streaming interface: not all transports can do this.
virtual STATUS stopStreaming (void)

Detailed Description

Definition at line 59 of file Dt100Transport.cpp.


Constructor & Destructor Documentation

Dt100Transport::Dt100Transport ( const char *  id)

Transport implementation connects to dt100d service on card.

Definition at line 207 of file Dt100Transport.cpp.

References S_buf, S_BUFLEN, and verbose.

Dt100Transport::~Dt100Transport ( ) [virtual]

Definition at line 231 of file Dt100Transport.cpp.


Member Function Documentation

STATUS Dt100Transport::acq2sh ( const char *  command,
char *  response,
int  maxresponse 
) [virtual]

run a remote shell command or query.

Parameters:
command- the command (or query) to send
response- user buffer to collect response.
maxresponse- maximum response size required.
Parameters:
maxresponserun a remote shell command or query.
command- the command (or query) to send
response- user buffer to collect response.
maxresponse- maximum response size required.

Implements Transport.

Definition at line 257 of file Dt100Transport.cpp.

References connect_to(), die(), get_sock(), and signon().

Referenced by acqcmd().

STATUS Dt100Transport::acqcmd ( const char *  command,
char *  response,
int  maxresponse 
) [virtual]

send an "acqcmd" (acquisition command or query) to the card.

Parameters:
command- the command (or query) to send
response- user buffer to collect response.
maxresponse- maximum response size required.
Parameters:
maxresponsesend an "acqcmd" (acquisition command or query) to the card.
command- the command (or query) to send
response- user buffer to collect response.
maxresponse- maximum response size required.

Implements Transport.

Definition at line 238 of file Dt100Transport.cpp.

References acq2sh(), ACQCMD, and STATUS.

STATUS Dt100Transport::readChannel ( int  channel,
short *  data,
int  nsamples,
int  start = 0,
int  stride = 1 
) [virtual]

read and output raw data for channel

Parameters:
channel- channel number 1..N
data- caller's buffer
nsamples- max samples to read
start- start sample in data set
stride- stride [subsample] value
Returns:
actual samples returned or STATUS_ERR
Parameters:
strideread and output raw data for channel
channel- channel number 1..N
data- caller's buffer
nsamples- max samples to read
start- start sample in data set
stride- stride [subsample] value
Returns:
actual samples returned or STATUS_ERR

Implements Transport.

Definition at line 355 of file Dt100Transport.cpp.

References command, connect_to(), get_sock(), MAXREAD, readb(), readline(), sample_size, signon(), and SOCKET.

STATUS Dt100Transport::readStreamingFrame ( Frame frame,
unsigned  id 
) [virtual]

streaming interface: not all transports can do this.

Reimplemented from Transport.

Definition at line 422 of file Dt100Transport.cpp.

References Frame::buildFrame(), command, connect_to(), die(), Frame::frameSize(), get_sock(), prefix, Frame::sampleSize(), and signon().

STATUS Dt100Transport::startStreaming ( void  ) [virtual]

streaming interface: not all transports can do this.

Definition at line 417 of file Dt100Transport.cpp.

References STATUS_WORKTODO.

STATUS Dt100Transport::stopStreaming ( void  ) [virtual]

Reimplemented from Transport.

Definition at line 463 of file Dt100Transport.cpp.

STATUS Dt100Transport::waitStateChange ( int  timeout,
char *  response,
int  maxresponse 
) [virtual]

block until remote state changes or timeout.

Parameters:
maxresponseblock until remote state changes or timeout. @todo timeout not implemented

Implements Transport.

Definition at line 321 of file Dt100Transport.cpp.

References connect_to(), get_sock(), readline(), signon(), and STATCMD.


The documentation for this class was generated from the following file: