asyn 4-30
Public Member Functions
asynOctetClient Class Reference

Class for asyn port clients to communicate on the asynOctet interface. More...

#include <asynPortClient.h>

Inheritance diagram for asynOctetClient:
asynPortClient

List of all members.

Public Member Functions

 asynOctetClient (const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
 Constructor for asynOctetClient class.
virtual ~asynOctetClient ()
 Destructor for asynOctetClient class.
virtual asynStatus write (const char *buffer, size_t bufferLen, size_t *nActual)
 Writes a char buffer to the port driver.
virtual asynStatus read (char *buffer, size_t bufferLen, size_t *nActual, int *eomReason)
 Reads a char buffer from the port driver.
virtual asynStatus writeRead (const char *writeBuffer, size_t writeBufferLen, char *readBuffer, size_t readBufferLen, size_t *nBytesOut, size_t *nBytesIn, int *eomReason)
 Writes a char buffer to the port driver and reads the response as an atomic operation.
virtual asynStatus flush ()
 Flushes the input buffer in the port driver.
virtual asynStatus setInputEos (const char *eos, int eosLen)
 Sets the input end-of-string terminator in the driver.
virtual asynStatus getInputEos (char *eos, int eosSize, int *eosLen)
 Gets the input end-of-string terminator from the driver.
virtual asynStatus setOutputEos (const char *eos, int eosLen)
 Sets the output end-of-string terminator in the driver.
virtual asynStatus getOutputEos (char *eos, int eosSize, int *eosLen)
 Gets the output end-of-string terminator from the driver.
virtual asynStatus registerInterruptUser (interruptCallbackOctet pCallback)
 Registers an interruptCallbackOctet function that the driver will call when there is a new value.

Detailed Description

Class for asyn port clients to communicate on the asynOctet interface.


Constructor & Destructor Documentation

asynOctetClient::asynOctetClient ( const char *  portName,
int  addr,
const char *  drvInfo,
double  timeout = DEFAULT_TIMEOUT 
) [inline]

Constructor for asynOctetClient class.

Parameters:
[in]portNameThe name of the asyn port to connect to
[in]addrThe address on the asyn port to connect to
[in]drvInfoThe drvInfo string to identify which property of the port is being connected to
[in]timeoutThe default timeout for all communications between the client and the port driver
virtual asynOctetClient::~asynOctetClient ( ) [inline, virtual]

Destructor for asynOctetClient class.

Disconnects from port, frees resources.


Member Function Documentation

virtual asynStatus asynOctetClient::flush ( ) [inline, virtual]

Flushes the input buffer in the port driver.

virtual asynStatus asynOctetClient::getInputEos ( char *  eos,
int  eosSize,
int *  eosLen 
) [inline, virtual]

Gets the input end-of-string terminator from the driver.

Parameters:
[out]eosThe input EOS string
[out]eosSizeThe maximum size of the EOS string
[out]eosLenThe actual size of the EOS string
virtual asynStatus asynOctetClient::getOutputEos ( char *  eos,
int  eosSize,
int *  eosLen 
) [inline, virtual]

Gets the output end-of-string terminator from the driver.

Parameters:
[out]eosThe output EOS string
[out]eosSizeThe maximum size of the EOS string
[out]eosLenThe actual size of the EOS string
virtual asynStatus asynOctetClient::read ( char *  buffer,
size_t  bufferLen,
size_t *  nActual,
int *  eomReason 
) [inline, virtual]

Reads a char buffer from the port driver.

Parameters:
[out]bufferThe characters read from the port driver
[in]bufferLenThe size of the buffer
[out]nActualThe number of characters actually read
[out]eomReasonThe end of message reason, i.e. why the read terminated
virtual asynStatus asynOctetClient::registerInterruptUser ( interruptCallbackOctet  pCallback) [inline, virtual]

Registers an interruptCallbackOctet function that the driver will call when there is a new value.

Parameters:
[in]pCallbackThe address of the callback function
virtual asynStatus asynOctetClient::setInputEos ( const char *  eos,
int  eosLen 
) [inline, virtual]

Sets the input end-of-string terminator in the driver.

Parameters:
[in]eosThe input EOS string
[in]eosLenThe size of the EOS string
virtual asynStatus asynOctetClient::setOutputEos ( const char *  eos,
int  eosLen 
) [inline, virtual]

Sets the output end-of-string terminator in the driver.

Parameters:
[in]eosThe output EOS string
[in]eosLenThe size of the EOS string
virtual asynStatus asynOctetClient::write ( const char *  buffer,
size_t  bufferLen,
size_t *  nActual 
) [inline, virtual]

Writes a char buffer to the port driver.

Parameters:
[in]bufferThe characters to write to the port driver
[in]bufferLenThe size of the buffer
[out]nActualThe number of characters actually written
virtual asynStatus asynOctetClient::writeRead ( const char *  writeBuffer,
size_t  writeBufferLen,
char *  readBuffer,
size_t  readBufferLen,
size_t *  nBytesOut,
size_t *  nBytesIn,
int *  eomReason 
) [inline, virtual]

Writes a char buffer to the port driver and reads the response as an atomic operation.

Parameters:
[in]writeBufferThe characters to write to the port driver
[in]writeBufferLenThe size of the write buffer
[out]readBufferThe characters read from the port driver
[in]readBufferLenThe size of the read buffer
[out]nBytesOutThe number of characters actually written
[out]nBytesInThe number of characters actually read
[out]eomReasonThe end of message reason, i.e. why the read terminated

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