2 # SampledValue conformation file
18 #.FN_BODY ASDU/smpCnt VAL_PTR = &value
21 sv_data.smpCnt = value;
32 len = tvb_length_remaining(tvb, offset);
36 proto_tree_add_expert_format(tree, actx->pinfo, &ei_sv_mal_utctime, tvb, offset, len,
37 "BER Error: malformed UTCTime encoding, length must be 8 bytes");
40 proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
45 seconds = tvb_get_ntohl(tvb, offset);
46 fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */
47 nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ;
50 ts.nsecs = nanoseconds;
52 ptime = abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, TRUE);
56 proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
63 UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
65 #.FN_BODY ASDU/smpSynch VAL_PTR = &value
68 sv_data.smpSynch = value;
71 #.FN_BODY ASDU/smpMod VAL_PTR = &value
74 sv_data.smpMod = value;