JSN-SR04_Gen3_RK
Public Member Functions
JSN_SR04_Gen3::DistanceInch Class Reference

Helper class for specifying a Distance in inches. More...

#include <JSN-SR04_Gen3_RK.h>

Inheritance diagram for JSN_SR04_Gen3::DistanceInch:
JSN_SR04_Gen3::Distance

Public Member Functions

 DistanceInch (double value)
 Construct a new DistanceInch object with a value in inches. 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...
 
Distanceoperator= (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.
 

Detailed Description

Helper class for specifying a Distance in inches.

This helper is used when you want to pass inches as a Distance value, for example:

.withDistanceAlarm( JSN_SR04_Gen3::DistanceAlarmLessThan( JSN_SR04_Gen3::DistanceInch(2.5) ) )

Constructor & Destructor Documentation

◆ DistanceInch()

JSN_SR04_Gen3::DistanceInch::DistanceInch ( double  value)
inline

Construct a new DistanceInch object with a value in inches.

Parameters
value

The documentation for this class was generated from the following file: