diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-11-05 16:28:53 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-11-05 16:28:53 +0000 |
commit | 4ceb76265a0773426aba617f6a53ca3efaebb586 (patch) | |
tree | 168152ae18b17cda2492c50efdcacb53e4f7ac93 /asn1/lcsap | |
parent | f88ffd78f3f05f99b9bbddc89d38a0414a7ad166 (diff) |
Dissect the positioning data.
svn path=/trunk/; revision=45932
Diffstat (limited to 'asn1/lcsap')
-rw-r--r-- | asn1/lcsap/lcsap.cnf | 29 | ||||
-rw-r--r-- | asn1/lcsap/packet-lcsap-template.c | 124 |
2 files changed, 148 insertions, 5 deletions
diff --git a/asn1/lcsap/lcsap.cnf b/asn1/lcsap/lcsap.cnf index 5aa62fe5da..45d6a6f1aa 100644 --- a/asn1/lcsap/lcsap.cnf +++ b/asn1/lcsap/lcsap.cnf @@ -158,11 +158,6 @@ ProtocolIE-Field/value ie_field_value # asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars); # END - - - - - # following construction is not supported by asn2wrs # PLMN-ID ::= TBCD-STRING (SIZE (3)) # TBCD-STRING ::= OCTET STRING @@ -180,6 +175,30 @@ ProtocolIE-Field/value ie_field_value dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, TRUE); #.END +#.FN_BODY Positioning-Method-And-Usage VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + +%(DEFAULT_BODY)s + + if (!parameter_tvb) + return offset; + + proto_tree_add_item(tree, hf_lcsap_pos_method, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_lcsap_pos_usage, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + + +#.FN_BODY GNSS-Positioning-Method-And-Usage VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + +%(DEFAULT_BODY)s + + if (!parameter_tvb) + return offset; + + proto_tree_add_item(tree, hf_lcsap_gnss_pos_method, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_lcsap_gnss_id, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_lcsap_gnss_pos_usage, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + #.TYPE_ATTR ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(lcsap_ProtocolIE_ID_vals) #.ASSIGN_VALUE_TO_TYPE # LCSAP does not have constants assigned to types, they are pure INTEGER diff --git a/asn1/lcsap/packet-lcsap-template.c b/asn1/lcsap/packet-lcsap-template.c index 9d3baf6eaf..5191869119 100644 --- a/asn1/lcsap/packet-lcsap-template.c +++ b/asn1/lcsap/packet-lcsap-template.c @@ -65,6 +65,12 @@ struct pro_code { /* Initialize the protocol and registered fields */ static int proto_lcsap = -1; + +static int hf_lcsap_pos_method = -1; +static int hf_lcsap_pos_usage = -1; +static int hf_lcsap_gnss_pos_method = -1; +static int hf_lcsap_gnss_id = -1; +static int hf_lcsap_gnss_pos_usage = -1; #include "packet-lcsap-hf.c" /* Initialize the subtree pointers */ @@ -94,6 +100,97 @@ static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, pro static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); + +/* 7.4.13 Positioning Data + * Coding of positioning method (bits 8-4) + */ +static const value_string lcsap_pos_method_vals[] = { + { 0x00, "Cell ID" }, + { 0x01, "Reserved" }, + { 0x02, "E-CID" }, + { 0x03, "Reserved" }, + { 0x04, "OTDOA" }, + { 0x05, "Reserved" }, + { 0x06, "Reserved" }, + { 0x07, "Reserved" }, + { 0x08, "U-TDOA" }, + { 0x09, "Reserved" }, + { 0x0a, "Reserved" }, + { 0x0b, "Reserved" }, + { 0x0c, "Reserved for other location technologies" }, + { 0x0d, "Reserved for other location technologies" }, + { 0x0e, "Reserved for other location technologies" }, + { 0x0f, "Reserved for other location technologies" }, + { 0x10, "Reserved for network specific positioning methods" }, + { 0x11, "Reserved for network specific positioning methods" }, + { 0x12, "Reserved for network specific positioning methods" }, + { 0x13, "Reserved for network specific positioning methods" }, + { 0x14, "Reserved for network specific positioning methods" }, + { 0x15, "Reserved for network specific positioning methods" }, + { 0x16, "Reserved for network specific positioning methods" }, + { 0x17, "Reserved for network specific positioning methods" }, + { 0x18, "Reserved for network specific positioning methods" }, + { 0x19, "Reserved for network specific positioning methods" }, + { 0x1a, "Reserved for network specific positioning methods" }, + { 0x1b, "Reserved for network specific positioning methods" }, + { 0x1c, "RReserved for network specific positioning methods" }, + { 0x1d, "Reserved for network specific positioning methods" }, + { 0x1e, "Reserved for network specific positioning methods" }, + { 0x0f, "Reserved for network specific positioning methods" }, + { 0, NULL } +}; + +/* Coding of usage (bits 3-1)*/ +static const value_string lcsap_pos_usage_vals[] = { + { 0x00, "Attempted unsuccessfully due to failure or interruption - not used" }, + { 0x01, "Attempted successfully: results not used to generate location - not used." }, + { 0x02, "Attempted successfully: results used to verify but not generate location - not used." }, + { 0x03, "Attempted successfully: results used to generate location" }, + { 0x04, "Attempted successfully: case where UE supports multiple mobile based positioning methods \n" + "and the actual method or methods used by the UE cannot be determined." }, + { 0x05, "Reserved" }, + { 0x06, "Reserved" }, + { 0x07, "Reserved" }, + { 0, NULL } +}; + +/* Coding of Method (Bits 8-7) */ +static const value_string lcsap_gnss_pos_method_vals[] = { + { 0x00, "UE-Based" }, + { 0x01, "UE-Assisted" }, + { 0x02, "Conventional" }, + { 0x03, "Reserved" }, + { 0, NULL } +}; + +/* Coding of GNSS ID (Bits 6-4) */ +static const value_string lcsap_gnss_id_vals[] = { + { 0x00, "GPS" }, + { 0x01, "Galileo" }, + { 0x02, "SBAS" }, + { 0x03, "Modernized GPS" }, + { 0x04, "QZSS" }, + { 0x05, "GLONASS" }, + { 0x06, "Reserved" }, + { 0x07, "Reserved" }, + { 0, NULL } +}; + +/* Coding of usage (bits 3- 1) */ +static const value_string lcsap_gnss_pos_usage_vals[] = { + { 0x00, "Attempted unsuccessfully due to failure or interruption" }, + { 0x01, "Attempted successfully: results not used to generate location" }, + { 0x02, "Attempted successfully: results used to verify but not generate location" }, + { 0x03, "Attempted successfully: results used to generate location" }, + { 0x04, "Attempted successfully: case where UE supports multiple mobile based positioning methods \n" + "and the actual method or methods used by the UE cannot be determined." }, + { 0x05, "Reserved" }, + { 0x06, "Reserved" }, + { 0x07, "Reserved" }, + { 0, NULL } +}; + + #include "packet-lcsap-fn.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) @@ -173,6 +270,33 @@ void proto_register_lcsap(void) { /* List of fields */ static hf_register_info hf[] = { + /* 7.4.13 Positioning Data */ + { &hf_lcsap_pos_method, + { "Positioning Method", "lcsap.pos_method", + FT_UINT8, BASE_DEC, VALS(lcsap_pos_method_vals), 0xf8, + NULL, HFILL } + }, + { &hf_lcsap_pos_usage, + { "Positioning usage", "lcsap.pos_usage", + FT_UINT8, BASE_DEC, VALS(lcsap_pos_usage_vals), 0x07, + NULL, HFILL } + }, + { &hf_lcsap_gnss_pos_method, + { "GNSS Positioning Method", "lcsap.gnss_pos_method", + FT_UINT8, BASE_DEC, VALS(lcsap_gnss_pos_method_vals), 0xc0, + NULL, HFILL } + }, + { &hf_lcsap_gnss_id, + { "GNSS ID", "lcsap.gnss_id", + FT_UINT8, BASE_DEC, VALS(lcsap_gnss_id_vals), 0x38, + NULL, HFILL } + }, + { &hf_lcsap_gnss_pos_usage, + { "GNSS Positioning usage", "lcsap.gnss_pos_usage", + FT_UINT8, BASE_DEC, VALS(lcsap_gnss_pos_usage_vals), 0x07, + NULL, HFILL } + }, + #include "packet-lcsap-hfarr.c" }; |