Directories and files
./meter/meterList— registered meter index./meter/reg/<serial>— binaryMeterData_trecord./meter/directive/<id>.json— directive payload./meter/meterDataOut/— job outputs:<taskId>_meterID.txt,_readout.txt,_payload.txt
File-based meter registry, IEC 62056-21–style readout and load profile jobs, directive storage, and a queued worker task — the protocol layer enqueues work here and waits for completion callbacks.
./meter/meterList — registered meter index./meter/reg/<serial> — binary MeterData_t record./meter/directive/<id>.json — directive payload./meter/meterDataOut/ — job outputs: <taskId>_meterID.txt, _readout.txt, _payload.txtsequenceDiagram participant PZ as AppProtocolZD participant MO as MeterOperations worker participant FS as File system PZ->>MO: AddReadoutTask / AddProfileTask + callback MO->>MO: IEC flow (serial line) MO->>FS: taskId_readout.txt / _payload.txt MO-->>PZ: callback(taskId, status) PZ->>FS: read files PZ->>PZ: packetize and send on push PZ->>FS: delete output files
| Function | Description |
|---|---|
appMeterOperationsAddDirective | Writes a file keyed by id in the JSON. |
appMeterOperationsDeleteDirective | * deletes all directives. |
appMeterOperationsGetDirectiveCount / GetDirectiveByIndex | Indexed read for listing (max ~1024-byte buffer). |
appMeterOperationsAddReadoutTask | Request JSON must include METERSERIALNUMBER and a registered meter. |
flowchart TB MO[AppMeterOperations] MO --> FS[fs_port] MO --> ZJ[ZDJson] MO --> MIF[MeterCommInterface_t] MIF -.->|read/write| SER[RS485 / optical port]