|
JSN-SR04_Gen3_RK
|
Helper class for specifying a Distance in centimeters. More...
#include <JSN-SR04_Gen3_RK.h>
Public Member Functions | |
| DistanceCm (double value) | |
| Construct a new DistanceCm object with a value in centimeters. More... | |
Public Member Functions inherited from JSN_SR04_Gen3::Distance | |
| Distance () | |
| Construct a new Distance object with a distance of 0. | |
| Distance (double valueM) | |
| Construct a new Distance object with a distance in meters. More... | |
| Distance (const Distance &value) | |
| Construct a new Distance object from another Distance object. More... | |
| Distance & | operator= (const Distance &value) |
| Copy the distance value from another Distance object. More... | |
| void | setDistanceM (double distanceM) |
| Set the Distance in meters. More... | |
| double | getDistanceM () const |
| Get the Distance in meters. More... | |
| void | cm (double cm) |
| Set the distance in centimeters. More... | |
| double | cm () const |
| Get the value of the Distance in centimeters. More... | |
| void | mm (double mm) |
| Set the distance in millimeter. More... | |
| double | mm () const |
| Get the value of the Distance in millimeters. More... | |
| void | inch (double inch) |
| Set the distance in inches. More... | |
| double | inch () const |
| Get the value of the Distance in inches. More... | |
Additional Inherited Members | |
Data Fields inherited from JSN_SR04_Gen3::Distance | |
| double | distanceM = 0.0 |
| The value of the distance in meters. | |
Helper class for specifying a Distance in centimeters.
This helper is used when you want to pass centimeters as a Distance value, for example:
.withDistanceAlarm( JSN_SR04_Gen3::DistanceAlarmLessThan( JSN_SR04_Gen3::DistanceCm(5.0) ) )
|
inline |
Construct a new DistanceCm object with a value in centimeters.
| value |