Inherits NetOceanDirect::ManagedObject< LightSourceAPI >.
|
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) |
|
| ManagedObject (LightSourceAPI *instance) |
|
LightSourceAPI * | GetInstance () |
|
|
LightSourceAPI * | m_Instance |
|
◆ 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
-
- 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] | deviceID | the device ID for the device to be queried (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise |
[in] | lightSourceIndex | the 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] | deviceID | the device ID for the device to be queried (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise |
[in] | lightSourceIndex | the 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] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise |
[in] | lightSourceIndex | the index of the light source to query (should be < getCount()) |
[in] | enable | if 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] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[in] | state | the 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: