diff --git a/epan/dissectors/packet-lg8979.c b/epan/dissectors/packet-lg8979.c index 8e781a0074..57adf3d430 100644 --- a/epan/dissectors/packet-lg8979.c +++ b/epan/dissectors/packet-lg8979.c @@ -1,7 +1,7 @@ /* packet-lg8979.c * Routines for Landis & Gyr (Telegyr) 8979 Protocol (lg8979) Dissection * By Chris Bontje (cbontje[AT]gmail.com - * Copyright 2013-2014 + * Copyright 2013-2016 * ************************************************************************************************ * Wireshark - Network traffic analyzer @@ -125,6 +125,8 @@ static int hf_lg8979_pul_output_base = -1; static int hf_lg8979_pul_output_dur = -1; static int hf_lg8979_pul_output_rl = -1; static int hf_lg8979_ang_deadband = -1; +static int hf_lg8979_ang_group = -1; +static int hf_lg8979_ang_group_pts = -1; static int hf_lg8979_acc_preset = -1; static int hf_lg8979_rtucfg_num_chassis = -1; static int hf_lg8979_rtucfg_chassis_num = -1; @@ -470,6 +472,7 @@ classify_lg8979_packet(tvbuff_t *tvb) case LG8979_FC_SBO_IMEXECUTE: case LG8979_FC_TIME_SYNC: case LG8979_FC_ANG_DEADBAND: + case LG8979_FC_ANGGRP_DEFINE: case LG8979_FC_ACC_PRESET: case LG8979_FC_CONT_REQUEST: @@ -498,15 +501,15 @@ dissect_lg8979(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ { /* Set up structures needed to add the protocol subtree and manage it */ proto_item *lg8979_item, *lg8979_flags_item = NULL, *lg8979_point_item = NULL; - proto_item *lg8979_slot_item = NULL; + proto_item *lg8979_slot_item = NULL, *lg8979_ang_group_pts_item = NULL; proto_tree *lg8979_tree, *lg8979_flags_tree = NULL, *lg8979_fc_tree = NULL; proto_tree *lg8979_point_tree = NULL, *lg8979_ts_tree = NULL; int offset = 0; - guint8 rtu_addr, func, packet_type, data_len, ptnum8, tripclose, rl, exp_code; + guint8 rtu_addr, func, packet_type, data_len, ptnum8, tripclose, rl, exp_code, num_chassis; guint8 ts_mon, ts_day, ts_hr, ts_min, ts_sec; guint16 ptnum, ptval, ana12_val; guint16 ts_ms; - gint num_points = 0, cnt = 0; + gint num_points = 0, cnt = 0, cnt1 = 0; gboolean shr, con, frz, ind, sch, slg, ack, comma_needed = FALSE, new_status, change; /* Make entries in Protocol column on summary display */ @@ -585,6 +588,12 @@ dissect_lg8979(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ offset += 4; break; + /* Function Code 2 Analog Group Change Report */ + case LG8979_FC_ANGGRP_CHGRPT: + proto_tree_add_item(lg8979_tree, hf_lg8979_ang_group, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + break; + /* Function Code 11 Digital Input Force Report */ /* Function Code 13 Accumulator Force Report */ case LG8979_FC_DIG_FRCRPT: @@ -718,6 +727,23 @@ dissect_lg8979(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ break; + /* Function Code 35 Analog Group Define */ + case LG8979_FC_ANGGRP_DEFINE: + + proto_tree_add_item(lg8979_tree, hf_lg8979_ang_group, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(lg8979_tree, hf_lg8979_start_ptnum16, tvb, offset+1, 2, ENC_LITTLE_ENDIAN); + offset += 3; + + num_points = (data_len-3); + + for (cnt=0; cnt