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
-
LightBeacon
- Derived
- Inherited Members
- Extension Methods
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
optionsEquatableDictionary<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
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
obsPatientObservationThe 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
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.