createPoint
A very simple utility to build a structured point.
Signature
Section titled “Signature”createPoint(value, timestamp, status="OK")
value(int | float)timestamp(str | int | float | datetime)status(str, default:OK)
Inputs
Section titled “Inputs”value: Numeric value to store.timestamp: Timestamp for the value.status: Quality flag (OKorBAD).
Examples
Section titled “Examples”JSON output (single point)
Section titled “JSON output (single point)”point = createPoint(38.5, "2024-01-01 00:00:00", status="OK")Output:
{ "value": 38.5, "timestamp": "2024-01-01 00:00:00", "status": "OK" }JSON output (epoch seconds)
Section titled “JSON output (epoch seconds)”point = createPoint(12.3, 1704067200, status="BAD")Output:
{ "value": 12.3, "timestamp": 1704067200, "status": "BAD" }