C# Class DeviceHive.CommonEquipment.TempSensor

Temperature sensor equipment
Inheritance: EquipmentEngine
Show file Open project: devicehive/devicehive-.net-mf Class Usage Examples

Public Methods

Method 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

Method Description
OnTimer ( object o ) : void

Timer for temperature measurement

Method Details

GetTemperature() public method

Gets current temperature
public GetTemperature ( ) : float
return float

NotifyTemperature() public method

Sends temperature notification
public NotifyTemperature ( ) : bool
return bool

OnCommand() public method

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
return bool

Register() public method

Registers the equipment
public Register ( ) : bool
return bool

SendNotification() public method

Sends temperature notification
public SendNotification ( float value ) : bool
value float Temperature value
return bool

TempSensor() public method

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
return System

Unregister() public method

Unregisters the equipment
public Unregister ( ) : bool
return bool