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
This command allows you to define custom CDB commands. It includes both request and reply.
Actions
set, get
Indices
cdb_instance_index: integer, index of the CDB instance to access.
0for CDB Instance 11for CDB Instance 2
Set Parameters
cmd: json, JSON formatted string containing the following fields:
{
"cmd_header": {
"cmd_id": "0xFFFF,
"epl_length": 0,
"lpl_length": 0,
"rpl_length": 0,
"rpl_check_code": 0
},
"cmd_data": {
"data": "0x00"
}
}
Cmd0486SetSchema:
type: object
properties:
cmd_header:
type: object
properties:
cmd_id:
type: string
description: |
Command ID for the custom command.
Should be in hex format, e.g., "0xFFFF".
epl_length:
type: integer
description: |
Length of the EPL.
lpl_length:
type: integer
description: |
Length of the LPL.
rpl_length:
type: integer
description: |
Length of the RPL.
rpl_check_code:
type: integer
description: |
Check code for the RPL.
cmd_data:
type: object
properties:
data:
type: string
description: |
Hex string, command data.
Get Parameters
reply: json, JSON formatted string containing the following fields:
{
"reply_status": {
"cdb_cmd_complete_flag": 0,
"cdb_status": 0,
"cdb_io_status": 0
},
"reply_header": {
"rpl_length": 9,
"rpl_check_code": 9
}
"reply_data": {
"data": "0x00"
}
}
Cmd0486ReplySchema:
type: object
properties:
reply_status:
type: object
properties:
cdb_status:
type: integer
description: |
Provides the status of the most recently
triggered CDB command.
cdb_io_status:
type: integer
description: |
Provides the I/O status of the most recently
triggered CDB command.
cdb_cmd_complete_flag:
type: boolean
description: |
Latched Flag to indicate completion of a CDB command for CDB instance.
Set by module when the CDB command is complete.
reply_header:
type: object
properties:
rpl_length:
type: integer
description: |
Length of the reply data.
rpl_check_code:
type: integer
description: |
Check code for the reply data.
reply_data:
type: object
properties:
data:
type: string
description: |
Hex string, the actual data to be sent in the reply.
Example
# set
input: 0/0 PX_CUST_REQUEST [0] {"cmd_header": {"cmd_id": 0, "epl_length": 0, "lpl_length": 0, "rpl_length": 0, "rpl_check_code": 0}, "cmd_data": {"data": 0}}
output: <OK>
# get
input: 0/0 PX_CUST_CMD [0] ?
output: 0/0 PX_CUST_CMD [0] {"reply_status": {"cdb_cmd_complete_flag": 0, "cdb_status": 0}, "reply_header": {"rpl_length": 9, "rpl_check_code": 9}, "reply_data": {"data": 0}}