NetOceanDirect  3.1.1
OceanDirect .NET API
Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
NetOceanDirect::LightSource Class Reference

Inherits NetOceanDirect::ManagedObject< LightSourceAPI >.

Public Member Functions

 LightSource (LightSourceAPI *instance)
 
int getCount (long deviceID, int% errorCode)
 
bool hasEnable (long deviceID, int% errorCode, int lightSourceIndex)
 
bool isEnabled (long deviceID, int% errorCode, int lightSourceIndex)
 
void setEnable (long deviceID, int% errorCode, int lightSourceIndex, bool enable)
 
int setLampEnable (long deviceID, int% errorCode, bool state)
 
- Public Member Functions inherited from NetOceanDirect::ManagedObject< LightSourceAPI >
 ManagedObject (LightSourceAPI *instance)
 
LightSourceAPI * GetInstance ()
 

Static Public Member Functions

static LightSource getInstance ()
 

Static Protected Attributes

static LightSource lsource
 

Additional Inherited Members

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

Member Function Documentation

◆ getCount()

int LightSource::getCount ( long  deviceID,
int%  errorCode 
)

Gets the number of light sources that are connected to the given device. Such light sources could be individual LEDs, light bulbs, lasers, etc. Each of these light sources may have different capabilities, such as programmable intensities and enables, which should be queried before they are used.

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
Returns
number of light sources connected to the given device

◆ hasEnable()

bool LightSource::hasEnable ( long  deviceID,
int%  errorCode,
int  lightSourceIndex 
)

Queries whether the indicated light source connected to the given device has a usable enable/disable control. If this returns 0 (meaning no enable available) then calling isEnabled() or setEnable() will fail.

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]lightSourceIndexthe index of the light source to query (should be < getCount())
Returns
true if specified light source has an enable/disable control, false otherwise also returns false if an error occurred
See also
isEnabled()
setEnable()

◆ isEnabled()

bool LightSource::isEnabled ( long  deviceID,
int%  errorCode,
int  lightSourceIndex 
)

Retrieves whether the specified light source connected to the given device is currently enabled. This function should not be called if hasEnable() returns false for this light source.

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]lightSourceIndexthe index of the light source to query (should be < getCount())
Returns
true if the specified light source is currently enabled, false otherwise also returns false if an error occurred
See also
hasEnable()
setEnable()

◆ setEnable()

void LightSource::setEnable ( long  deviceID,
int%  errorCode,
int  lightSourceIndex,
bool  enable 
)

Enables/disables the specified light source connected to the given device.

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]lightSourceIndexthe index of the light source to query (should be < getCount())
[in]enableif true, light source is to be enabled - will be disabled otherwise
See also
isEnabled()
hasEnable()

◆ setLampEnable()

int LightSource::setLampEnable ( long  deviceID,
int%  errorCode,
bool  state 
)

Sets the strobe enable state of the given device.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[in]statethe new strobe enable state (true for strobe enabled, false for strobe disabled)
Returns
0 if successful, a nonzero OceanDirect error code otherwise

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