2 # SampledValue conformation file
17 #.FN_BODY ASDU/smpCnt VAL_PTR = &value
20 sv_data.smpCnt = value;
31 len = tvb_reported_length_remaining(tvb, offset);
35 proto_tree_add_expert_format(tree, actx->pinfo, &ei_sv_mal_utctime, tvb, offset, len,
36 "BER Error: malformed UTCTime encoding, length must be 8 bytes");
39 proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
44 seconds = tvb_get_ntohl(tvb, offset);
45 fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */
46 nanoseconds = (uint32_t)( ((uint64_t)fraction * UINT64_C(1000000000)) / UINT64_C(0x100000000) ) ;
49 ts.nsecs = nanoseconds;
51 ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, true);
55 proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
61 UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
63 #.FN_BODY ASDU/smpSynch VAL_PTR = &value
66 sv_data.smpSynch = value;
69 #.FN_BODY ASDU/smpMod VAL_PTR = &value
72 sv_data.smpMod = value;
76 if (sv_decode_data_as_phsmeas) {
77 offset = dissect_PhsMeas1(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index);
79 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
85 proto_item *gmidentity_ti;
86 proto_tree *gmidentity_tree;
87 const char *manuf_name;
89 len = tvb_reported_length_remaining(tvb, offset);
93 proto_tree_add_expert_format(tree, actx->pinfo, &ei_sv_mal_gmidentity, tvb, offset, len,
94 "BER Error: malformed gmIdentity encoding, length must be 8 bytes");
97 proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
102 gmidentity_ti = proto_tree_add_item(tree, hf_sv_gmidentity, tvb, offset, 8, ENC_BIG_ENDIAN);
104 /* EUI-64: vendor ID | 0xFF - 0xFE | card ID */
105 if (tvb_get_ntohs(tvb, offset + 3) == 0xFFFE) {
106 gmidentity_tree = proto_item_add_subtree(gmidentity_ti, ett_gmidentity);
108 manuf_name = tvb_get_manuf_name(tvb, offset);
109 proto_tree_add_bytes_format_value(gmidentity_tree, hf_sv_gmidentity_manuf, tvb, offset, 3, NULL, "%%s", manuf_name);