diff --git a/src/connectivity/telephony/lib/qmi-protocol/protocol/ctl.json b/src/connectivity/telephony/lib/qmi-protocol/protocol/ctl.json index 6a2c34548fb90a0801260ca97e8e39373c01d469..9016bca49d9649efa701804fe4b0c286c1bb3614 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/protocol/ctl.json +++ b/src/connectivity/telephony/lib/qmi-protocol/protocol/ctl.json @@ -13,14 +13,14 @@ { "param": "host_driver", "id": "0x01", - "size": 1 + "type": "uint8" } ], "response": [ { "param": "link_id", "id": "0x01", - "size": 2 + "type": "uint16" } ] }, @@ -32,21 +32,21 @@ { "param": "svc_type", "id": "0x01", - "size": 1 + "type": "uint8" } ], "response": [ { "param": "client_id", "id": "0x01", - "size": 2, + "type": "uint16", "subparams": [ { - "size": 1, + "type": "uint8", "param": "svc_type" }, { - "size": 1, + "type": "uint8", "param": "client_id" } ] diff --git a/src/connectivity/telephony/lib/qmi-protocol/protocol/dms.json b/src/connectivity/telephony/lib/qmi-protocol/protocol/dms.json index 1308d35a409d8aa310dc9ffed0c0cbfd3148fa0d..69c40fcd207b2b173f32d7cd945dfeddecf7c002 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/protocol/dms.json +++ b/src/connectivity/telephony/lib/qmi-protocol/protocol/dms.json @@ -14,7 +14,8 @@ "response": [ { "param": "device_manufacturer", - "id": "0x01" + "id": "0x01", + "type": "string" } ] }, @@ -26,18 +27,22 @@ "response": [ { "param": "esn", - "id": "0x10" + "id": "0x10", + "type": "string" }, { "param": "imei", - "id": "0x11" + "id": "0x11", + "type": "string" }, { "param": "meid", + "type": "string", "id": "0x12" }, { "param": "imeisv_svn", + "type": "string", "id": "0x13" } ] @@ -51,14 +56,14 @@ { "param": "power", "id": "0x01", - "size": 2, + "type": "uint16", "subparams": [ { - "size": 1, + "type": "uint8", "param": "power_status" }, { - "size": 1, + "type": "uint8", "param": "battery_lvl" } ] @@ -74,19 +79,19 @@ { "param": "operating_mode", "id": "0x01", - "size": 1 + "type": "uint8" }, { "param": "offline_reason", "id": "0x10", "optional": true, - "size": 2 + "type": "uint16" }, { "param": "hardware_controlled_mode", "id": "0x11", "optional": true, - "size": 1 + "type": "uint8" } ] } diff --git a/src/connectivity/telephony/lib/qmi-protocol/protocol/nas.json b/src/connectivity/telephony/lib/qmi-protocol/protocol/nas.json index f8a9e745d6be80088379752ecd33fac5b2513a58..5086fcacc1fbc8af323d73947ebb21cad8b96c67 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/protocol/nas.json +++ b/src/connectivity/telephony/lib/qmi-protocol/protocol/nas.json @@ -15,15 +15,15 @@ { "param": "signal_strength", "id": "0x01", - "size": 2, + "type": "uint16", "subparams": [ { "param": "signal_strength", - "size": 1 + "type": "int8" }, { "param": "radio_interface", - "size": 1 + "type": "uint8" } ] } diff --git a/src/connectivity/telephony/lib/qmi-protocol/protocol/wda.json b/src/connectivity/telephony/lib/qmi-protocol/protocol/wda.json index 9428c58eafa4d027dba2a49ba3af28d774eade00..b68d34c1bda2b61c8843a0ee3aa93652adf192ad 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/protocol/wda.json +++ b/src/connectivity/telephony/lib/qmi-protocol/protocol/wda.json @@ -13,13 +13,13 @@ { "param": "qos_format", "id": "0x10", - "size": 1, + "type": "uint8", "optional": true }, { "param": "link_layer_prot", "id": "0x11", - "size": 4, + "type": "uint32", "optional": true } ], @@ -27,13 +27,13 @@ { "param": "qos_format", "id": "0x10", - "size": 1, + "type": "uint8", "optional": true }, { "param": "link_layer_prot", "id": "0x11", - "size": 4, + "type": "uint32", "optional": true } ] diff --git a/src/connectivity/telephony/lib/qmi-protocol/protocol/wds.json b/src/connectivity/telephony/lib/qmi-protocol/protocol/wds.json index 1ce587bb34fa3bd140e02e806b987a49d52eea18..0909936b7f98becee45030ffccb046c0304c7fd2 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/protocol/wds.json +++ b/src/connectivity/telephony/lib/qmi-protocol/protocol/wds.json @@ -14,12 +14,13 @@ { "param": "apn", "id": "0x14", + "type": "string", "optional": true }, { "param": "ip_family_preference", "id": "0x19", - "size": 1, + "type": "uint8", "optional": true } ], @@ -27,7 +28,7 @@ { "param": "packet_data_handle", "id": "0x01", - "size": 4 + "type": "uint32" } ] }, @@ -39,38 +40,38 @@ { "param": "requested_settings", "id": "0x10", - "size": 4 + "type": "uint32" } ], "response": [ { "param": "ipv4_addr", "id": "0x1E", - "size": 4, + "type": "uint32", "optional": true }, { "param": "ipv4_subnet", "id": "0x21", - "size": 4, + "type": "uint32", "optional": true }, { "param": "ipv4_gateway", "id": "0x20", - "size": 4, + "type": "uint32", "optional": true }, { "param": "ipv4_dns", "id": "0x15", - "size": 4, + "type": "uint32", "optional": true }, { "param": "mtu", "id": "0x29", - "size": 4, + "type": "uint32", "optional": true } ] diff --git a/src/connectivity/telephony/lib/qmi-protocol/src/ast.rs b/src/connectivity/telephony/lib/qmi-protocol/src/ast.rs index 57d5d9010721289a35252f088da22b578efb2621..e39e0368cebff696ec714464a2a1897061b1dd8e 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/src/ast.rs +++ b/src/connectivity/telephony/lib/qmi-protocol/src/ast.rs @@ -12,7 +12,53 @@ use std::collections::HashMap; #[derive(Debug, Serialize, Deserialize)] pub struct SubParam { pub param: String, - pub size: u16, + #[serde(rename = "type")] + pub ty: QmiType, +} + +#[derive(Debug, Copy, Clone, Serialize, Deserialize)] +pub enum QmiType { + #[serde(rename = "int8")] + Int8, + #[serde(rename = "uint8")] + Uint8, + #[serde(rename = "int16")] + Int16, + #[serde(rename = "uint16")] + Uint16, + #[serde(rename = "int32")] + Int32, + #[serde(rename = "uint32")] + Uint32, + #[serde(rename = "string")] + Str, +} + +impl QmiType { + pub fn to_size(&self) -> Option<u16> { + match self { + QmiType::Int8 => Some(1), + QmiType::Uint8 => Some(1), + QmiType::Int16 => Some(2), + QmiType::Uint16 => Some(2), + QmiType::Int32 => Some(4), + QmiType::Uint32 => Some(4), + QmiType::Str => None, + } + } + + pub fn to_rust_str(&self) -> String { + match self { + QmiType::Int8 => "i8", + QmiType::Uint8 => "u8", + QmiType::Int16 => "i16", + QmiType::Uint16 => "u16", + QmiType::Int32 => "i32", + QmiType::Uint32 => "u32", + QmiType::Str => "String", + } + .to_string() + } } #[derive(Debug, Serialize, Deserialize)] @@ -20,7 +66,8 @@ pub struct TLV { pub param: String, #[serde(deserialize_with = "from_hex_str")] pub id: u16, - pub size: Option<u16>, + #[serde(rename = "type")] + pub ty: QmiType, #[serde(default)] pub optional: bool, #[serde(default, rename = "subparams")] diff --git a/src/connectivity/telephony/lib/qmi-protocol/src/codegen.rs b/src/connectivity/telephony/lib/qmi-protocol/src/codegen.rs index 26402b96fe4804ecbfe5f70b426eaa31d078d942..dfe1c779c8bb1b119db3f462f4f5b7e72145b8bb 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/src/codegen.rs +++ b/src/connectivity/telephony/lib/qmi-protocol/src/codegen.rs @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -use crate::ast::{Message, Service, ServiceSet, Structure, SubParam, TLV}; -use failure::Error; +use crate::ast::{Message, QmiType, Service, ServiceSet, Structure, SubParam, TLV}; +use failure::{format_err, Error}; use std::io; pub struct Codegen<'a, W: io::Write> { @@ -11,17 +11,8 @@ pub struct Codegen<'a, W: io::Write> { depth: usize, } -fn type_fmt(ty: Option<u16>, optional: bool) -> String { - let ty = match ty { - Some(size) => match size { - 1 => "u8", - 2 => "u16", - 4 => "u32", - _ => panic!("Invalid size to type conversion: {}", size), - }, - None => "String", - } - .to_string(); +fn type_fmt(ty: QmiType, optional: bool) -> String { + let ty = ty.to_rust_str(); if optional { format!("Option<{}>", ty) @@ -60,11 +51,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { Codegen { w, depth: 0 } } - pub fn codegen_svc_tlv_encode( - &mut self, - field: &TLV, - _structure: &Structure, - ) -> Result<(), Error> { + fn codegen_svc_tlv_encode(&mut self, field: &TLV, _structure: &Structure) -> Result<(), Error> { if field.optional { writeln_indent!(self, "if let Some(ref {}) = self.{} {{", field.param, field.param); indent!(self); @@ -82,44 +69,62 @@ impl<'a, W: io::Write> Codegen<'a, W> { // service msg type writeln_indent!(self, "buf.put_u8({});", field.id); - match field.size { - None => { + match field.ty { + QmiType::Str => { // service msg length (variable) writeln_indent!(self, "buf.put_u16_le({}.as_bytes().len() as u16);", field.param); // service msg value writeln_indent!(self, "buf.put_slice({}.as_bytes());", field.param); } - Some(size) => { + sized_type => { // service msg length (fixed size) - writeln_indent!(self, "buf.put_u16_le({});", size); + writeln_indent!(self, "buf.put_u16_le({});", sized_type.to_size().unwrap()); // service msg value if field.has_sub_params() { for param in field.sub_params.iter() { - match param.size { - 1 => { - writeln_indent!(self, "buf.put_u8(*{});", param.param); + match param.ty { + QmiType::Str => { + return Err(format_err!( + "No way to handle an unsized type in a subparam" + )) } - 2 => { - writeln_indent!(self, "buf.put_u16_le(*{});", param.param); + QmiType::Uint8 | QmiType::Int8 => { + writeln_indent!( + self, + "buf.put_{}(*{});", + param.ty.to_rust_str(), + param.param + ); } - 4 => { - writeln_indent!(self, "buf.put_u32_le(*{});", param.param); + _ => { + writeln_indent!( + self, + "buf.put_{}_le(*{});", + param.ty.to_rust_str(), + param.param + ); } - _ => panic!("invalid field size: {}", size), } } } else { - match size { - 1 => { - writeln_indent!(self, "buf.put_u8(*{});", field.param); + match sized_type { + QmiType::Uint8 | QmiType::Int8 => { + writeln_indent!( + self, + "buf.put_{}(*{});", + sized_type.to_rust_str(), + field.param + ); } - 2 => { - writeln_indent!(self, "buf.put_u16_le(*{});", field.param); + QmiType::Str => unreachable!("handled above"), + _ => { + writeln_indent!( + self, + "buf.put_{}_le(*{});", + sized_type.to_rust_str(), + field.param + ); } - 4 => { - writeln_indent!(self, "buf.put_u32_le(*{});", field.param); - } - _ => panic!("invalid field size: {}", size), } } } @@ -133,25 +138,23 @@ impl<'a, W: io::Write> Codegen<'a, W> { Ok(()) } - pub fn codegen_svc_decode_subfield(&mut self, field: &SubParam) -> Result<(), Error> { - match field.size { - 1 => { - writeln_indent!(self, "{} = buf.get_u8();", field.param); - } - 2 => { - writeln_indent!(self, "{} = buf.get_u16_le();", field.param); - } - 4 => { - writeln_indent!(self, "{} = buf.get_u32_le();", field.param); + // This function should not decrement the total size + fn codegen_svc_decode_subfield(&mut self, field: &SubParam) -> Result<(), Error> { + match field.ty { + QmiType::Str => return Err(format_err!("Cannot have unsized types in subparams")), + QmiType::Uint8 | QmiType::Int8 => { + writeln_indent!(self, "{} = buf.get_{}();", field.param, field.ty.to_rust_str()); + }, + _ => { + writeln_indent!(self, "{} = buf.get_{}_le();", field.param, field.ty.to_rust_str()); } - _ => panic!("invalid field size: {}", field.size), } Ok(()) } - pub fn codegen_svc_decode_field(&mut self, field: &TLV) -> Result<(), Error> { - match field.size { - None => { + fn codegen_svc_decode_field(&mut self, field: &TLV) -> Result<(), Error> { + match field.ty { + QmiType::Str => { writeln_indent!(self, "let dst = buf.by_ref().take(tlv_len as usize).collect();"); writeln_indent!(self, "total_len -= tlv_len;"); if field.optional { @@ -164,48 +167,51 @@ impl<'a, W: io::Write> Codegen<'a, W> { writeln_indent!(self, "{} = String::from_utf8(dst).unwrap();", field.param); } } - Some(size) => { - match size { - 1 => { - if field.optional { - writeln_indent!(self, "{} = Some(buf.get_u8());", field.param); - } else { - writeln_indent!(self, "{} = buf.get_u8();", field.param); - } - writeln_indent!(self, "total_len -= 1;"); + sized_type => { + if field.has_sub_params() { + // TODO check the subparam size is equal to the whole type + for param in field.sub_params.iter() { + self.codegen_svc_decode_subfield(param)?; } - 2 => { - if field.has_sub_params() { - // TODO check the subparam size is equal to the whole type - for param in field.sub_params.iter() { - self.codegen_svc_decode_subfield(param)?; - } - } else { + } else { + match sized_type { + QmiType::Uint8 | QmiType::Int8 => { if field.optional { - writeln_indent!(self, "{} = Some(buf.get_u16_le());", field.param); + writeln_indent!( + self, + "{} = Some(buf.get_{}());", + field.param, + field.ty.to_rust_str() + ); } else { - writeln_indent!(self, "{} = buf.get_u16_le();", field.param); + writeln_indent!( + self, + "{} = buf.get_{}();", + field.param, + field.ty.to_rust_str() + ); } } - writeln_indent!(self, "total_len -= 2;"); - } - 4 => { - if field.has_sub_params() { - // TODO check the subparam size is equal to the whole type - for param in field.sub_params.iter() { - self.codegen_svc_decode_subfield(param)?; - } - } else { + _ => { if field.optional { - writeln_indent!(self, "{} = Some(buf.get_u32_le());", field.param); + writeln_indent!( + self, + "{} = Some(buf.get_{}_le());", + field.param, + field.ty.to_rust_str() + ); } else { - writeln_indent!(self, "{} = buf.get_u32_le();", field.param); + writeln_indent!( + self, + "{} = buf.get_{}_le();", + field.param, + field.ty.to_rust_str() + ); } - writeln_indent!(self, "total_len -= 4;"); } } - _ => panic!("invalid field size: {}", size), } + writeln_indent!(self, "total_len -= {};", sized_type.to_size().unwrap()); } } Ok(()) @@ -346,7 +352,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { writeln_indent!(self, "// svc length calculation"); writeln_indent!(self, "let mut {}_len = 0u16;", msg.name); for field in msg.get_request_fields() { - let field_name = match field.size { + let field_name = match field.ty.to_size() { Some(_) => format!("_{}", field.param), None => field.param.clone(), }; @@ -360,7 +366,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { writeln_indent!(self, "{}_len += 2; // tlv length length;", msg.name); writeln_indent!(self, "let {} = &self.{};", field_name, field.param); } - if let Some(size) = field.size { + if let Some(size) = field.ty.to_size() { writeln_indent!(self, "{}_len += {};", msg.name, size); } else { writeln_indent!( @@ -397,7 +403,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { Ok(()) } - pub fn codegen_svc_msg(&mut self, msg: &Message) -> Result<(), Error> { + fn codegen_svc_msg(&mut self, msg: &Message) -> Result<(), Error> { // define the request struct writeln_indent!(self, "pub struct {}Req {{", msg.name); indent!(self); @@ -408,7 +414,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { self, "pub {param}: {ty},", param = param.param, - ty = type_fmt(Some(param.size), field.optional) + ty = type_fmt(param.ty, field.optional) ); } } else { @@ -416,7 +422,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { self, "pub {param}: {ty},", param = field.param, - ty = type_fmt(field.size, field.optional) + ty = type_fmt(field.ty, field.optional) ); } } @@ -430,15 +436,10 @@ impl<'a, W: io::Write> Codegen<'a, W> { for field in msg.get_request_fields() { if field.has_sub_params() { for param in field.sub_params.iter() { - write!( - self.w, - "{}: {},", - param.param, - type_fmt(Some(param.size), field.optional) - )?; + write!(self.w, "{}: {},", param.param, type_fmt(param.ty, field.optional))?; } } else { - write!(self.w, "{}: {},", field.param, type_fmt(field.size, field.optional))?; + write!(self.w, "{}: {},", field.param, type_fmt(field.ty, field.optional))?; } } writeln!(self.w, ") -> Self {{")?; @@ -476,7 +477,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { self, "pub {param}: {ty},", param = param.param, - ty = type_fmt(Some(param.size), false) + ty = type_fmt(param.ty, false) ); } } else { @@ -484,7 +485,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { self, "pub {param}: {ty},", param = field.param, - ty = type_fmt(field.size, field.optional) + ty = type_fmt(field.ty, field.optional) ); } } @@ -494,7 +495,7 @@ impl<'a, W: io::Write> Codegen<'a, W> { Ok(()) } - pub fn codegen_service(&mut self, svc: &Service, structure: &Structure) -> Result<(), Error> { + fn codegen_service(&mut self, svc: &Service, structure: &Structure) -> Result<(), Error> { writeln!(self.w, "pub mod {} {{", svc.name)?; indent!(self); writeln_indent!(self, "use crate::{{Decodable, Encodable}};"); diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/optional_response.test.json b/src/connectivity/telephony/lib/qmi-protocol/tests/optional_response.test.json index c6b4c7fa96432c234f5f8b8d4f19be7d36514345..614bdfb23331f61b41248a9d93d8f25ee9c42119 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/optional_response.test.json +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/optional_response.test.json @@ -20,7 +20,7 @@ { "param": "blah", "id": "0x01", - "size": 2, + "type": "uint16", "optional": true } ] diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/simple_request.test.json b/src/connectivity/telephony/lib/qmi-protocol/tests/simple_request.test.json index ad2be6a82f928d9af73447867a66012127526cb3..740b188f6acd57c288abf79a2fe5fd4bc9536970 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/simple_request.test.json +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/simple_request.test.json @@ -19,7 +19,7 @@ { "param": "blah", "id": "0x01", - "size": 2 + "type": "uint16" } ], "response": [] diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.json b/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.json index a6fa8c77469182a5d663764cdaba7a653513a6fc..645d4e39471e9a0b44cdc3e544df9c3029ad3c5a 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.json +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.json @@ -18,9 +18,14 @@ "request": [], "response": [ { - "param": "blah", + "param": "uint_blah", "id": "0x01", - "size": 2 + "type": "uint16" + }, + { + "param": "int_blah", + "id": "0x03", + "type": "int16" } ] } diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.rs b/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.rs index 506122c0f494923f653a0413ac61b441d7f2295a..77687749f5368f24cc7e8412f10f293fd398328d 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.rs +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/simple_response.test.rs @@ -13,7 +13,8 @@ pub mod TEST { } #[derive(Debug)] pub struct TestResp { - pub blah: u16, + pub uint_blah: u16, + pub int_blah: i16, } impl Encodable for TestReq { fn transaction_id_len(&self) -> u8 { @@ -47,7 +48,8 @@ pub mod TEST { } else { assert_eq!(0x00, buf.get_u16_le()); // this must be zero if no error from above check } - let mut blah = Default::default(); + let mut uint_blah = Default::default(); + let mut int_blah = Default::default(); while total_len > 0 { let msg_id = buf.get_u8(); total_len -= 1; @@ -55,7 +57,11 @@ pub mod TEST { total_len -= 2; match msg_id { 1 => { - blah = buf.get_u16_le(); + uint_blah = buf.get_u16_le(); + total_len -= 2; + } + 3 => { + int_blah = buf.get_i16_le(); total_len -= 2; } 0 => { eprintln!("Found a type of 0, modem gave a bad TLV, trying to recover"); break; } @@ -66,7 +72,8 @@ pub mod TEST { } } Ok(TestResp { - blah, + uint_blah, + int_blah, }) } } diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/string_request_decode.test.json b/src/connectivity/telephony/lib/qmi-protocol/tests/string_request_decode.test.json index 33fe0e573899252cca8e30ed8d12e9b81c553a53..07f39a8a51ad6729e6c8ef700c8c2e3a2ad387e2 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/string_request_decode.test.json +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/string_request_decode.test.json @@ -19,7 +19,8 @@ "response": [ { "param": "blah", - "id": "0x01" + "id": "0x01", + "type": "string" } ] } diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_request.test.json b/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_request.test.json index f3b82a2c71746a58c9dcc0bb85820d194f98fd1a..2510fa525a593f0733da0b007f9aa704ea052122 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_request.test.json +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_request.test.json @@ -19,14 +19,14 @@ { "param": "blah", "id": "0x01", - "size": 2, + "type": "uint16", "subparams": [ { - "size": 1, + "type": "uint8", "param": "part_a" }, { - "size": 1, + "type": "uint8", "param": "part_b" } ] diff --git a/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_response.test.json b/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_response.test.json index 28ddcfbcc8d59d5269206733032fd6fd88901f48..8a260fdb6fdf1c7d735a10743eb553f45023f2eb 100644 --- a/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_response.test.json +++ b/src/connectivity/telephony/lib/qmi-protocol/tests/subparam_response.test.json @@ -20,14 +20,14 @@ { "param": "blah", "id": "0x01", - "size": 2, + "type": "uint16", "subparams": [ { - "size": 1, + "type": "uint8", "param": "part_a" }, { - "size": 1, + "type": "uint8", "param": "part_b" } ]