N: SIO Command 'P' Parse JSON - FujiNetWIFI/fujinet-firmware GitHub Wiki

N: SIO Command Parse JSON ($50) ['P']

This is a command for Devices $71-$78 - The N: Device (see SIO-Commands-for-Device-IDs-$71-to-$78).

Description

Parse the JSON data stream opened by the N: SIO Command 'O' - Open command. The data is loaded entirely into FujiNet memory, ready to be queried by the N: SIO Command $81 - Query JSON command.

Parameters

DCB Value
DDEVIC $71
DUNIT $01 - $04
DCOMND $50 'P'
DSTATS $00
DBUF NULL
DTIMLO $0F
DBYT 0
DAUX1 Use the same value passed to N: SIO Command 'O' - Open
DAUX2 Use the same value passed to N: SIO Command 'O' - Open

Examples

C

/**
 * sio_json_parse() - Parse JSON pointed to by opened stream
 */
void sio_json_parse(void)
{
  OS.dcb.ddevic=0x71;
  OS.dcb.dunit=1;
  OS.dcb.dcomnd='P';
  OS.dcb.dstats=0x00;
  OS.dcb.dbuf=NULL;
  OS.dcb.dtimlo=0x0f;
  OS.dcb.dbyt=0;
  OS.dcb.daux=0;
  siov();
}

See Also