Uplink command to read cumulative load graphs.
The corresponding downlink command: getDemandCumulative.
getDemandCumulative
import * as getDemandCumulative from 'jooby-codec/mtx1/commands/uplink/getDemandCumulative.js';import * as demandTypes from 'jooby-codec/mtx1/constants/demandTypes.js';// response to getDemandCumulative downlink commandconst bytes = [0x31, 0x42, 0xa0, 0x00, 0x19, 0x01, 0x3c, 0x04, 0xff];// decoded payloadconst parameters = getDemandCumulative.fromBytes(bytes);console.log(parameters);// output:{ date: { year: 24, month: 10, date: 2 }, demandType: demandTypes.VOLTAGE, firstIndex: 25, count: 1, period: 60, demands: [ { lastSummerHour: 4 } ]} Copy
import * as getDemandCumulative from 'jooby-codec/mtx1/commands/uplink/getDemandCumulative.js';import * as demandTypes from 'jooby-codec/mtx1/constants/demandTypes.js';// response to getDemandCumulative downlink commandconst bytes = [0x31, 0x42, 0xa0, 0x00, 0x19, 0x01, 0x3c, 0x04, 0xff];// decoded payloadconst parameters = getDemandCumulative.fromBytes(bytes);console.log(parameters);// output:{ date: { year: 24, month: 10, date: 2 }, demandType: demandTypes.VOLTAGE, firstIndex: 25, count: 1, period: 60, demands: [ { lastSummerHour: 4 } ]}
Command format documentation
Uplink command to read cumulative load graphs.
The corresponding downlink command:
getDemandCumulative.Example: create command instance from command body hex dump
Command format documentation