public ble_msg_test_debug_rsp_t ble_cmd_test_debug(int opcode, byte[] input)
{
log("ble_cmd_test_debug_id");
byte[] _data = new byte[SIZE_HEADER + 0 + 1 + 1 + input.Length];
int idx = 0;
// header
_data[idx++] = (byte)ble_dev_types.ble_dev_type_ble|(byte)ble_msg_types.ble_msg_type_cmd|0x0;
_data[idx++] = (byte)(0 + 1 + 1 + input.Length);
_data[idx++] = (byte)ble_classes.ble_cls_test;
_data[idx++] = (byte)ble_command_ids.ble_cmd_test_debug_id;
// data
_data[idx++] = (byte)opcode;
_data[idx++] = (byte)(input.Length);
for(int i = 0; i < input.Length; i++)
{
_data[idx++] = input[i];
}
// send
BgApiResponse response = Send(new BgApiCommand() { Data = _data }, false);
return (ble_msg_test_debug_rsp_t)response;
}