# Class LightBeaconAbstract

Namespace
  adas_core.module.LightBeacons.Devices

Assembly
  adas-core.module.LightBeacons.dll

Abstract class for LightBeacon devices. Each specific LightBeacon model should inherit from this class and implement the abstract methods for controlling the LED states (CodeBlue, CodeRed, CodeYellow, PowerOffLed).

    public abstract class LightBeaconAbstract

Inheritance
  object
  LightBeaconAbstract

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Constructors

### LightBeaconAbstract(string, string)

Abstract class for LightBeacon devices. Each specific LightBeacon model should inherit from this class and implement the abstract methods for controlling the LED states (CodeBlue, CodeRed, CodeYellow, PowerOffLed).

    protected LightBeaconAbstract(string host, string password)

#### Parameters

`host` string

  The host address of the LightBeacon device. This is typically the IP address or hostname used to connect to the device for controlling its LED states.

`password` string

  The password used for authenticating with the LightBeacon device. This is required to establish a connection and control the device's LED states securely.

## Fields

### Host

The host address of the LightBeacon device. This is typically the IP address or hostname used to connect to the device for controlling its LED states.

    public string Host

#### Field Value

string

### Password

The password used for authenticating with the LightBeacon device. This is required to establish a connection and control the device's LED states securely.

    public string Password

#### Field Value

string

## Methods

### CodeBlue(object)

Abstract method to set the LightBeacon device to Code Blue state. This method should be implemented by each specific LightBeacon model to control the LED state accordingly.

    public abstract void CodeBlue(object entry)

#### Parameters

`entry` object

  An object parameter that can be used to pass additional information or context needed for setting the LED state.

### CodeRed(object)

Abstract method to set the LightBeacon device to Code Red state. This method should be implemented by each specific LightBeacon model to control the LED state accordingly.

    public abstract void CodeRed(object entry)

#### Parameters

`entry` object

  An object parameter that can be used to pass additional information or context needed for setting the LED state.

### CodeYellow(object)

Abstract method to set the LightBeacon device to Code Yellow state. This method should be implemented by each specific LightBeacon model to control the LED state accordingly.

    public abstract void CodeYellow(object entry)

#### Parameters

`entry` object

  An object parameter that can be used to pass additional information or context needed for setting the LED state.

### GetBeaconDevice(string, string, string)

Static factory method to create an instance of a specific LightBeacon device based on the provided driver name, host, and password. This method uses reflection to dynamically instantiate the appropriate LightBeacon model class that inherits from LightBeaconAbstract.

    public static LightBeaconAbstract? GetBeaconDevice(string driver, string host, string password)

#### Parameters

`driver` string

  The name of the driver class for the specific LightBeacon model.

`host` string

  The host address of the LightBeacon device.

`password` string

  The password for authenticating with the LightBeacon device.

#### Returns

LightBeaconAbstract

  An instance of the specific LightBeacon device, or null if the driver class is not found or cannot be instantiated.

### PowerOffLed(object)

Abstract method to power off the LED of the LightBeacon device. This method should be implemented by each specific LightBeacon model to control the LED state accordingly.

    public abstract void PowerOffLed(object entry)

#### Parameters

`entry` object

  An object parameter that can be used to pass additional information or context needed for setting the LED state.