Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MaximInterface
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:
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:
-
i2c I2C bus connected to the sensor node that communicates with DS28C36 and MLX90614. ds2476 Coprocessor 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:
-
style Temperature 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:
-
enabled True to enable the laser or false to disable. print Optional callback for displaying informational messages to the user.
- Returns:
- True if the operation was successful.
Definition at line 129 of file SensorNode.cpp.
Generated on Tue Jul 12 2022 12:06:51 by
1.7.2