diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 09:13:03 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 13:14:38 +0200 |
commit | c8137b6d0f27ea7b012d9c0656b437140d42f68f (patch) | |
tree | 596bc804c4117005c6b18ef1294adc563e82f560 | |
parent | 33132db8e4e9ba61e724328344722c36b071ea6d (diff) | |
download | external_libqmi-c8137b6d0f27ea7b012d9c0656b437140d42f68f.zip external_libqmi-c8137b6d0f27ea7b012d9c0656b437140d42f68f.tar.gz external_libqmi-c8137b6d0f27ea7b012d9c0656b437140d42f68f.tar.bz2 |
pds: new TODO to include parsing all TLVs in the "Event Report" indication
The GPS module can give us already processed information in addition to the raw
NMEA traces, including GPS/UTC date, latitude/longitude, DOPs...
Add a TODO task to process these additional TLVs, which will require changes in
the codegen in order to handle single-precision and double-precision float
number reading.
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | data/qmi-service-pds.json | 76 | ||||
-rw-r--r-- | libqmi-glib/qmi-enums-pds.h | 54 |
3 files changed, 132 insertions, 0 deletions
@@ -43,3 +43,5 @@ List of things left for later: * nas: Define the 'QmiNasRegistrationRejectCause' enum for the "Event Report" indication and "Get System Info" response. + + * pds: Parse all possible TLVs in the Event Report indications diff --git a/data/qmi-service-pds.json b/data/qmi-service-pds.json index 5d54425..c45fb70 100644 --- a/data/qmi-service-pds.json +++ b/data/qmi-service-pds.json @@ -180,4 +180,80 @@ "format" : "guint8", "public-format" : "QmiPdsPositionSessionStatus" } ] } + // TODO: parse all TLVs of this indication + // Reading gfloat/gdouble is still missing + //{ "name" : "Parsed Position", + // "id" : "0x13", + // "mandatory" : "no", + // "type" : "TLV", + // "format" : "sequence", + // "contents" : [ { "name" : "Valid Mask", + // "format" : "gint8" }, + // { "name" : "Timestamp Calendar", + // "format" : "struct", + // "contents" : [ { "name" : "Year", + // "format" : "guint16" }, + // { "name" : "Month", + // "format" : "guint8" }, + // { "name" : "Day Of Week", + // "format" : "guint8" }, + // { "name" : "Day of Month", + // "format" : "guint8" }, + // { "name" : "Hour", + // "format" : "guint8" }, + // { "name" : "Minute", + // "format" : "guint8" }, + // { "name" : "Second", + // "format" : "guint8" }, + // { "name" : "Millisecond", + // "format" : "guint16" } ] }, + // { "name" : "Leap Seconds", + // "format" : "guint8" }, + // { "name" : "Timestamp UTC", + // "format" : "guint64" }, + // { "name" : "Time Uncertainty", + // "format" : "guint32" }, + // { "name" : "Latitude", + // "format" : "gdouble" }, + // { "name" : "Longitude", + // "format" : "gdouble" }, + // { "name" : "Altitude Ellipsoid", + // "format" : "gfloat" }, + // { "name" : "Altitude Sea Level", + // "format" : "gfloat" }, + // { "name" : "Horizontal Speed", + // "format" : "gfloat" }, + // { "name" : "Vertical Speed", + // "format" : "gfloat" }, + // { "name" : "Heading", + // "format" : "gfloat" }, + // { "name" : "Horizontal Uncertainty Circular", + // "format" : "gfloat" }, + // { "name" : "Horizontal Uncertainty Ellipse Semi Major", + // "format" : "gfloat" }, + // { "name" : "Horizontal Uncertainty Ellipse Semi Minor", + // "format" : "gfloat" }, + // { "name" : "Horizontal Uncertainty Ellipse Orient Azimuth", + // "format" : "gfloat" }, + // { "name" : "Vertical Uncertainty", + // "format" : "gfloat" }, + // { "name" : "Horizontal Velocity Uncertainty", + // "format" : "gfloat" }, + // { "name" : "Vertical Velocity Uncertainty", + // "format" : "gfloat" }, + // { "name" : "Horizontal confidence", + // "format" : "guint8" }, + // { "name" : "Position DOP", + // "format" : "gfloat" }, + // { "name" : "Horizontal DOP", + // "format" : "gfloat" }, + // { "name" : "Vertical DOP", + // "format" : "gfloat" }, + // { "name" : "Operation Mode", + // "format" : "gint8", + // "public-format" : "QmiPdsOperationMode" } ], + // "prerequisites": [ { "field" : "Position Session Status", + // "operation" : "<=", + // "value" : "QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS" } ] } ] } + ] diff --git a/libqmi-glib/qmi-enums-pds.h b/libqmi-glib/qmi-enums-pds.h index 2f0e028..b20a0b9 100644 --- a/libqmi-glib/qmi-enums-pds.h +++ b/libqmi-glib/qmi-enums-pds.h @@ -68,4 +68,58 @@ typedef enum { QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS = 0x08 } QmiPdsPositionSessionStatus; +/** + * QmiPdsDataValid: + * @QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR: Timestamp calendar (GPS time). + * @QMI_PDS_DATA_VALID_TIMESTAMP_UTC: Timestamp (UTC). + * @QMI_PDS_DATA_VALID_LEAP_SECONDS: Leap seconds. + * @QMI_PDS_DATA_VALID_TIME_UNCERTAINTY: Time uncertainty. + * @QMI_PDS_DATA_VALID_LATITUDE: Latitude. + * @QMI_PDS_DATA_VALID_LONGITUDE: Longitude. + * @QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE: Ellipsoid altitude. + * @QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE: Mean sea level altitude. + * @QMI_PDS_DATA_VALID_HORIZONTAL_SPEED: Horizontal speed. + * @QMI_PDS_DATA_VALID_VERTICAL_SPEED: Vertical speed. + * @QMI_PDS_DATA_VALID_HEADING: Heading. + * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR: Horizontal uncertainty circular. + * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR: Horizontal uncertainty ellipse semi-major. + * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR: Horizontal uncertainty ellipse semi-minor. + * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH: Horizontal uncertainty ellipse orient azimuth. + * @QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY: Vertical uncertainty. + * @QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY: Horizontal velocity uncertainty. + * @QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY: Vertical velocity uncertainty. + * @QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE: Horizontal confidence. + * @QMI_PDS_DATA_VALID_POSITION_DOP: Position dillution of precision. + * @QMI_PDS_DATA_VALID_HORIZONTAL_DOP: Horizontal dillution of precision. + * @QMI_PDS_DATA_VALID_VERTICAL_DOP: Vertical dillution of precision. + * @QMI_PDS_DATA_VALID_OPERATING_MODE: Operating mode. + * + * Flags to indicate which position data parameters are valid. + */ +typedef enum { + QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR = 1 << 0, + QMI_PDS_DATA_VALID_TIMESTAMP_UTC = 1 << 1, + QMI_PDS_DATA_VALID_LEAP_SECONDS = 1 << 2, + QMI_PDS_DATA_VALID_TIME_UNCERTAINTY = 1 << 3, + QMI_PDS_DATA_VALID_LATITUDE = 1 << 4, + QMI_PDS_DATA_VALID_LONGITUDE = 1 << 5, + QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE = 1 << 6, + QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE = 1 << 7, + QMI_PDS_DATA_VALID_HORIZONTAL_SPEED = 1 << 8, + QMI_PDS_DATA_VALID_VERTICAL_SPEED = 1 << 9, + QMI_PDS_DATA_VALID_HEADING = 1 << 10, + QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR = 1 << 11, + QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR = 1 << 12, + QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR = 1 << 13, + QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH = 1 << 14, + QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY = 1 << 15, + QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY = 1 << 16, + QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY = 1 << 17, + QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE = 1 << 18, + QMI_PDS_DATA_VALID_POSITION_DOP = 1 << 19, + QMI_PDS_DATA_VALID_HORIZONTAL_DOP = 1 << 20, + QMI_PDS_DATA_VALID_VERTICAL_DOP = 1 << 21, + QMI_PDS_DATA_VALID_OPERATING_MODE = 1 << 22 +} QmiPdsDataValid; + #endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */ |