qmic/tests/two_packages.qmi
Alex Elder 83931b750f parser: introduce qmi_package_parse()
Rename parse_package() to be qmi_package_parse(), and have it assign
the qmi_package pointer internally rather returning it.  This makes
the function name match the pattern used for all other production
rules.

The one caller of qmi_package_parse() assumes the package name has
been specified.  When parsing has completed, check to ensure the
package is specified, and only allow it to be specified once.

Signed-off-by: Alex Elder <elder@linaro.org>
Message-Id: <20211001232338.769309-26-elder@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-10-04 12:32:25 -05:00

20 lines
275 B
Plaintext

package test;
package test2;
struct qmi_result {
u16 result;
u16 error;
};
request test_request {
required u8 test_number = 0x12;
} = 0x23;
response test_response {
required qmi_result r = 2;
} = 043;
indication test_indication {
optional u64 value = 0x99;
} = 0x7;