function definitions

CHIH HUNG HSIEH chhsieh0309 at gmail.com
Tue Feb 11 19:01:20 PST 2014


Hi Aleksander,

Thank you for the explanation. Here is my understanding and correct me if I
am wrong:

1. In the definition file qmi-service-nas.json

name field "Get System Info"
type field "Message"
service field "NAS"
output field

These four fields mean the code generator will generate a structure which
is named "QmiMessageNasGetSystemInfoOutput", and the other field "id" and
"version" are fixed and must not to be modified because they are the only
and true QMI message identities.

2. Question about the "type" field. I have read the Qualcomm official QMI
NAS API document, the message type of "QMI_NAS_GET_SYS_INFO" (id: 0x004D)
is "Request" and another message "QMI_NAS_SYS_INFO_IND" (id: 0x004E) is
"Indication". However, in the definition file qmi-service-nas.json, the
message type of "System Info" (id: 0x004E) is "Indication" just exactly
same as the definition in Qualcomm document, but the message type of "Get
System Info" (id: 0x004D) is "Message", not "Request" defined in Qualcomm
document. That confused me.

3. Let's go deep in the field "output". What's the meaning / purpose of the
sub-filed "common-ref" and its value "Operation Result"?




2014-02-11 19:41 GMT+08:00 Aleksander Morgado <aleksander at aleksander.es>:

> >
> > Thanks for the explanation. I still have lots questions about the
> function
> > definition in JSON database file. Take the function
> > "qmi_client_nas_get_system_info_finish()" as example
> >
> > 1. How is this function generated? I mean which section of the JSON
> database
> > defines this function call.
> >
>
> Look at the definition of "Get System Info" in /data/qmi-service-nas.json.
>
> That definition  has an "output" variable which is a dictionary
> containing the possible TLVs that may be available in a "Get System
> Info" response. The code generator will take that list of possible
> TLVs and generate methods to get the values from a
> QmiMessageNasGetSystemInfoOutput object which is generated when the
> response is parsed by libqmi. E.g. you will have a
> qmi_message_nas_get_system_info_output_get_sim_reject_info() method to
> read the contents of the optional "SIM Reject Info" TLV. The
> QmiMessageNasGetSystemInfoOutput is the result you'll get in
> qmi_client_nas_get_system_info_finish().
>
> If the QMI message had "input" in addition to "output", you would also
> see APIs to manage the contents of the input TLVs passed in the QMI
> request. You would be in charge of creating an "Input" bundle object
> (e.g. QmiMessageNasConfigSignalInfoInput for the "Config Signal Info"
> message), set the corresponding TLVs through the provided APIs (e.g.
> qmi_message_nas_config_signal_info_input_set_rscp_threshold()) and
> then include that input bundle in the client call (e.g.
> qmi_client_nas_config_signal_info()).
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20140212/f7dbd85e/attachment.html>


More information about the libqmi-devel mailing list