diff --git a/docs/specs/modbus.md b/docs/specs/modbus.md index 81a6c415cd..5a879c6fcc 100644 --- a/docs/specs/modbus.md +++ b/docs/specs/modbus.md @@ -33,16 +33,17 @@ UDMI supports reading Modbus points by specifying them via a `modbus://` URL sch Parameters passed in the query string define how to interpret the fetched register data: * **`border`**: i.e., `MSB` (`Big-Endian`) or `LSB` (`Little-Endian`). -* **`type`**: i.e., `INT16`, `UINT32`, `BOOLEAN`, `ASCII`. +* **`type`**: e.g., `INT16`, `UINT32`, `FLOAT32`, `BOOLEAN`, `ASCII`. * **`worder`**: i.e., `HWF` (`High-Word First`) or `LWF` (`Low-Word First`) (for 32-bit values). -* **`scale`**: i.e., `1.0`, `0.01`, `100.0` (scale factor). +* **`scale`**: e.g., `1.0`, `0.01`, `100.0` (scale factor). +* **`bit`**: e.g., `2` (Integer bit index). ### Network Parameters The `host` maps to a named network in the device's `model_localnet.json` (under the `networks` field). Each named network can define the following parameters for communication: * **`baud`**: The baud rate. -* **`protocol`**: i.e., `RTU`, `TCP`. +* **`protocol`**: i.e., `RTU`, `TCP`, `ASCII`. * **`parity`**: For serial `RTU`. * **`data bits`**: For serial `RTU`. * **`stop bits`**: For serial `RTU`. diff --git a/validator/src/main/java/com/google/daq/mqtt/util/providers/ModbusFamilyProvider.java b/validator/src/main/java/com/google/daq/mqtt/util/providers/ModbusFamilyProvider.java index f52cc41810..33be3d0746 100644 --- a/validator/src/main/java/com/google/daq/mqtt/util/providers/ModbusFamilyProvider.java +++ b/validator/src/main/java/com/google/daq/mqtt/util/providers/ModbusFamilyProvider.java @@ -35,7 +35,7 @@ public class ModbusFamilyProvider implements FamilyProvider { ImmutableSet.of("1", "2", "3", "4", "5", "6", "15", "16"); private static final Set ALLOWED_PARAMS = - ImmutableSet.of("border", "type", "worder", "scale"); + ImmutableSet.of("border", "type", "worder", "scale", "bit"); @Override public String familyKey() {