diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-19 11:52:35 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-19 12:06:28 +0200 |
commit | 7345ca6aaf57c39eda83650e5d7f87e2d66f5be3 (patch) | |
tree | 5eecb11dc3754e1fc176aefaa503ad7211817d10 /data/qmi-service-dms.json | |
parent | dd82d6c92de205cee1ec8ba675254e83a325043d (diff) |
qmi-codegen: for arrays, use a new 'size-prefix-format' instead of 'array-size'
The 'array-size' property was used to define an implicit variable to be found at
the beginning of every array. This property expected a dictionary with one
single 'format' key.
Instead of this setup, create a new 'size-prefix-format' property which directly
expects the format string of the variable to be used as array-length indicator.
So, instead of:
"array-size" : { "format" : "guint16" }
We can now just use:
"size-prefix-format" : "guint16"
Also, remove the explicit size definitions when the format is "guint8", as that
is the default already when none specified and the array is not of fixed size.
Diffstat (limited to 'data/qmi-service-dms.json')
-rw-r--r-- | data/qmi-service-dms.json | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/data/qmi-service-dms.json b/data/qmi-service-dms.json index 9b407d2..f14685a 100644 --- a/data/qmi-service-dms.json +++ b/data/qmi-service-dms.json @@ -668,14 +668,14 @@ "id" : "0x0037", "version" : "1.6", "output" : [ { "common-ref" : "Operation Result" }, - { "name" : "User Data", - "id" : "0x01", - "mandatory" : "yes", - "type" : "TLV", - "format" : "array", - "array-size" : { "format" : "guint16" }, - "array-element" : { "format" : "guint8" }, - "prerequisites": [ { "common-ref" : "Success" } ] } ] }, + { "name" : "User Data", + "id" : "0x01", + "mandatory" : "yes", + "type" : "TLV", + "format" : "array", + "size-prefix-format" : "guint16", + "array-element" : { "format" : "guint8" }, + "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Write User Data", @@ -683,14 +683,14 @@ "service" : "DMS", "id" : "0x0038", "version" : "1.6", - "input" : [ { "name" : "User Data", - "id" : "0x01", - "mandatory" : "yes", - "type" : "TLV", - "format" : "array", - "array-size" : { "format" : "guint16" }, - "array-element" : { "format" : "guint8" }, - "prerequisites": [ { "common-ref" : "Success" } ] } ], + "input" : [ { "name" : "User Data", + "id" : "0x01", + "mandatory" : "yes", + "type" : "TLV", + "format" : "array", + "size-prefix-format" : "guint16", + "array-element" : { "format" : "guint8" }, + "prerequisites" : [ { "common-ref" : "Success" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* @@ -700,14 +700,14 @@ "id" : "0x0039", "version" : "1.6", "output" : [ { "common-ref" : "Operation Result" }, - { "name" : "ERI File", - "id" : "0x01", - "mandatory" : "yes", - "type" : "TLV", - "format" : "array", - "array-size" : { "format" : "guint16" }, - "array-element" : { "format" : "guint8" }, - "prerequisites": [ { "common-ref" : "Success" } ] } ] }, + { "name" : "ERI File", + "id" : "0x01", + "mandatory" : "yes", + "type" : "TLV", + "format" : "array", + "size-prefix-format" : "guint16", + "array-element" : { "format" : "guint8" }, + "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Restore Factory Defaults", |