| 論理名称 | 物理名称 | データ型 | 規定値 | 備考 |
|---|---|---|---|---|
| データ要素名 | name | 文字列 | - | データの中身を表す名称。USBへの電文には乗らないがログ表示などのために利用 |
| データ型 | type | 文字列 | text(1*nB)/uint16_t(2B)/int16_t(2B)/float(4B)/hex(1*nB) | データの中身の型名称 |
| データ値 | value | 文字列 | - | typeがhexの場合は必ずサイズは2の倍数で、16進数文字列になっている必要がある |
{
"type":"req_usb_command",
"data":[
{
"name":"header",
"type":"uint16_t",
"value":61166
},
{
"name":"bytes",
"type":"uint16_t",
"value":14
},
{
"name":"date",
"type":"text",
"value":"2020-11-20"
},
{
"name":"temperature",
"type":"int16_t",
"value":25
},
{
"name":"humidity",
"type":"uint16_t",
"value":70
},
{
"name":"get_version_command",
"type":"hex",
"value":"EEEE000103b6"
}
]
}
| 論理名称 | 物理名称 | データ型 | 規定値 | 備考 |
|---|---|---|---|---|
| 結果コード | result_cd | 文字列 | 0 | 結果コード(0:正常 1:異常) |
| エラーコード | error_cd | 文字列 | empty | エラー時のエラー判別コード(任意) |
| エラーメッセージ | error_msg | 文字列 | empty | エラーメッセージ(任意) |
{
"type":"req_usb_command",
"result":{
"result_cd":"0",
"error_cd":"",
"error_msg":""
}
}