ModularSensors > Files > src / LoggerModem.h

LoggerModem.h file

Contains the loggerModem class and the variable subclasses Modem_RSSI, Modem_SignalPercent, Modem_BatteryState, Modem_BatteryPercent, and Modem_BatteryVoltage - all of which are implemented as "calculated" variables.

Classes

class loggerModem
The loggerModem class provides an internet connection for the logger and supplies an Arduino Client instance to use to publish data.
class Modem_RSSI
The Variable sub-class used for the RSSI measured by a modem.
class Modem_SignalPercent
The Variable sub-class used for the percent of maximum signal measured by a modem.
class Modem_BatteryState
The Variable sub-class used for the battery charge state measured by a modem.
class Modem_BatteryPercent
The Variable sub-class used for the battery charge percent measured by a modem.
class Modem_BatteryVoltage
The Variable sub-class used for the battery voltage measured by a modem.
class Modem_Temp
The Variable sub-class used for the chip temperature as measured by the modem.

Modem RSSI

The RSSI (received signal strength indication) variable from a modem-like device.

Modem_RSSI(loggerModem* parentModem, const char* uuid = "", const char* varCode = MODEM_RSSI_DEFAULT_CODE) explicit

Construct a new Modem_RSSI object.

Parameters
parentModem The parent modem providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "RSSI".

#define MODEM_RSSI_RESOLUTION = 0
Decimals places in string representation; RSSI should have 0.
#define MODEM_RSSI_VAR_NAME = "RSSI"
Variable name in ODM2 controlled vocabulary; "RSSI".
#define MODEM_RSSI_UNIT_NAME = "RSSI"
Variable unit name in ODM2 controlled vocabulary; "RSSI".
#define MODEM_RSSI_DEFAULT_CODE = "decibelMiliWatt"
Default variable short code; "decibelMiliWatt".

Modem Percent Full Signal

The percent full signal variable from a modem-like device.

Modem_SignalPercent(loggerModem* parentModem, const char* uuid = "", const char* varCode = MODEM_PERCENT_SIGNAL_DEFAULT_CODE) explicit

Construct a new Modem_SignalPercent object.

Parameters
parentModem The parent modem providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "signalPercent".

#define MODEM_PERCENT_SIGNAL_RESOLUTION = 0
Decimals places in string representation; percent signal should have 0.
#define MODEM_PERCENT_SIGNAL_VAR_NAME = "signalPercent"
Variable name in ODM2 controlled vocabulary; "signalPercent".
#define MODEM_PERCENT_SIGNAL_UNIT_NAME = "percent"
Variable unit name in ODM2 controlled vocabulary; "percent".
#define MODEM_PERCENT_SIGNAL_DEFAULT_CODE = "signalPercent"
Default variable short code; "signalPercent".

Modem Battery Charge State

The battery charge state variable from a modem-like device. This is used to indicate whether or not the modem battery is currently being charged.

Modem_BatteryState(loggerModem* parentModem, const char* uuid = "", const char* varCode = MODEM_BATTERY_STATE_DEFAULT_CODE) explicit

Construct a new Modem_BatteryState object.

Parameters
parentModem The parent modem providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "modemBatteryCS".

#define MODEM_BATTERY_STATE_RESOLUTION = 0
Decimals places in string representation; battery state should have 0.
#define MODEM_BATTERY_STATE_VAR_NAME = "batteryChargeState"
Variable name in ODM2 controlled vocabulary; "batteryChargeState".
#define MODEM_BATTERY_STATE_UNIT_NAME = "number"
Variable unit name in ODM2 controlled vocabulary; "number" (dimensionless)
#define MODEM_BATTERY_STATE_DEFAULT_CODE = "modemBatteryCS"
Default variable short code; "modemBatteryCS".

Modem Battery Charge Percent

The percent battery charge from a modem-like device.

Modem_BatteryPercent(loggerModem* parentModem, const char* uuid = "", const char* varCode = MODEM_BATTERY_PERCENT_DEFAULT_CODE) explicit

Construct a new Modem_BatteryPercent object.

Parameters
parentModem The parent modem providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "modemBatteryPct".

#define MODEM_BATTERY_PERCENT_RESOLUTION = 0
Decimals places in string representation; battery charge percent should have 0.
#define MODEM_BATTERY_PERCENT_VAR_NAME = "batteryVoltage"
Variable name in ODM2 controlled vocabulary; "batteryVoltage".
#define MODEM_BATTERY_PERCENT_UNIT_NAME = "percent"
Variable unit name in ODM2 controlled vocabulary; "percent".
#define MODEM_BATTERY_PERCENT_DEFAULT_CODE = "modemBatteryPct"
Default variable short code; "modemBatteryPct".

Modem Battery Voltage

The battery voltage from a modem-like device.

Modem_BatteryVoltage(loggerModem* parentModem, const char* uuid = "", const char* varCode = MODEM_BATTERY_VOLTAGE_DEFAULT_CODE) explicit

Construct a new Modem_BatteryVoltage object.

Parameters
parentModem The parent modem providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "modemBatterymV".

#define MODEM_BATTERY_VOLTAGE_RESOLUTION = 0
Decimals places in string representation; battery voltage should have 0.
#define MODEM_BATTERY_VOLTAGE_VAR_NAME = "batteryVoltage"
Variable name in ODM2 controlled vocabulary; "batteryVoltage".
#define MODEM_BATTERY_VOLTAGE_UNIT_NAME = "millivolt"
Variable unit name in ODM2 controlled vocabulary; "millivolt".
#define MODEM_BATTERY_VOLTAGE_DEFAULT_CODE = "modemBatterymV"
Default variable short code; "modemBatterymV".

Modem Chip Temperature

The chip temperature from a modem-like device.

Modem_Temp(loggerModem* parentModem, const char* uuid = "", const char* varCode = MODEM_TEMPERATURE_DEFAULT_CODE) explicit

Construct a new Modem_Temp object.

Parameters
parentModem The parent modem providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "modemTemp".

#define MODEM_TEMPERATURE_RESOLUTION = 1
Decimals places in string representation; temperature should have 1.
#define MODEM_TEMPERATURE_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define MODEM_TEMPERATURE_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define MODEM_TEMPERATURE_DEFAULT_CODE = "modemTemp"
Default variable short code; "modemTemp".