C# Class DeviceHive.CommonEquipment.TempSensor

Temperature sensor equipment
Inheritance: EquipmentEngine
Afficher le fichier Open project: devicehive/devicehive-.net-mf Class Usage Examples

Méthodes publiques

Méthode Description
GetTemperature ( ) : float

Gets current temperature

NotifyTemperature ( ) : bool

Sends temperature notification

OnCommand ( DeviceCommand cmd ) : bool

Performs a device command

This equipment does not support commands. It returns False regardless of input.

Register ( ) : bool

Registers the equipment

SendNotification ( float value ) : bool

Sends temperature notification

TempSensor ( DeviceEngine dev, string Code, ITempSensor sensor ) : System

Constructs a DeviceHive temperature sensor for a given sensor object

Unregister ( ) : bool

Unregisters the equipment

Private Methods

Méthode Description
OnTimer ( object o ) : void

Timer for temperature measurement

Method Details

GetTemperature() public méthode

Gets current temperature
public GetTemperature ( ) : float
Résultat float

NotifyTemperature() public méthode

Sends temperature notification
public NotifyTemperature ( ) : bool
Résultat bool

OnCommand() public méthode

Performs a device command
This equipment does not support commands. It returns False regardless of input.
public OnCommand ( DeviceCommand cmd ) : bool
cmd DeviceCommand Input command
Résultat bool

Register() public méthode

Registers the equipment
public Register ( ) : bool
Résultat bool

SendNotification() public méthode

Sends temperature notification
public SendNotification ( float value ) : bool
value float Temperature value
Résultat bool

TempSensor() public méthode

Constructs a DeviceHive temperature sensor for a given sensor object
public TempSensor ( DeviceEngine dev, string Code, ITempSensor sensor ) : System
dev DeviceEngine Parent device
Code string Equipment code
sensor ITempSensor Temperature sensor
Résultat System

Unregister() public méthode

Unregisters the equipment
public Unregister ( ) : bool
Résultat bool