Top |
Generic device commandsGeneric device commands — Methods to run generic commands on the device state. |
mccr_status_t mccr_device_run_generic (mccr_device_t *device
,uint8_t command_id
,const uint8_t *blob
,size_t blob_size
,uint8_t **out_blob
,size_t *out_blob_size
);
Run a generic command in the device.
If the command is privileged, blob
and blob_size
should include the
trailing MAC.
E.g. if the command to run is '01:06:10:00:B7:6E:44:1F', command_id
would be
0x01, blob_size
would be 6, and blob
would be '10:00:B7:6E:44:1F' (of which
the first two bytes (10:00) is the real command data and the last 4 bytes
(B7:6E:44:1F) is the MAC for the privileged command).
device |
an open mccr_device_t. |
|
command_id |
the command id. |
|
blob |
binary blob with the command data, or |
|
blob_size |
size of |
|
out_blob |
output location for the response blob, or |
|
out_blob_size |
output location for the size_t with the size of |