PX_CUST_CMD
code: 486
# set
<module-index>/<port-index> PX_CUST_CMD [<cdb_instance_index>] <cmd>
# get
<module-index>/<port-index> PX_CUST_CMD [<cdb_instance_index>] ?
Description
Defines the custom CDB command’s request and reply.
Actions
set, get
Indices
cdb_instance_index
: integer, index of the CDB instance to access.
0
for CDB Instance 11
for CDB Instance 2
Set Parameters
cmd
: json, JSON formatted string containing the following fields:
{
"cmd_header": {
"cmd_id": "0x00",
"epl_length": 0,
"lpl_length": 0,
"rpl_length": 0,
"rpl_check_code": 0
},
"cmd_data": {
"data": "0x00"
}
}
where,
cmd_header
: JSON object, contains the command header fields.cmd_id
: hex string, command ID.epl_length
: integer, length of the EPL.lpl_length
: integer, length of the LPL.rpl_length
: integer, length of the RPL. (optional)rpl_check_code
: integer, check code for the RPL. (optional)
cmd_data
: JSON object, contains the command data fields.data
: hex string, command data.
Get Parameters
reply
: json, JSON formatted string containing the following fields:
{
"reply_status": {
"cdb_cmd_complete_flag": "0x00",
"cdb_status": "0x00",
},
"reply_header": {
"rpl_length": 9,
"rpl_check_code": 9
}
"reply_data": {
"data": "0x00"
}
}
where,
reply_status
: json, JSON formatted string containing the following fields: *cdb_cmd_complete_flag
: hex string, indicates whether the CDB command is complete. *cdb_status
: hex string, provides the status of the most recently triggered CDB command.reply_header
: json, JSON formatted string containing the following fields: *rpl_length
: integer, length of the reply data. *rpl_check_code
: integer, check code for the reply data.reply_data
: json, JSON formatted string containing the following fields: *data
: hex string, the actual data to be sent in the reply.
Example
# set
input: 0/0 PX_CUST_REQUEST [0] {"cmd_header": {"cmd_id": "0x00", "epl_length": 0, "lpl_length": 0, "rpl_length": 0, "rpl_check_code": 0}, "cmd_data": {"data": "0x00"}}
output: <OK>
# get
input: 0/0 PX_CUST_CMD [0] ?
output: 0/0 PX_CUST_CMD [0] {"reply_status": {"cdb_cmd_complete_flag": "0x00", "cdb_status": "0x00"}, "reply_header": {"rpl_length": 9, "rpl_check_code": 9}, "reply_data": {"data": "0x00"}}