VisionBox .NET Library  1.7.10.0 (2024-04-16)
VIB_NET::Led Class Reference
+ Inheritance diagram for VIB_NET::Led:

Detailed Description

This class controls the status LEDs.

See class VIB::Led in the VisionBox Interface Library for a detailed description.

Examples

Public Types

enum  eLED_MODE
 LED mode definitions More...
 

Public Member Functions

void ConfigureGenerator (UInt32 GeneratorIndex, UInt32 BlinkCount, UInt32 ms_ton, UInt32 ms_toff, UInt32 ms_tpause)
 Configures the LED signal generator. More...
 
 Led ()
 Default constructor for the device object More...
 
void Reset ()
 Resets the device to default settings. More...
 
void Set (UInt32 Val, UInt32 BitMask)
 Sets the state of the LEDs. More...
 
void SetLED (UInt32 LEDIndex, Boolean OnOff)
 Sets the state of one LED. More...
 
void SetMode (UInt32 LEDIndex, eLED_MODE Mode)
 Sets the mode of one LED. More...
 
- Public Member Functions inherited from VIB_NET::iDevice
void Close ()
 Closes a device More...
 
bool isOpen ()
 Returns the open state of a device object More...
 
void Open ()
 Opens a device More...
 
void Open (unsigned int Index)
 Opens a device More...
 

Properties

UInt32 NumberOfLEDs [get]
 Holds number of LEDs. More...
 
virtual VIB_NET::eDEVICE_TYPE Type [get]
 Returns the device type for the current instance, see eDEVICE_TYPE More...
 
- Properties inherited from VIB_NET::iDevice
virtual VIB_NET::eDEVICE_TYPE Type [get]
 Returns the device type for the current instance, see eDEVICE_TYPE More...
 

Member Enumeration Documentation

◆ eLED_MODE

LED mode definitions

The mode is used with SetMode() to specify the source signal for the LED.

Enumerator
OFF 

LED off.

ON 

LED on.

GEN0 

LED Signal generator 0.

GEN1 

LED Signal generator 1.

RESET 

Reset.

SATA 

SATA activity.

CF 

CF (IDE) activity.

SATA_CF 

SATA or CF activity.

PCI 

PCI bus activity

SUN 

Internal RTCC bus activity.

RS232 

RS-232 activity.

RS422 

RS-422 activity.

Constructor & Destructor Documentation

◆ Led()

VIB_NET::Led::Led ( )

Default constructor for the device object

The device must be opened with Open() before it can be used.

Member Function Documentation

◆ ConfigureGenerator()

void VIB_NET::Led::ConfigureGenerator ( UInt32  GeneratorIndex,
UInt32  BlinkCount,
UInt32  ms_ton,
UInt32  ms_toff,
UInt32  ms_tpause 
)

Configures the LED signal generator.

Two signal generators can be used to create a periodic sequence of pulsed. The LED on time, off time and the pause time between each sequence can be adjusted. The resolution is a multiple of 100 ms.

In order to use a generator, SetMode() has to be called with eLED_MODE::GEN0 / eLED_MODE::GEN1.

Parameters
GeneratorIndexGenerator index, 0 or 1
BlinkCountNumber of pulses for each sequence, 1 ... 16
ms_tonLED on time in milliseconds, 100 ... 6400
ms_toffLED off time in milliseconds, 100 ... 6400
ms_tpausePause time in milliseconds, 0 ... 6400
Example:
C#: Led_Example.cs
Visual Basic: Led_Example.vb

◆ Reset()

void VIB_NET::Led::Reset ( )

Resets the device to default settings.

See also VIB::Led::Reset().

◆ Set()

void VIB_NET::Led::Set ( UInt32  Val,
UInt32  BitMask 
)

Sets the state of the LEDs.

Parameters
ValBinary representation of the LEDs. The actual number of available LEDs is hardware dependent.
BitMaskMask bits can be used to change only certain outputs, LSB is LED0
Example:
C#: Led_Example.cs
Visual Basic: Led_Example.vb

◆ SetLED()

void VIB_NET::Led::SetLED ( UInt32  LEDIndex,
Boolean  OnOff 
)

Sets the state of one LED.

Parameters
LEDIndexIndex of the LED, 0 ... (NumberOfLEDs - 1)
OnOffEnable/disable LED
Example:
C#: Led_Example.cs
Visual Basic: Led_Example.vb

◆ SetMode()

void VIB_NET::Led::SetMode ( UInt32  LEDIndex,
eLED_MODE  Mode 
)

Sets the mode of one LED.

Parameters
LEDIndexIndex of the LED, 0 ... (NumberOfLEDs - 1)
ModeLED mode
Example:
C#: Led_Example.cs
Visual Basic: Led_Example.vb

Property Documentation

◆ NumberOfLEDs

VIB_NET::Led::NumberOfLEDs
get

Holds number of LEDs.

Mostly the LEDs are physical implemented as dual color LEDs.
A function result of two indicates one LED with green and red light.

Example:
C#: Led_Example.cs
Visual Basic: Led_Example.vb

◆ Type

VIB_NET::Led::Type
get

Returns the device type for the current instance, see eDEVICE_TYPE