Definition: onlora(port, field[:bits], ...) { ... } — Allowed: numeric port and identifier fields; bits are integer literals; Not allowed: expressions in field list.
Registers a block that runs when a LoRa uplink is received on the given port. Declare the expected fields with optional bit widths so the runtime can unpack the payload into variables. Use next; for early exit of the current run.
// Expect 16-bit temp and humidity on port 1
onlora(1, temp:16, hum:16) {
publish("plc/env", "temp", temp, "hum", hum);
}