summaryrefslogtreecommitdiff
path: root/ais_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-28 20:03:58 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-28 20:03:58 +0000
commit71fd9148a8f65c9ecfd4c2c93faa8046729922fa (patch)
treef4e09c127cbfbd485066143d8966da989120f523 /ais_json.c
parentc2186c86d6b36976f89bf622127b039e3a478993 (diff)
downloadgpsd-71fd9148a8f65c9ecfd4c2c93faa8046729922fa.tar.gz
AIS message types 1, 2 and 3 JSON decoding.
Diffstat (limited to 'ais_json.c')
-rw-r--r--ais_json.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ais_json.c b/ais_json.c
index cd2b2db2..8147d402 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -39,6 +39,18 @@ int json_ais_read(const char *buf,
const struct json_attr_t json_ais1[] = {
AIS_HEADER
+ {"status", uinteger, .addr.uinteger = &ais->type123.status},
+ {"turn", integer, .addr.integer = &ais->type123.turn},
+ {"speed", uinteger, .addr.uinteger = &ais->type123.speed},
+ {"accuracy", boolean, .addr.boolean = &ais->type123.accuracy},
+ {"lon", integer, .addr.integer = &ais->type123.lon},
+ {"lat", integer, .addr.integer = &ais->type123.lat},
+ {"course", uinteger, .addr.uinteger = &ais->type123.course},
+ {"heading", uinteger, .addr.uinteger = &ais->type123.heading},
+ {"second", uinteger, .addr.uinteger = &ais->type123.second},
+ {"maneuver", uinteger, .addr.uinteger = &ais->type123.maneuver},
+ {"raim", boolean, .addr.boolean = &ais->type123.raim},
+ {"radio", uinteger, .addr.uinteger = &ais->type123.radio},
{NULL},
};