# Class LightBeacon

Namespace
  adas_core.module.LightBeacons.Devices

Assembly
  adas-core.module.LightBeacons.dll

Abstract class representing a light beacon device. This class defines the basic structure and behavior of a light beacon, including methods for controlling the beacon's colors and generating alerts based on patient observations. The specific implementation of these methods will depend on the type of light beacon being used and the requirements of the application.

    public abstract class LightBeacon

Inheritance
  object
  LightBeacon

Derived
  Turktbens2LightBeacon

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

### LightBeacon(EquatableDictionary<string, object>)

Abstract class representing a light beacon device. This class defines the basic structure and behavior of a light beacon, including methods for controlling the beacon's colors and generating alerts based on patient observations. The specific implementation of these methods will depend on the type of light beacon being used and the requirements of the application.

    protected LightBeacon(EquatableDictionary<string, object> options)

#### Parameters

`options` EquatableDictionary<string, object>

  A dictionary containing configuration options for the light beacon. This can include settings such as the beacon's IP address, port number, color configurations, and other relevant parameters.

## Fields

### Options

A dictionary containing configuration options for the light beacon. This can include settings such as the beacon's IP address, port number, color configurations, and other relevant parameters.

    protected readonly EquatableDictionary<string, object> Options

#### Field Value

EquatableDictionary<string, object>

## Methods

### BlueCode()

Turns the light beacon blue. This method should be implemented to control the beacon's hardware or software interface to change its color to blue.

    public abstract Task BlueCode()

#### Returns

Task

  A task representing the asynchronous operation.

### GenerateColorAlert(PatientObservation)

Generates a color alert based on the provided patient observation. This method should analyze the patient observation and determine the appropriate color alert to display on the light beacon. The specific logic for determining the color alert will depend on the criteria defined in the patient observation, such as thresholds for vital signs or other relevant parameters.

    public abstract Task GenerateColorAlert(PatientObservation obs)

#### Parameters

`obs` PatientObservation

  The patient observation used to determine the appropriate color alert.

#### Returns

Task

  A task representing the asynchronous operation.

### GetBeaconColor()

Retrieves the current color of the light beacon. This method should be implemented to query the beacon's hardware or software interface to determine its current color state and return it as a value from the LightBeaconColor enumeration.

    public abstract Task<LightBeaconColor> GetBeaconColor()

#### Returns

Task<LightBeaconColor>

  A task representing the asynchronous operation, with a result of the current color of the light beacon.

### PowerOffLed()

Turns off the light beacon. This method should be implemented to control the beacon's hardware or software interface to turn off the light, regardless of its current color.

    public abstract Task PowerOffLed()

#### Returns

Task

### RedCode()

Turns the light beacon red. This method should be implemented to control the beacon's hardware or software interface to change its color to red.

    public abstract Task RedCode()

#### Returns

Task

  A task representing the asynchronous operation.

### YellowCode()

Turns the light beacon yellow. This method should be implemented to control the beacon's hardware or software interface to change its color to yellow.

    public abstract Task YellowCode()

#### Returns

Task

  A task representing the asynchronous operation.