ACQ2XX_API
Public Member Functions | Static Public Member Functions | Protected Member Functions
Transport Class Reference

#include <acq_transport.h>

Inheritance diagram for Transport:
Dt100Transport KddTransport SoapTransport HostdrvTransport

Public Member Functions

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

Static Public Member Functions

static TransportgetTransport (const char *id)
 Factory to create Transports.

Protected Member Functions

 Transport (const char *_id)
 protected Constructor - clients should not create directly.

Detailed Description

Definition at line 30 of file acq_transport.h.


Constructor & Destructor Documentation

Transport::Transport ( const char *  _id) [inline, protected]

protected Constructor - clients should not create directly.

Definition at line 34 of file acq_transport.h.

virtual Transport::~Transport ( ) [inline, virtual]

Definition at line 47 of file acq_transport.h.


Member Function Documentation

virtual STATUS Transport::acq2sh ( const char *  command,
char *  response,
int  maxresponse 
) [pure 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.

Implemented in Dt100Transport, KddTransport, HostdrvTransport, and SoapTransport.

Referenced by AcqType::getAcqType(), Acq2xx::getChannelRanges(), main(), Acq2xx::setPrePostMode(), and Acq2xx::setRoute().

STATUS Transport::acq2sh ( const char *  command) [inline]

run a remote shell command

Definition at line 69 of file acq_transport.h.

References acqcmd().

virtual STATUS Transport::acqcmd ( const char *  command,
char *  response,
int  maxresponse 
) [pure 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.

Implemented in Dt100Transport, KddTransport, and SoapTransport.

Referenced by acq2sh(), acqcmd(), Acq2xx::getAvailableChannels(), Acq2xx::getInternalClock(), Acq2xx::getNumSamples(), Acq2xx::getSelectedChannels(), Acq2xx::getState(), main(), Acq2xx::selectChannels(), Acq2xx::setAbort(), Acq2xx::setArm(), and Acq2xx::setInternalClock().

STATUS Transport::acqcmd ( const char *  command) [inline]

send an "acqcmd" (acquisition command) to the card

Definition at line 57 of file acq_transport.h.

References acqcmd().

Transport * Transport::getTransport ( const char *  id) [static]

Factory to create Transports.

responsibility of client to delete when done.

Parameters:
idTransport Factory. create appropriate Transport based on id. ]

Definition at line 37 of file acq_transport.cpp.

References Dt100TransportFactory::createTransport(), SoapTransportFactory::createTransport(), and KddTransportFactory::createTransport().

Referenced by main().

virtual STATUS Transport::readChannel ( int  channel,
short *  data,
int  nsamples,
int  start = 0,
int  stride = 1 
) [pure 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

Implemented in Dt100Transport, KddTransport, and SoapTransport.

Referenced by Acq2xx::readChannel().

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

streaming interface: not all transports can do this.

Reimplemented in Dt100Transport.

Definition at line 91 of file acq_transport.h.

References STATUS_FEATURE_NOT_IMPLEMENTED.

Referenced by Acq2xx::readStreamingFrame().

virtual STATUS Transport::stopStreaming ( void  ) [inline, virtual]

Reimplemented in Dt100Transport.

Definition at line 94 of file acq_transport.h.

References STATUS_FEATURE_NOT_IMPLEMENTED.

Referenced by Acq2xx::stopStreaming().

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

block until remote state changes or timeout.

Implemented in Dt100Transport, KddTransport, and SoapTransport.

Referenced by main().


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