function definitions

Aleksander Morgado aleksander at aleksander.es
Wed Feb 12 00:37:32 PST 2014


>
> 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.
>

Yes.

> 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.
>

Well, that is just how the way the generator works. a "Message" for
the generator is a pair of request (host->modem) + response
(modem->host). An "Indication" for the generator is an unsolicited
response (i.e. modem->host only). Indications will only have "output"
fields, no "input" fields as Messages may have.

> 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"?
>

Common TLVs that are used in multiple messages are defined in
/data/qmi-common.json. The "common-ref" is kind of a link to that TLV
definition. In "Message" type JSON definitions, all "output" fields
will have the "common-ref" to the "Operation Result" TLV (0x02).


-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list