Wiki Home >> N:-SIO-Command-'Q'---Query-JSON

N:-SIO-Command-'Q'---Query-JSON


N: SIO Command Query JSON ($51) ['Q']

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

Description

Query the JSON parser to return specific pieces of information specified by the query string. The query string is formally defined in the JSON Query Format. The size of this query string is always 256 bytes, and should be terminated by ATASCII EOL.

Parameters

DCBValue
DDEVIC$71
DUNIT$01 - $04
DCOMND$51 'Q'
DSTATS$80
DBUFBuffer pointing to device string containing query string e.g. "N:queryString"
DTIMLO$0F
DBYT256
DAUX1Use the same value passed to N: SIO Command 'O' - Open
DAUX2Use the same value passed to N: SIO Command 'O' - Open

Examples

C

/**
 * sio_json_query() - Query parsed JSON pointed to by opened stream
 */
void sio_json_query(char* queryDeviceSpec)
{
  OS.dcb.ddevic=0x71;
  OS.dcb.dunit=1;
  OS.dcb.dcomnd='Q';
  OS.dcb.dstats=0x80;
  OS.dcb.dbuf=queryDeviceSpec;
  OS.dcb.dtimlo=0x0f;
  OS.dcb.dbyt=256;
  OS.dcb.daux=0;
  siov();
}

See Also


Wiki content is mirrored from the FujiNet Github Wiki