summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2021-11-13 23:07:49 +0000
committerDaniel Golle2021-11-17 19:12:34 +0000
commit20cd9075df2dffd4db0aa05addec31733af4f6cb (patch)
tree7edb47e74518e84a096cb508a9bed19b4fce5e04
parent6f956265167945267d676c99f123a8c822f0a77b (diff)
downloaduqmi-20cd9075df2dffd4db0aa05addec31733af4f6cb.tar.gz
uqmi: use unmodified upstream JSON files
Extend code generator to handle also identifiers starting with a numerical character. Suggested-by: Koen Vandeputte <koen.vandeputte@citymesh.com> Acked-by: Oskari Lemmelä <oskari@lemmela.net> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--data/gen-common.pm1
-rw-r--r--data/qmi-service-nas.json6
-rw-r--r--data/qmi-service-wms.json4
3 files changed, 6 insertions, 5 deletions
diff --git a/data/gen-common.pm b/data/gen-common.pm
index e951776..278afce 100644
--- a/data/gen-common.pm
+++ b/data/gen-common.pm
@@ -32,6 +32,7 @@ sub gen_cname($) {
my $name = shift;
$name =~ s/[^a-zA-Z0-9_]/_/g;
+ $name = "_${name}" if $name =~ /^\d/;
return lc($name);
}
diff --git a/data/qmi-service-nas.json b/data/qmi-service-nas.json
index fbf79c2..2602e40 100644
--- a/data/qmi-service-nas.json
+++ b/data/qmi-service-nas.json
@@ -2074,7 +2074,7 @@
"format" : "guint8",
"public-format" : "gboolean" } ],
"output" : [ { "common-ref" : "Operation Result" },
- { "name" : "EONS PLMN Name 3GPP",
+ { "name" : "3GPP EONS PLMN Name",
"id" : "0x10",
"type" : "TLV",
"since" : "1.28",
@@ -3765,7 +3765,7 @@
"format" : "gint32" },
{ "name" : "SINR",
"format" : "gint32" } ] },
- { "name" : "Signal Strength 5G",
+ { "name" : "5G Signal Strength",
"id" : "0x17",
"type" : "TLV",
"since" : "1.26.2",
@@ -3774,7 +3774,7 @@
"format" : "gint16" },
{ "name" : "SNR",
"format" : "gint16" } ] },
- { "name" : "Signal Strength 5G Extended",
+ { "name" : "5G Signal Strength Extended",
"id" : "0x18",
"type" : "TLV",
"since" : "1.26.2",
diff --git a/data/qmi-service-wms.json b/data/qmi-service-wms.json
index 7bd105a..ea23cf7 100644
--- a/data/qmi-service-wms.json
+++ b/data/qmi-service-wms.json
@@ -515,7 +515,7 @@
{ "name" : "Success",
"format" : "guint8",
"public-format" : "gboolean" } ] },
- { "name" : "Failure Information 3GPP2",
+ { "name" : "3GPP2 Failure Information",
"id" : "0x10",
"type" : "TLV",
"since" : "1.28",
@@ -526,7 +526,7 @@
{ "name" : "Cause Code",
"format" : "guint8",
"public-format" : "QmiWmsCdmaCauseCode" } ] },
- { "name" : "Failure Information 3GPP",
+ { "name" : "3GPP Failure Information",
"id" : "0x11",
"type" : "TLV",
"since" : "1.28",