C# Class hobd.SensorRegistry

Registry with active set of sensors
Afficher le fichier Open project: cail/hobd Class Usage Examples

Méthodes publiques

Méthode Description
Add ( Sensor sensor ) : void
AddAlias ( Sensor sensor, string alias ) : void
AddListener ( Sensor sensor, Action listener ) : void
AddListener ( Sensor sensor, Action listener, int period ) : void

Adds listener for the specified sensor

Use period of milliseconds to update the reading. Default is 0 - means update as fast as possible

AddListener ( string sensor, Action listener ) : void
AddListener ( string sensor, Action listener, int period ) : void
AddPassiveListener ( Action listener ) : void

Passive listeners are the listeners who listen for all currently active sensors

CreateObject ( string clazz ) : object
Deactivate ( ) : void
DumpState ( ) : void
EnumerateSensors ( ) : IEnumerable

Returns enumeration of all the available registered sensors

RegisterObjectCreator ( object>.Func creator ) : void
RegisterProvider ( SensorProvider provider ) : void
RegisterProvider ( string provider ) : void

Provider should be either a SensorProvider full class name, or special string

Remove ( Sensor sensor ) : void
RemoveListener ( Action listener ) : void

Detaches the specifed listener for all sensors

RemoveListener ( Sensor sensor, Action listener ) : void

Removes the listener for the specified sensor

RemoveListener ( string sensor, Action listener ) : void

alias for RemoveListener

RemovePassiveListener ( Action listener ) : void
Sensor ( string id ) : Sensor

Gets the sensor with the specified ID or alias

Sensor ( string id, Sensor notthis ) : Sensor
SensorRegistry ( ) : System
TriggerListeners ( Sensor sensor ) : void
TriggerReset ( ) : void

Triggers sensor reset event for all sensors that supports it

TriggerSuspend ( ) : void

Triggers sensor suspend event for all sensors that supports it

Private Methods

Méthode Description
ListenerHandler ( ) : void

Method Details

Add() public méthode

public Add ( Sensor sensor ) : void
sensor Sensor
Résultat void

AddAlias() public méthode

public AddAlias ( Sensor sensor, string alias ) : void
sensor Sensor
alias string
Résultat void

AddListener() public méthode

public AddListener ( Sensor sensor, Action listener ) : void
sensor Sensor
listener Action
Résultat void

AddListener() public méthode

Adds listener for the specified sensor
Use period of milliseconds to update the reading. Default is 0 - means update as fast as possible
public AddListener ( Sensor sensor, Action listener, int period ) : void
sensor Sensor
listener Action
period int
Résultat void

AddListener() public méthode

public AddListener ( string sensor, Action listener ) : void
sensor string
listener Action
Résultat void

AddListener() public méthode

public AddListener ( string sensor, Action listener, int period ) : void
sensor string
listener Action
period int
Résultat void

AddPassiveListener() public méthode

Passive listeners are the listeners who listen for all currently active sensors
public AddPassiveListener ( Action listener ) : void
listener Action /// A ///
Résultat void

CreateObject() public méthode

public CreateObject ( string clazz ) : object
clazz string
Résultat object

Deactivate() public méthode

public Deactivate ( ) : void
Résultat void

DumpState() public méthode

public DumpState ( ) : void
Résultat void

EnumerateSensors() public méthode

Returns enumeration of all the available registered sensors
public EnumerateSensors ( ) : IEnumerable
Résultat IEnumerable

RegisterObjectCreator() public méthode

public RegisterObjectCreator ( object>.Func creator ) : void
creator object>.Func
Résultat void

RegisterProvider() public méthode

public RegisterProvider ( SensorProvider provider ) : void
provider SensorProvider
Résultat void

RegisterProvider() public méthode

Provider should be either a SensorProvider full class name, or special string
public RegisterProvider ( string provider ) : void
provider string
Résultat void

Remove() public méthode

public Remove ( Sensor sensor ) : void
sensor Sensor
Résultat void

RemoveListener() public méthode

Detaches the specifed listener for all sensors
public RemoveListener ( Action listener ) : void
listener Action /// A ///
Résultat void

RemoveListener() public méthode

Removes the listener for the specified sensor
public RemoveListener ( Sensor sensor, Action listener ) : void
sensor Sensor
listener Action
Résultat void

RemoveListener() public méthode

alias for RemoveListener
public RemoveListener ( string sensor, Action listener ) : void
sensor string
listener Action
Résultat void

RemovePassiveListener() public méthode

public RemovePassiveListener ( Action listener ) : void
listener Action
Résultat void

Sensor() public méthode

Gets the sensor with the specified ID or alias
public Sensor ( string id ) : Sensor
id string
Résultat Sensor

Sensor() public méthode

public Sensor ( string id, Sensor notthis ) : Sensor
id string
notthis Sensor
Résultat Sensor

SensorRegistry() public méthode

public SensorRegistry ( ) : System
Résultat System

TriggerListeners() public méthode

public TriggerListeners ( Sensor sensor ) : void
sensor Sensor
Résultat void

TriggerReset() public méthode

Triggers sensor reset event for all sensors that supports it
public TriggerReset ( ) : void
Résultat void

TriggerSuspend() public méthode

Triggers sensor suspend event for all sensors that supports it
public TriggerSuspend ( ) : void
Résultat void