diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 09:10:17 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 13:14:38 +0200 |
commit | 33132db8e4e9ba61e724328344722c36b071ea6d (patch) | |
tree | 60df9186c559f6ff893c24c349ba216332180746 | |
parent | 9347e8df7f90763934c0f931b86922a42b71d70a (diff) |
pds: start implementing "Event Report" indication
Currently just some of the TLVs with the raw NMEA traces.
-rw-r--r-- | data/qmi-service-pds.json | 34 | ||||
-rw-r--r-- | libqmi-glib/qmi-enums-pds.h | 44 |
2 files changed, 77 insertions, 1 deletions
diff --git a/data/qmi-service-pds.json b/data/qmi-service-pds.json index fd58fdc..5d54425 100644 --- a/data/qmi-service-pds.json +++ b/data/qmi-service-pds.json @@ -13,6 +13,10 @@ "type" : "Message-ID-Enum" }, // ********************************************************************************* + { "name" : "QMI Indication PDS", + "type" : "Indication-ID-Enum" }, + + // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "PDS", @@ -146,6 +150,34 @@ "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" } ], - "output" : [ { "common-ref" : "Operation Result" } ] } + "output" : [ { "common-ref" : "Operation Result" } ] }, + + { "name" : "Event Report", + "type" : "Indication", + "service" : "PDS", + "id" : "0x0001", + "output" : [ { "name" : "NMEA Position", + "id" : "0x10", + "mandatory" : "no", + "type" : "TLV", + "format" : "string", + "max-size" : "200" }, + { "name" : "Extended NMEA Position", + "id" : "0x11", + "mandatory" : "no", + "type" : "TLV", + "format" : "sequence", + "contents" : [ { "name" : "Operation Mode", + "format" : "gint8", + "public-format" : "QmiPdsOperationMode" }, + { "name" : "NMEA", + "format" : "string", + "max-size" : "200" } ] }, + { "name" : "Position Session Status", + "id" : "0x12", + "mandatory" : "no", + "type" : "TLV", + "format" : "guint8", + "public-format" : "QmiPdsPositionSessionStatus" } ] } ] diff --git a/libqmi-glib/qmi-enums-pds.h b/libqmi-glib/qmi-enums-pds.h index 506ac33..2f0e028 100644 --- a/libqmi-glib/qmi-enums-pds.h +++ b/libqmi-glib/qmi-enums-pds.h @@ -23,5 +23,49 @@ #ifndef _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ +/*****************************************************************************/ +/* Helper enums for the 'QMI PDS Event Report' indication */ + +/** + * QmiPdsOperationMode: + * @QMI_PDS_OPERATION_MODE_UNKNOWN: Unknown (position not fixed yet). + * @QMI_PDS_OPERATION_MODE_STANDALONE: Standalone. + * @QMI_PDS_OPERATION_MODE_MS_BASED: MS based. + * @QMI_PDS_OPERATION_MODE_MS_ASSISTED: MS assisted. + * + * Operation mode used to compute the position. + */ +typedef enum { + QMI_PDS_OPERATION_MODE_UNKNOWN = -1, + QMI_PDS_OPERATION_MODE_STANDALONE = 0, + QMI_PDS_OPERATION_MODE_MS_BASED = 1, + QMI_PDS_OPERATION_MODE_MS_ASSISTED = 2 +} QmiPdsOperationMode; + +/** + * QmiPdsPositionSessionStatus: + * @QMI_PDS_POSITION_SESSION_STATUS_SUCCESS: Success. + * @QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS: In progress. + * @QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE: General failure. + * @QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT: Timeout. + * @QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION: User ended session. + * @QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER: Bad parameter. + * @QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE: Phone is offline. + * @QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED: Engine locked. + * @QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS: Emergency call in progress. + * + * Status of the positioning session. + */ +typedef enum { + QMI_PDS_POSITION_SESSION_STATUS_SUCCESS = 0x00, + QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS = 0x01, + QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE = 0x02, + QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT = 0x03, + QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION = 0x04, + QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER = 0x05, + QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE = 0x06, + QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED = 0x07, + QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS = 0x08 +} QmiPdsPositionSessionStatus; #endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */ |