NetOceanDirect  1.31.0
OceanDirect .NET API
Public Member Functions | Static Public Member Functions
NetOceanDirect::RawBus Class Reference

Inherits NetOceanDirect::ManagedObject< RawBusAPI >.

Public Member Functions

array< unsigned char > accessEthRead (long deviceID, int% errorCode, int bufferLength)
 
int accessEthWrite (long deviceID, int% errorCode, array< unsigned char >^% buffer, int bufferLength)
 
array< unsigned char > accessUsbRead (long deviceID, int% errorCode, int bufferLength, unsigned char endpoint)
 
int accessUsbWrite (long deviceID, int% errorCode, array< unsigned char >^% buffer, int bufferLength, unsigned char endpoint)
 
String getStringDescriptor (long deviceID, int% errorCode, int index)
 
- Public Member Functions inherited from NetOceanDirect::ManagedObject< RawBusAPI >
 ManagedObject (RawBusAPI *instance)
 
RawBusAPI * GetInstance ()
 

Static Public Member Functions

static RawBus getInstance ()
 

Additional Inherited Members

- Protected Attributes inherited from NetOceanDirect::ManagedObject< RawBusAPI >
RawBusAPI * m_Instance
 

Member Function Documentation

◆ accessEthRead()

array< unsigned char > RawBus::accessEthRead ( long  deviceID,
int%  errorCode,
int  bufferLength 
)

Reads data from the specified device over Ethernet.

Parameters
[in]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
[in]bufferLengththe number of bytes to read from the device
Returns
a tracked handle to a new array (of length bufferLength) containing the data read from the device

◆ accessEthWrite()

int RawBus::accessEthWrite ( long  deviceID,
int%  errorCode,
array< unsigned char >^%  buffer,
int  bufferLength 
)

Writes data to the specified device over Ethernet.

Parameters
[in]deviceIDthe device ID for the device to be written to (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
[in]buffera buffer of length bufferLength containing the data to be written to the device
[in]bufferLengththe number of bytes to read from the device
Returns
the number of bytes written to the device, or 0 if an error occurred

◆ accessUsbRead()

array< unsigned char > RawBus::accessUsbRead ( long  deviceID,
int%  errorCode,
int  bufferLength,
unsigned char  endpoint 
)

Reads data directly from the USB endpoint through which the given device is attached.

Parameters
[in]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
[in]bufferLengththe number of bytes to read from the device
[in]endpointthe USB endpoint from which to read
Returns
a tracked handle to a new array (of length bufferLength) containing the data read from the device

◆ accessUsbWrite()

int RawBus::accessUsbWrite ( long  deviceID,
int%  errorCode,
array< unsigned char >^%  buffer,
int  bufferLength,
unsigned char  endpoint 
)

Writes data directly to the USB endpoint through which the given device is attached.

Parameters
[in]deviceIDthe device ID for the device to be written to (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
[in]buffera buffer of length bufferLength containing the data to be written to the device
[in]bufferLengththe number of bytes to read from the device
[in]endpointthe USB endpoint from which to read
Returns
the number of bytes written to the device, or 0 if an error occurred

◆ getStringDescriptor()

String RawBus::getStringDescriptor ( long  deviceID,
int%  errorCode,
int  index 
)

Reads the USB device descriptor reported by the given device.

Parameters
[in]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
[in]indexthe index of the descriptor to be read
Returns
the requested descriptor, or an empty string if an error occurred

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