NetOceanDirectLighthouse 3.1.3
OceanDirect Lighthouse .NET API
NetLighthouse::NetLighthouseGpio Class Reference

#include <NetLighthouseGpio.h>

Inherits ManagedObject.

Public Member Functions

virtual ~NetLighthouseGpio ()
 
virtual unsigned char getNumberOfGPIO (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getOutputState (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getValue (unsigned int deviceID, int %errorCode)
 
virtual void setOutputState (unsigned int deviceID, int %errorCode, unsigned int direction, unsigned int bitmask)
 
virtual void setValue (unsigned int deviceID, int %errorCode, unsigned int value, unsigned int bitmask)
 

Static Public Member Functions

static NetLighthouseGpio getInstance ()
 

Protected Member Functions

 NetLighthouseGpio ()
 

Static Protected Attributes

static NetLighthouseGpio gpio
 

Constructor & Destructor Documentation

◆ NetLighthouseGpio()

NetLighthouseGpio::NetLighthouseGpio ( )
protected

◆ ~NetLighthouseGpio()

virtual NetLighthouse::NetLighthouseGpio::~NetLighthouseGpio ( )
inlinevirtual

Member Function Documentation

◆ getInstance()

NetLighthouseGpio NetLighthouseGpio::getInstance ( )
static

◆ getNumberOfGPIO()

unsigned char NetLighthouseGpio::getNumberOfGPIO ( unsigned int deviceID,
int % errorCode )
virtual

.getNumberOfGPIO Return the total number of GPIO pins.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the total number of GPIO pins (input and output) or 0 on error.

◆ getOutputState()

unsigned int NetLighthouseGpio::getOutputState ( unsigned int deviceID,
int % errorCode )
virtual

.getOutputState Return the direction (input or output) of the pins.

See also
setOutputState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
a value specifying the direction of the corresponding pin i.e. bit "n" determines the direction of the nth GPIO pin. A bit value of 0 specifes an input pin; a bit value of 1 specifies an output pin. A value of 0 will also be returned on error.

◆ getValue()

unsigned int NetLighthouseGpio::getValue ( unsigned int deviceID,
int % errorCode )
virtual

.getValue Return the value of the pins.

See also
setValue()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the values of the corresponding pin i.e. bit "n" determines the value of the nth GPIO pin. A value of 0 will also be returned on error.

◆ setOutputState()

void NetLighthouseGpio::setOutputState ( unsigned int deviceID,
int % errorCode,
unsigned int direction,
unsigned int bitmask )
virtual

.setOutputState Set the direction (input or output) of the pins specified by the supplied bitmask.

See also
getOutputState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
directionthe bits of this value determine the direction of the corresponding pin i.e. bit "n" determines the direction of the nth GPIO pin. A bit value of 0 specifes an input pin; a bit value of 1 specifies an output pin.
bitmaskthe bitmask determines which values of the direction parameter shall be used i.e. if the nth bit of the bitmask is 1 then the corresponding direction bit will be applied, if the bit is 0 the corresponding direction bit will not be applied.

◆ setValue()

void NetLighthouseGpio::setValue ( unsigned int deviceID,
int % errorCode,
unsigned int value,
unsigned int bitmask )
virtual

.setValue Set the value of the pins specified by the supplied bitmask.

See also
getValue()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
valuethe bits of this value determine the value of the corresponding pin i.e. bit "n" determines the value of the nth GPIO pin.
bitmaskthe bitmask determines which bits of the value parameter shall be used i.e. if the nth bit of the bitmask is 1 then the corresponding value bit will be applied, if the bit is 0 the corresponding value bit will not be applied.

Member Data Documentation

◆ gpio

NetLighthouseGpio NetLighthouse::NetLighthouseGpio::gpio
staticprotected

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