macro_rules! monitor_value {
($name:literal, $val:expr) => { ... };
}Expand description
Macro to monitor a numeric value with Rustmeter Beacon.
§Parameters
- $name: A string literal representing the name of the value to be monitored (max 20 characters).
- $val: The numeric value to be monitored. Must be convertible to rustmeter_beacon::protocol::MonitorValue (any primitive).
§Examples
let temperature: f32 = read_temperature_sensor();
monitor_value!("temperature", temperature);