DeepCover Embedded Security in IoT: Public-key Secured Data Paths

Dependencies:   MaximInterface

Embed: (wiki syntax)

« Back to documentation index

SensorNode Class Reference

SensorNode Class Reference

Interface to the authenticated sensor node peripheral board. More...

#include <SensorNode.hpp>

Public Types

enum  TempStyle
 

Style of temperature to measure.

More...
enum  State { Disconnected, Invalid, ValidLaserDisabled, ValidLaserEnabled }
typedef
MaximInterfaceCore::Function
< void(const char *) 
PrintHandler )
 Prints a null-terminated char string.

Public Member Functions

 SensorNode (MaximInterfaceCore::Sleep &sleep, MaximInterfaceCore::I2CMaster &i2c, MaximInterfaceDevices::DS2476 &ds2476)
State detect ()
 Detects if a potential sensor node is connected.
MaximInterfaceCore::Result< void > setLaserEnabled (bool enabled, const PrintHandler &print=PrintHandler())
 Enable or disable the laser.
MaximInterfaceCore::Result
< double > 
readTemp (TempStyle style)
 Get a temperature measurement from the MLX90614.

Friends

class HardwareTestWindow

Detailed Description

Interface to the authenticated sensor node peripheral board.

Definition at line 56 of file SensorNode.hpp.


Member Typedef Documentation

typedef MaximInterfaceCore::Function<void(const char *) PrintHandler)

Prints a null-terminated char string.

Definition at line 59 of file SensorNode.hpp.


Member Enumeration Documentation

enum State
Enumerator:
Disconnected 

No sensor node is connected.

Invalid 

Sensor node is not valid.

ValidLaserDisabled 

Sensor node is valid, and laser is disabled.

ValidLaserEnabled 

Sensor node is valid, and laser is enabled.

Definition at line 64 of file SensorNode.hpp.

enum TempStyle

Style of temperature to measure.

Definition at line 62 of file SensorNode.hpp.


Constructor & Destructor Documentation

SensorNode ( MaximInterfaceCore::Sleep &  sleep,
MaximInterfaceCore::I2CMaster &  i2c,
MaximInterfaceDevices::DS2476 &  ds2476 
)
Parameters:
i2cI2C bus connected to the sensor node that communicates with DS28C36 and MLX90614.
ds2476Coprocessor used for authentication computations.

Member Function Documentation

SensorNode::State detect (  )

Detects if a potential sensor node is connected.

Definition at line 51 of file SensorNode.cpp.

Result< double > readTemp ( TempStyle  style )

Get a temperature measurement from the MLX90614.

Parameters:
styleTemperature style to read.
Returns:
Temperature in Celsius.

Definition at line 79 of file SensorNode.cpp.

Result< void > setLaserEnabled ( bool  enabled,
const PrintHandler print = PrintHandler() 
)

Enable or disable the laser.

Parameters:
enabledTrue to enable the laser or false to disable.
printOptional callback for displaying informational messages to the user.
Returns:
True if the operation was successful.

Definition at line 129 of file SensorNode.cpp.