NetOceanDirect 3.1.3
OceanDirect .NET API
NetOceanDirect::SerialPort Class Reference

#include <SerialPort.h>

Inherits NetOceanDirect::ManagedObject< SerialPortAPI >.

Public Member Functions

 SerialPort (SerialPortAPI *instance)
 
virtual ~SerialPort ()
 
int getBaudRate (long deviceID, int %errorCode)
 
virtual unsigned char getSerialCommThresholdMode (long deviceID, int %errorCode)
 
void saveBaudRateSettings (long deviceID, int %errorCode)
 
void setBaudRate (long deviceID, int %errorCode, int baudRate)
 
virtual void setSerialCommThresholdMode (long deviceID, int %errorCode, unsigned char thresholdMode)
 
- Public Member Functions inherited from NetOceanDirect::ManagedObject< SerialPortAPI >
 ManagedObject (SerialPortAPI *instance)
 
 !ManagedObject ()
 
virtual ~ManagedObject ()
 
SerialPortAPI * GetInstance ()
 

Static Public Member Functions

static SerialPort getInstance ()
 

Protected Member Functions

 SerialPort ()
 

Static Protected Attributes

static SerialPort serialPort
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SerialPort() [1/2]

SerialPort::SerialPort ( )
protected

◆ SerialPort() [2/2]

SerialPort::SerialPort ( SerialPortAPI * instance)

◆ ~SerialPort()

virtual NetOceanDirect::SerialPort::~SerialPort ( )
inlinevirtual

Member Function Documentation

◆ getBaudRate()

int SerialPort::getBaudRate ( long deviceID,
int % errorCode )

Read the serial port baud rate..

See also
setBaudRate()
Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
Returns
the baud rate.

◆ getInstance()

SerialPort SerialPort::getInstance ( )
static

◆ getSerialCommThresholdMode()

unsigned char SerialPort::getSerialCommThresholdMode ( long deviceID,
int % errorCode )
virtual

Get the threshold mode of serial communication. The valid supported values are 0x10(RS-232) and 0x20(UART).

See also
setSerialCommThresholdMode()
Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
Returns
The threshold mode either 0x10 or 0x20.

◆ saveBaudRateSettings()

void SerialPort::saveBaudRateSettings ( long deviceID,
int % errorCode )

Save baud settings on flash.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise

◆ setBaudRate()

void SerialPort::setBaudRate ( long deviceID,
int % errorCode,
int baudRate )

Set the serial port baud rate.

See also
getBaudRate()
Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
[in]baudRatethe serial port baud rate

◆ setSerialCommThresholdMode()

void SerialPort::setSerialCommThresholdMode ( long deviceID,
int % errorCode,
unsigned char thresholdMode )
virtual

Set the threshold mode of serial communication. The valid supported values are 0x10(RS-232) and 0x20(UART).

See also
getSerialCommThresholdMode()
Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise
thresholdModeThe threshold mode either 0x10 or 0x20.

Member Data Documentation

◆ serialPort

SerialPort NetOceanDirect::SerialPort::serialPort
staticprotected

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