OceanDirect  1.31.0
OceanDirect C++/C API
oceandirect::api::RawBusAPI Class Reference

Public Member Functions

int accessEthRead (long deviceID, int *errorCode, unsigned char *buffer, unsigned int bufferLength)
 
int accessEthWrite (long deviceID, int *errorCode, unsigned char *buffer, unsigned int bufferLength)
 
int accessUsbRead (long deviceID, int *errorCode, unsigned char *buffer, unsigned int bufferLength, unsigned char endpoint)
 
int accessUsbWrite (long deviceID, int *errorCode, unsigned char *buffer, unsigned int bufferLength, unsigned char endpoint)
 
std::string getStringDescriptor (long deviceID, int *errorCode, int index)
 

Static Public Member Functions

static RawBusAPIgetInstance ()
 
static void shutdown ()
 

Member Function Documentation

◆ accessEthRead()

int oceandirect::api::RawBusAPI::accessEthRead ( long  deviceID,
int *  errorCode,
unsigned char *  buffer,
unsigned int  bufferLength 
)

Read raw bytes from the Ethernet port.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
bufferthe buffer to receive the bytes read from Ethernet.
bufferLengththe length of the buffer.
Returns
the number of bytes read into the buffer.

◆ accessEthWrite()

int oceandirect::api::RawBusAPI::accessEthWrite ( long  deviceID,
int *  errorCode,
unsigned char *  buffer,
unsigned int  bufferLength 
)

Write raw bytes to the Ethernet port.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
bufferthe buffer containing the bytes to write to Ethernet.
bufferLengththe length of the buffer.
Returns
the number of bytes written to the Ethernet port.

◆ accessUsbRead()

int oceandirect::api::RawBusAPI::accessUsbRead ( long  deviceID,
int *  errorCode,
unsigned char *  buffer,
unsigned int  bufferLength,
unsigned char  endpoint 
)

Read raw bytes from the USB port on a specfied endpoint.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
bufferthe buffer to receive the bytes read from USB.
bufferLengththe length of the buffer.
endpointthe USB endpoint to read the raw bytes from.
Returns
the number of bytes read into the buffer.

◆ accessUsbWrite()

int oceandirect::api::RawBusAPI::accessUsbWrite ( long  deviceID,
int *  errorCode,
unsigned char *  buffer,
unsigned int  bufferLength,
unsigned char  endpoint 
)

Write raw bytes to the USB port on a specfied endpoint.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
bufferthe buffer containing the bytes to write to USB.
bufferLengththe length of the buffer.
endpointthe USB endpoint to write the raw bytes to.
Returns
the number of bytes written to the endpoint.

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