1 /* packet-isobus-vt.c
2  * Routines for ISObus VT dissection (Based on CANOpen Dissector)
3  * Copyright 2016, Jeroen Sack <jeroen@jeroensack.nl>
4  * ISO 11783-6
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * SPDX-License-Identifier: GPL-2.0-or-later
11  */
12 
13 #include "config.h"
14 
15 #include <epan/packet.h>
16 #include <epan/prefs.h>
17 #include <wsutil/file_util.h>
18 
19 #define MAX_OBJECT_ID_DB_SIZE 10000
20 
21 void proto_register_isobus_vt(void);
22 void proto_reg_handoff_isobus_vt(void);
23 
24 static guint8 current_vt_version = 0;
25 
26 /* Initialize the protocol and registered fields */
27 static int proto_vt = -1;
28 static int hf_isobus_vt = -1;
29 static int hf_isobus_vt_command = -1;
30 static int hf_isobus_vt_objectid = -1;
31 static int hf_isobus_vt_softkey_keyactcode = -1;
32 static int hf_isobus_vt_softkey_objectid = -1;
33 static int hf_isobus_vt_softkey_parentobjectid = -1;
34 static int hf_isobus_vt_softkey_keynumber = -1;
35 static int hf_isobus_vt_button_keyactcode = -1;
36 static int hf_isobus_vt_button_objectid = -1;
37 static int hf_isobus_vt_button_parentobjectid = -1;
38 static int hf_isobus_vt_button_keynumber = -1;
39 static int hf_isobus_vt_pointing_xposition = -1;
40 static int hf_isobus_vt_pointing_yposition = -1;
41 static int hf_isobus_vt_pointing_touchstate = -1;
42 static int hf_isobus_vt_vtselectinputobject_objectid = -1;
43 static int hf_isobus_vt_vtselectinputobject_selection = -1;
44 static int hf_isobus_vt_vtselectinputobject_openforinput = -1;
45 static int hf_isobus_vt_vtescmessage_objectid = -1;
46 static int hf_isobus_vt_vtescmessage_errorcodes = -1;
47 static int hf_isobus_vt_vtchgnumval_objectid = -1;
48 static int hf_isobus_vt_vtchgnumval_value = -1;
49 static int hf_isobus_vt_vtchgactivemask_maskobjectid = -1;
50 static int hf_isobus_vt_vtchgactivemask_errorcodes = -1;
51 static int hf_isobus_vt_vtchgactivemask_errorobjectid = -1;
52 static int hf_isobus_vt_vtchgactivemask_errorobjectidparent = -1;
53 static int hf_isobus_vt_vtchgstrval_objectid = -1;
54 static int hf_isobus_vt_vtchgstrval_length = -1;
55 static int hf_isobus_vt_vtchgstrval_value = -1;
56 static int hf_isobus_vt_vtonuserlayouthideshow_objectid_1 = -1;
57 static int hf_isobus_vt_vtonuserlayouthideshow_status_1 = -1;
58 static int hf_isobus_vt_vtonuserlayouthideshow_objectid_2 = -1;
59 static int hf_isobus_vt_vtonuserlayouthideshow_status_2 = -1;
60 static int hf_isobus_vt_vtcontrolaudiosignaltermination_terminationcause = -1;
61 static int hf_isobus_vt_endofobjectpool_errorcodes = -1;
62 static int hf_isobus_vt_endofobjectpool_faultyobjectid = -1;
63 static int hf_isobus_vt_endofobjectpool_faultyparentobjectid = -1;
64 static int hf_isobus_vt_endofobjectpool_objectpoolerrorcodes = -1;
65 static int hf_isobus_vt_auxiliaryassignmenttype1_sourceaddressauxinputdevice = -1;
66 static int hf_isobus_vt_auxiliaryassignmenttype1_auxinputnumber = -1;
67 static int hf_isobus_vt_auxiliaryassignmenttype1_objectidauxinputdevice = -1;
68 static int hf_isobus_vt_auxiliaryinputtype1status_inputnumber = -1;
69 static int hf_isobus_vt_auxiliaryinputtype1status_analyzevalue = -1;
70 static int hf_isobus_vt_auxiliaryinputtype1status_numberoftransitions = -1;
71 static int hf_isobus_vt_auxiliaryinputtype1status_booleanvalue = -1;
72 static int hf_isobus_vt_preferredassignment_numberofinputunits = -1;
73 static int hf_isobus_vt_preferredassignment_auxinputunit_name = -1;
74 static int hf_isobus_vt_preferredassignment_auxinputunit_modelidentificationcode = -1;
75 static int hf_isobus_vt_preferredassignment_auxinputunit_numberofpreferredfunctions = -1;
76 static int hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxfunctionobjectid = -1;
77 static int hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxinputobjectid = -1;
78 static int hf_isobus_vt_preferredassignment_errorcodes = -1;
79 static int hf_isobus_vt_preferredassignment_faultyauxiliaryfunctionobjectid = -1;
80 static int hf_isobus_vt_auxiliaryinputtype2maintenance_modelidentificationcode = -1;
81 static int hf_isobus_vt_auxiliaryinputtype2maintenance_status = -1;
82 static int hf_isobus_vt_auxiliaryassignmenttype2_name = -1;
83 static int hf_isobus_vt_auxiliaryassignmenttype2_flags = -1;
84 static int hf_isobus_vt_auxiliaryassignmenttype2_flags_preferredassignment = -1;
85 static int hf_isobus_vt_auxiliaryassignmenttype2_flags_auxiliaryfunctiontype = -1;
86 static int hf_isobus_vt_auxiliaryassignmenttype2_auxinputobjectid = -1;
87 static int hf_isobus_vt_auxiliaryassignmenttype2_auxfunctionobjectid = -1;
88 static int hf_isobus_vt_auxiliaryassignmenttype2_errorcodes = -1;
89 static int hf_isobus_vt_auxiliaryinputstatustype2enable_auxiliaryinputobjectid = -1;
90 static int hf_isobus_vt_auxiliaryinputstatustype2enable_enable = -1;
91 static int hf_isobus_vt_auxiliaryinputstatustype2enable_status = -1;
92 static int hf_isobus_vt_auxiliaryinputstatustype2enable_errorcodes = -1;
93 static int hf_isobus_vt_auxiliaryinputtype2status_auxiliaryinputobjectid = -1;
94 static int hf_isobus_vt_auxiliaryinputtype2status_value1 = -1;
95 static int hf_isobus_vt_auxiliaryinputtype2status_value2 = -1;
96 static int hf_isobus_vt_auxiliaryinputtype2status_operatingstate = -1;
97 static int hf_isobus_vt_auxiliaryinputtype2status_operatingstate_learnmodeactive = -1;
98 static int hf_isobus_vt_auxiliaryinputtype2status_operatingstate_inputactivatedinlearnmode = -1;
99 static int hf_isobus_vt_auxiliarycapabilities_requesttype = -1;
100 static int hf_isobus_vt_auxiliarycapabilities_numberofauxiliaryunits = -1;
101 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_name = -1;
102 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_numberofdifferentsets = -1;
103 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_numberofinstances = -1;
104 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_functionattribute = -1;
105 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_assignedattribute = -1;
106 static int hf_isobus_vt_esc_objectid = -1;
107 static int hf_isobus_vt_esc_errorcodes = -1;
108 static int hf_isobus_vt_hideshowobj_objectid = -1;
109 static int hf_isobus_vt_hideshowobj_action = -1;
110 static int hf_isobus_vt_hideshowobj_errorcodes = -1;
111 static int hf_isobus_vt_enabledisableobj_objectid = -1;
112 static int hf_isobus_vt_enabledisableobj_enabledisable = -1;
113 static int hf_isobus_vt_enabledisableobj_errorcodes = -1;
114 static int hf_isobus_vt_selectinputobject_objectid = -1;
115 static int hf_isobus_vt_selectinputobject_option = -1;
116 static int hf_isobus_vt_selectinputobject_response = -1;
117 static int hf_isobus_vt_selectinputobject_errorcodes = -1;
118 static int hf_isobus_vt_controlaudiosignal_activations = -1;
119 static int hf_isobus_vt_controlaudiosignal_frequency = -1;
120 static int hf_isobus_vt_controlaudiosignal_ontime = -1;
121 static int hf_isobus_vt_controlaudiosignal_offtime = -1;
122 static int hf_isobus_vt_controlaudiosignal_errorcodes = -1;
123 static int hf_isobus_vt_setaudiovolume_volume = -1;
124 static int hf_isobus_vt_setaudiovolume_errorcodes = -1;
125 static int hf_isobus_vt_changechildlocation_parentobjectid = -1;
126 static int hf_isobus_vt_changechildlocation_objectid = -1;
127 static int hf_isobus_vt_changechildlocation_relativexpos = -1;
128 static int hf_isobus_vt_changechildlocation_relativeypos = -1;
129 static int hf_isobus_vt_changechildlocation_errorcodes = -1;
130 static int hf_isobus_vt_changesize_objectid = -1;
131 static int hf_isobus_vt_changesize_newwidth = -1;
132 static int hf_isobus_vt_changesize_newheight = -1;
133 static int hf_isobus_vt_changesize_errorcodes = -1;
134 static int hf_isobus_vt_changebackgroundcolour_objectid = -1;
135 static int hf_isobus_vt_changebackgroundcolour_colour = -1;
136 static int hf_isobus_vt_changebackgroundcolour_errorcodes = -1;
137 static int hf_isobus_vt_chgnumval_objectid = -1;
138 static int hf_isobus_vt_chgnumval_errorcodes = -1;
139 static int hf_isobus_vt_chgnumval_value = -1;
140 static int hf_isobus_vt_changeendpoint_objectid = -1;
141 static int hf_isobus_vt_changeendpoint_width = -1;
142 static int hf_isobus_vt_changeendpoint_height = -1;
143 static int hf_isobus_vt_changeendpoint_linedirection = -1;
144 static int hf_isobus_vt_changefontattributes_objectid = -1;
145 static int hf_isobus_vt_changefontattributes_fontcolour = -1;
146 static int hf_isobus_vt_changefontattributes_fontsize = -1;
147 static int hf_isobus_vt_changefontattributes_fonttype = -1;
148 static int hf_isobus_vt_changefontattributes_fontstyle = -1;
149 static int hf_isobus_vt_changefontattributes_errorcodes = -1;
150 static int hf_isobus_vt_changelineattributes_objectid = -1;
151 static int hf_isobus_vt_changelineattributes_linecolour = -1;
152 static int hf_isobus_vt_changelineattributes_linewidth = -1;
153 static int hf_isobus_vt_changelineattributes_lineart = -1;
154 static int hf_isobus_vt_changelineattributes_errorcodes = -1;
155 static int hf_isobus_vt_changefillattributes_objectid = -1;
156 static int hf_isobus_vt_changefillattributes_filltype = -1;
157 static int hf_isobus_vt_changefillattributes_fillcolour = -1;
158 static int hf_isobus_vt_changefillattributes_fillpatternobjectid = -1;
159 static int hf_isobus_vt_changefillattributes_errorcodes = -1;
160 static int hf_isobus_vt_changeactivemask_workingset = -1;
161 static int hf_isobus_vt_changeactivemask_newactivemask = -1;
162 static int hf_isobus_vt_changeactivemask_errorcodes = -1;
163 static int hf_isobus_vt_changesoftkeymask_masktype = -1;
164 static int hf_isobus_vt_changesoftkeymask_datamaskobjectid = -1;
165 static int hf_isobus_vt_changesoftkeymask_newsoftkeymaskobjectid = -1;
166 static int hf_isobus_vt_changesoftkeymask_errorcodes = -1;
167 static int hf_isobus_vt_changeattributes_objectid = -1;
168 static int hf_isobus_vt_changeattributes_attributeid = -1;
169 static int hf_isobus_vt_changeattributes_newvalue = -1;
170 static int hf_isobus_vt_changeattributes_errorcodes = -1;
171 static int hf_isobus_vt_changepriority_objectid = -1;
172 static int hf_isobus_vt_changepriority_newpriority = -1;
173 static int hf_isobus_vt_changepriority_errorcodes = -1;
174 static int hf_isobus_vt_changelistitem_listobjectid = -1;
175 static int hf_isobus_vt_changelistitem_listindex = -1;
176 static int hf_isobus_vt_changelistitem_newobjectid = -1;
177 static int hf_isobus_vt_changelistitem_errorcodes = -1;
178 static int hf_isobus_vt_deleteobjectpool_errorcodes = -1;
179 static int hf_isobus_vt_chgstrval_objectid = -1;
180 static int hf_isobus_vt_chgstrval_length = -1;
181 static int hf_isobus_vt_chgstrval_errorcodes = -1;
182 static int hf_isobus_vt_chgstrval_value = -1;
183 static int hf_isobus_vt_changechildposition_parentobjectid = -1;
184 static int hf_isobus_vt_changechildposition_objectid = -1;
185 static int hf_isobus_vt_changechildposition_xpos = -1;
186 static int hf_isobus_vt_changechildposition_ypos = -1;
187 static int hf_isobus_vt_changechildposition_errorcodes = -1;
188 static int hf_isobus_vt_changeobjectlabel_objectid = -1;
189 static int hf_isobus_vt_changeobjectlabel_stringobjectid = -1;
190 static int hf_isobus_vt_changeobjectlabel_fonttype = -1;
191 static int hf_isobus_vt_changeobjectlabel_graphicobjectid = -1;
192 static int hf_isobus_vt_changeobjectlabel_errorcodes = -1;
193 static int hf_isobus_vt_changepolygonpoint_objectid = -1;
194 static int hf_isobus_vt_changepolygonpoint_pointindex = -1;
195 static int hf_isobus_vt_changepolygonpoint_xvalue = -1;
196 static int hf_isobus_vt_changepolygonpoint_yvalue = -1;
197 static int hf_isobus_vt_changepolygonpoint_errorcodes = -1;
198 static int hf_isobus_vt_changepolygonscale_objectid = -1;
199 static int hf_isobus_vt_changepolygonscale_newwidth = -1;
200 static int hf_isobus_vt_changepolygonscale_newheight = -1;
201 static int hf_isobus_vt_changepolygonscale_errorcodes = -1;
202 static int hf_isobus_vt_graphicscontext_objectid = -1;
203 static int hf_isobus_vt_graphicscontext_subcommandid = -1;
204 static int hf_isobus_vt_graphicscontext_setgraphicscursor_xposition = -1;
205 static int hf_isobus_vt_graphicscontext_setgraphicscursor_yposition = -1;
206 static int hf_isobus_vt_graphicscontext_movegraphicscursor_xoffset = -1;
207 static int hf_isobus_vt_graphicscontext_movegraphicscursor_yoffset = -1;
208 static int hf_isobus_vt_graphicscontext_setforegroundcolour_colour = -1;
209 static int hf_isobus_vt_graphicscontext_setbackgroundcolour_colour = -1;
210 static int hf_isobus_vt_graphicscontext_setlineattributesobjectid_objectid = -1;
211 static int hf_isobus_vt_graphicscontext_setfillattributesobjectid_objectid = -1;
212 static int hf_isobus_vt_graphicscontext_setfontattributesobjectid_objectid = -1;
213 static int hf_isobus_vt_graphicscontext_eraserectangle_width = -1;
214 static int hf_isobus_vt_graphicscontext_eraserectangle_height = -1;
215 static int hf_isobus_vt_graphicscontext_drawpoint_xoffset = -1;
216 static int hf_isobus_vt_graphicscontext_drawpoint_yoffset = -1;
217 static int hf_isobus_vt_graphicscontext_drawline_xoffset = -1;
218 static int hf_isobus_vt_graphicscontext_drawline_yoffset = -1;
219 static int hf_isobus_vt_graphicscontext_drawrectangle_width = -1;
220 static int hf_isobus_vt_graphicscontext_drawrectangle_height = -1;
221 static int hf_isobus_vt_graphicscontext_drawclosedellipse_width = -1;
222 static int hf_isobus_vt_graphicscontext_drawclosedellipse_height = -1;
223 static int hf_isobus_vt_graphicscontext_drawpolygon_numberofpoints = -1;
224 static int hf_isobus_vt_graphicscontext_drawpolygon_point_xoffset = -1;
225 static int hf_isobus_vt_graphicscontext_drawpolygon_point_yoffset = -1;
226 static int hf_isobus_vt_graphicscontext_drawtext_background = -1;
227 static int hf_isobus_vt_graphicscontext_drawtext_numberofbytes = -1;
228 static int hf_isobus_vt_graphicscontext_drawtext_textstring = -1;
229 static int hf_isobus_vt_graphicscontext_panviewport_viewportx = -1;
230 static int hf_isobus_vt_graphicscontext_panviewport_viewporty = -1;
231 static int hf_isobus_vt_graphicscontext_zoomviewport_zoomvalue = -1;
232 static int hf_isobus_vt_graphicscontext_panandzoomviewport_viewportx = -1;
233 static int hf_isobus_vt_graphicscontext_panandzoomviewport_viewporty = -1;
234 static int hf_isobus_vt_graphicscontext_panandzoomviewport_zoomvalue = -1;
235 static int hf_isobus_vt_graphicscontext_changeviewportsize_newwidth = -1;
236 static int hf_isobus_vt_graphicscontext_changeviewportsize_newheight = -1;
237 static int hf_isobus_vt_graphicscontext_drawvtobject_objectid = -1;
238 static int hf_isobus_vt_graphicscontext_copycanvastopicturegraphic_objectidpicturegraphic = -1;
239 static int hf_isobus_vt_graphicscontext_copyviewporttopicturegraphic_objectidpicturegraphic = -1;
240 static int hf_isobus_vt_getattributevalue_objectid = -1;
241 static int hf_isobus_vt_getattributevalue_attributeid = -1;
242 static int hf_isobus_vt_getattributevalue_value = -1;
243 static int hf_isobus_vt_getattributevalue_errorcodes = -1;
244 static int hf_isobus_vt_selectcolourmap_objectid = -1;
245 static int hf_isobus_vt_selectcolourmap_errorcodes = -1;
246 static int hf_isobus_vt_executeextendedmacro_objectid = -1;
247 static int hf_isobus_vt_executeextendedmacro_errorcodes = -1;
248 static int hf_isobus_vt_lockunlockmask_command = -1;
249 static int hf_isobus_vt_lockunlockmask_objectid = -1;
250 static int hf_isobus_vt_lockunlockmask_locktimeout = -1;
251 static int hf_isobus_vt_lockunlockmask_errorcodes = -1;
252 static int hf_isobus_vt_executemacro_objectid = -1;
253 static int hf_isobus_vt_executemacro_errorcodes = -1;
254 static int hf_isobus_vt_getmemory_memoryrequired = -1;
255 static int hf_isobus_vt_getmemory_vtversion = -1;
256 static int hf_isobus_vt_getmemory_status = -1;
257 static int hf_isobus_vt_getsupportedwidechars_codeplane = -1;
258 static int hf_isobus_vt_getsupportedwidechars_firstwidechar = -1;
259 static int hf_isobus_vt_getsupportedwidechars_lastwidechar = -1;
260 static int hf_isobus_vt_getsupportedwidechars_errorcodes = -1;
261 static int hf_isobus_vt_getsupportedwidechars_numberofranges = -1;
262 static int hf_isobus_vt_getsupportedwidechars_firstavailablewidechar = -1;
263 static int hf_isobus_vt_getsupportedwidechars_lastavailablewidechar = -1;
264 static int hf_isobus_vt_getnumberofsoftkeys_navigationsoftkeys = -1;
265 static int hf_isobus_vt_getnumberofsoftkeys_xdots = -1;
266 static int hf_isobus_vt_getnumberofsoftkeys_ydots = -1;
267 static int hf_isobus_vt_getnumberofsoftkeys_virtualsoftkeys = -1;
268 static int hf_isobus_vt_getnumberofsoftkeys_physicalsoftkeys = -1;
269 static int hf_isobus_vt_gettextfontdata_smallfontsizes = -1;
270 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font8x8 = -1;
271 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font8x12 = -1;
272 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font12x16 = -1;
273 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font16x16 = -1;
274 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font16x24 = -1;
275 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font24x32 = -1;
276 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font32x32 = -1;
277 static int hf_isobus_vt_gettextfontdata_largefontsizes = -1;
278 static int hf_isobus_vt_gettextfontdata_largefontsizes_font32x48 = -1;
279 static int hf_isobus_vt_gettextfontdata_largefontsizes_font48x64 = -1;
280 static int hf_isobus_vt_gettextfontdata_largefontsizes_font64x64 = -1;
281 static int hf_isobus_vt_gettextfontdata_largefontsizes_font64x96 = -1;
282 static int hf_isobus_vt_gettextfontdata_largefontsizes_font96x128 = -1;
283 static int hf_isobus_vt_gettextfontdata_largefontsizes_font128x128 = -1;
284 static int hf_isobus_vt_gettextfontdata_largefontsizes_font128x192 = -1;
285 static int hf_isobus_vt_gettextfontdata_typeattributes = -1;
286 static int hf_isobus_vt_gettextfontdata_typeattributes_boldtext = -1;
287 static int hf_isobus_vt_gettextfontdata_typeattributes_crossedouttext = -1;
288 static int hf_isobus_vt_gettextfontdata_typeattributes_underlinedtext = -1;
289 static int hf_isobus_vt_gettextfontdata_typeattributes_italicstext = -1;
290 static int hf_isobus_vt_gettextfontdata_typeattributes_invertedtext = -1;
291 static int hf_isobus_vt_gettextfontdata_typeattributes_flashinverted = -1;
292 static int hf_isobus_vt_gettextfontdata_typeattributes_flashhidden = -1;
293 static int hf_isobus_vt_gettextfontdata_typeattributes_proportionalfontrendering = -1;
294 static int hf_isobus_vt_getwindowmaskdata_backgroundcolourdatamask = -1;
295 static int hf_isobus_vt_getwindowmaskdata_backgroundcoloursoftkeymask = -1;
296 static int hf_isobus_vt_getsupportedobjects_numberofbytes = -1;
297 static int hf_isobus_vt_getsupportedobjects_objecttype = -1;
298 static int hf_isobus_vt_gethardware_boottime = -1;
299 static int hf_isobus_vt_gethardware_graphictype = -1;
300 static int hf_isobus_vt_gethardware_hardware = -1;
301 static int hf_isobus_vt_gethardware_hardware_touchscreen = -1;
302 static int hf_isobus_vt_gethardware_hardware_pointingdevice = -1;
303 static int hf_isobus_vt_gethardware_hardware_multifreqaudiooutput = -1;
304 static int hf_isobus_vt_gethardware_hardware_adjustvolumeaudiooutput = -1;
305 static int hf_isobus_vt_gethardware_hardware_simultaneousactivationphysicalsoftkeys = -1;
306 static int hf_isobus_vt_gethardware_hardware_simultaneousactivationbuttons = -1;
307 static int hf_isobus_vt_gethardware_hardware_dragoperation = -1;
308 static int hf_isobus_vt_gethardware_hardware_intermediatecoordinatesdrag = -1;
309 static int hf_isobus_vt_gethardware_xpixels = -1;
310 static int hf_isobus_vt_gethardware_ypixels = -1;
311 static int hf_isobus_vt_storeversion_versionlabel = -1;
312 static int hf_isobus_vt_storeversion_errorcodes = -1;
313 static int hf_isobus_vt_loadversion_versionlabel = -1;
314 static int hf_isobus_vt_loadversion_errorcodes = -1;
315 static int hf_isobus_vt_deleteversion_versionlabel = -1;
316 static int hf_isobus_vt_deleteversion_errorcodes = -1;
317 static int hf_isobus_vt_extendedgetversions_numberofversions = -1;
318 static int hf_isobus_vt_extendedgetversions_versionlabel = -1;
319 static int hf_isobus_vt_extendedstoreversion_versionlabel = -1;
320 static int hf_isobus_vt_extendedstoreversion_errorcodes = -1;
321 static int hf_isobus_vt_extendedloadversion_versionlabel = -1;
322 static int hf_isobus_vt_extendedloadversion_errorcodes = -1;
323 static int hf_isobus_vt_extendeddeleteversion_versionlabel = -1;
324 static int hf_isobus_vt_extendeddeleteversion_errorcodes = -1;
325 static int hf_isobus_vt_getversions_numberofversions = -1;
326 static int hf_isobus_vt_getversions_versionlabel = -1;
327 static int hf_isobus_vt_unsupportedvtfunction_unsupportedvtfunction = -1;
328 static int hf_isobus_vt_vtstatus_workingsetmaster = -1;
329 static int hf_isobus_vt_vtstatus_objectiddatamask = -1;
330 static int hf_isobus_vt_vtstatus_objectidsoftkeymask = -1;
331 static int hf_isobus_vt_vtstatus_vtbusycodes = -1;
332 static int hf_isobus_vt_vtstatus_vtbusycodes_updatingvisiblemask = -1;
333 static int hf_isobus_vt_vtstatus_vtbusycodes_savingdata = -1;
334 static int hf_isobus_vt_vtstatus_vtbusycodes_executingcommand = -1;
335 static int hf_isobus_vt_vtstatus_vtbusycodes_executingmacro = -1;
336 static int hf_isobus_vt_vtstatus_vtbusycodes_parsingobjectpool = -1;
337 static int hf_isobus_vt_vtstatus_vtbusycodes_auxcontrolsactive = -1;
338 static int hf_isobus_vt_vtstatus_vtbusycodes_outofmemory = -1;
339 static int hf_isobus_vt_vtstatus_vtfunctioncodes = -1;
340 static int hf_isobus_vt_wrksetmain_bitmask = -1;
341 static int hf_isobus_vt_wrksetmain_version = -1;
342 
343 
344 #define VT_SOFT_KEY_ACTIVATION                  0
345 #define VT_BUTTON_ACTIVATION                    1
346 #define VT_POINTING_EVENT                       2
347 #define VT_VT_SELECT_INPUT_OBJECT               3
348 #define VT_VT_ESC_MESSAGE                       4
349 #define VT_VT_CHANGE_NUMERIC_VALUE              5
350 #define VT_VT_CHANGE_ACTIVE_MASK                6
351 #define VT_VT_CHANGE_SOFT_KEY_MASK              7
352 #define VT_VT_CHANGE_STRING_VALUE               8
353 #define VT_VT_ON_USER_LAYOUT_HIDE_SHOW          9
354 #define VT_VT_CONTROL_AUDIO_SIGNAL_TERMINATION  10
355 #define VT_OBJECT_POOL_TRANSFER                 17
356 #define VT_END_OF_OBJECT_POOL                   18
357 #define VT_AUXILIARY_ASSIGNMENT_TYPE_1          32
358 #define VT_AUXILIARY_INPUT_TYPE_1_STATUS        33
359 #define VT_PREFERRED_ASSIGNMENT                 34
360 #define VT_AUXILIARY_INPUT_TYPE_2_MAINTENANCE   35
361 #define VT_AUXILIARY_ASSIGNMENT_TYPE_2          36
362 #define VT_AUXILIARY_INPUT_STATUS_TYPE_2_ENABLE 37
363 #define VT_AUXILIARY_INPUT_TYPE_2_STATUS        38
364 #define VT_AUXILIARY_CAPABILITIES               39
365 #define VT_ESC                                  146
366 #define VT_HIDE_SHOW_OBJECT                     160
367 #define VT_ENABLE_DISABLE_COMMAND               161
368 #define VT_SELECT_INPUT_OBJECT                  162
369 #define VT_CONTROL_AUDIO_SIGNAL                 163
370 #define VT_SET_AUDIO_VOLUME                     164
371 #define VT_CHANGE_CHILD_LOCATION                165
372 #define VT_CHANGE_SIZE                          166
373 #define VT_CHANGE_BACKGROUND_COLOUR             167
374 #define VT_CHANGE_NUMERIC_VALUE                 168
375 #define VT_CHANGE_END_POINT                     169
376 #define VT_CHANGE_FONT_ATTRIBUTES               170
377 #define VT_CHANGE_LINE_ATTRIBUTES               171
378 #define VT_CHANGE_FILL_ATTRIBUTES               172
379 #define VT_CHANGE_ACTIVE_MASK                   173
380 #define VT_CHANGE_SOFT_KEY_MASK                 174
381 #define VT_CHANGE_ATTRIBUTES                    175
382 #define VT_CHANGE_PRIORITY                      176
383 #define VT_CHANGE_LIST_ITEM                     177
384 #define VT_DELETE_OBJECT_POOL                   178
385 #define VT_CHANGE_STRING_VALUE                  179
386 #define VT_CHANGE_CHILD_POSITION                180
387 #define VT_CHANGE_OBJECT_LABEL                  181
388 #define VT_CHANGE_POLYGON_POINT                 182
389 #define VT_CHANGE_POLYGON_SCALE                 183
390 #define VT_GRAPHICS_CONTEXT                     184
391 #define VT_GET_ATTRIBUTE_VALUE                  185
392 #define VT_SELECT_COLOUR_MAP                    186
393 #define VT_IDENTIFY_VT                          187
394 #define VT_EXECUTE_EXTENDED_MACRO               188
395 #define VT_LOCK_UNLOCK_MASK                     189
396 #define VT_EXECUTE_MACRO                        190
397 #define VT_GET_MEMORY                           192
398 #define VT_GET_SUPPORTED_WIDECHARS              193
399 #define VT_GET_NUMBER_OF_SOFT_KEYS              194
400 #define VT_GET_TEXT_FONT_DATA                   195
401 #define VT_GET_WINDOW_MASK_DATA                 196
402 #define VT_GET_SUPPORTED_OBJECTS                197
403 #define VT_GET_HARDWARE                         199
404 #define VT_STORE_VERSION                        208
405 #define VT_LOAD_VERSION                         209
406 #define VT_DELETE_VERSION                       210
407 #define VT_EXTENDED_GET_VERSIONS                211
408 #define VT_EXTENDED_STORE_VERSION               212
409 #define VT_EXTENDED_LOAD_VERSION                213
410 #define VT_EXTENDED_DELETE_VERSION              214
411 #define VT_GET_VERSIONS_MESSAGE                 223
412 #define VT_GET_VERSIONS_RESPONSE                224
413 #define VT_UNSUPPORTED_VT_FUNCTION              253
414 #define VT_VT_STATUS                            254
415 #define VT_WORKING_SET_MAINTENANCE              255
416 
417 static const value_string vt_function_code[] = {
418     { VT_SOFT_KEY_ACTIVATION                 , "Soft Key Activation" },
419     { VT_BUTTON_ACTIVATION                   , "Button Activation" },
420     { VT_POINTING_EVENT                      , "Pointing Event" },
421     { VT_VT_SELECT_INPUT_OBJECT              , "VT Select Input Object" },
422     { VT_VT_ESC_MESSAGE                      , "VT ESC message" },
423     { VT_VT_CHANGE_NUMERIC_VALUE             , "VT Change Numeric Value" },
424     { VT_VT_CHANGE_ACTIVE_MASK               , "VT Change Active Mask" },
425     { VT_VT_CHANGE_SOFT_KEY_MASK             , "VT Change Soft Key Mask" },
426     { VT_VT_CHANGE_STRING_VALUE              , "VT Change String Value" },
427     { VT_VT_ON_USER_LAYOUT_HIDE_SHOW         , "VT On User-Layout Hide/Show" },
428     { VT_VT_CONTROL_AUDIO_SIGNAL_TERMINATION , "VT Control Audio Signal Termination" },
429     { VT_OBJECT_POOL_TRANSFER                , "Object pool transfer" },
430     { VT_END_OF_OBJECT_POOL                  , "End of Object Pool" },
431     { VT_AUXILIARY_ASSIGNMENT_TYPE_1         , "Auxiliary Assignment Type 1" },
432     { VT_AUXILIARY_INPUT_TYPE_1_STATUS       , "Auxiliary Input Type 1" },
433     { VT_PREFERRED_ASSIGNMENT                , "Preferred Assignment" },
434     { VT_AUXILIARY_INPUT_TYPE_2_MAINTENANCE  , "Auxiliary Input Type 2 Maintenance" },
435     { VT_AUXILIARY_ASSIGNMENT_TYPE_2         , "Auxiliary Assignment Type 2" },
436     { VT_AUXILIARY_INPUT_STATUS_TYPE_2_ENABLE, "Auxiliary Input Status Type 2 Enable" },
437     { VT_AUXILIARY_INPUT_TYPE_2_STATUS       , "Auxiliary Input Type 2 Status" },
438     { VT_AUXILIARY_CAPABILITIES              , "Auxiliary Capabilities" },
439     { VT_ESC                                 , "ESC" },
440     { VT_HIDE_SHOW_OBJECT                    , "Hide/Show Object" },
441     { VT_ENABLE_DISABLE_COMMAND              , "Enable/Disable Object" },
442     { VT_SELECT_INPUT_OBJECT                 , "Select Input Object" },
443     { VT_CONTROL_AUDIO_SIGNAL                , "Control Audio Signal" },
444     { VT_SET_AUDIO_VOLUME                    , "Set Audio Volume" },
445     { VT_CHANGE_CHILD_LOCATION               , "Change Child Location" },
446     { VT_CHANGE_SIZE                         , "Change Size" },
447     { VT_CHANGE_BACKGROUND_COLOUR            , "Change Background Colour" },
448     { VT_CHANGE_NUMERIC_VALUE                , "Change Numeric Value" },
449     { VT_CHANGE_END_POINT                    , "Change End Point" },
450     { VT_CHANGE_FONT_ATTRIBUTES              , "Change Font Attributes" },
451     { VT_CHANGE_LINE_ATTRIBUTES              , "Change Line Attributes" },
452     { VT_CHANGE_FILL_ATTRIBUTES              , "Change Fill Attributes" },
453     { VT_CHANGE_ACTIVE_MASK                  , "Change Active Mask" },
454     { VT_CHANGE_SOFT_KEY_MASK                , "Change Soft Key Mask" },
455     { VT_CHANGE_ATTRIBUTES                   , "Change Attribute" },
456     { VT_CHANGE_PRIORITY                     , "Change Priority" },
457     { VT_CHANGE_LIST_ITEM                    , "Change List Item" },
458     { VT_DELETE_OBJECT_POOL                  , "Delete Object Pool" },
459     { VT_CHANGE_STRING_VALUE                 , "Change String Value" },
460     { VT_CHANGE_CHILD_POSITION               , "Change Child Position" },
461     { VT_CHANGE_OBJECT_LABEL                 , "Change Object Label" },
462     { VT_CHANGE_POLYGON_POINT                , "Change Polygon Point" },
463     { VT_CHANGE_POLYGON_SCALE                , "Change Polygon Scale" },
464     { VT_GRAPHICS_CONTEXT                    , "Graphics Context" },
465     { VT_GET_ATTRIBUTE_VALUE                 , "Get Attribute Value" },
466     { VT_SELECT_COLOUR_MAP                   , "Select Colour Map" },
467     { VT_IDENTIFY_VT                         , "Identify VT" },
468     { VT_EXECUTE_EXTENDED_MACRO              , "Execute Extended Macro" },
469     { VT_LOCK_UNLOCK_MASK                    , "Lock/Unlock Mask" },
470     { VT_EXECUTE_MACRO                       , "Execute Macro" },
471     { VT_GET_MEMORY                          , "Get Memory" },
472     { VT_GET_SUPPORTED_WIDECHARS             , "Get Supported Widechars" },
473     { VT_GET_NUMBER_OF_SOFT_KEYS             , "Get Number of Soft Keys" },
474     { VT_GET_TEXT_FONT_DATA                  , "Get Text Font Data" },
475     { VT_GET_WINDOW_MASK_DATA                , "Get Window Mask Data" },
476     { VT_GET_SUPPORTED_OBJECTS               , "Get Supported Objects" },
477     { VT_GET_HARDWARE                        , "Get Hardware" },
478     { VT_STORE_VERSION                       , "Store Version" },
479     { VT_LOAD_VERSION                        , "Load Version" },
480     { VT_DELETE_VERSION                      , "Delete Version" },
481     { VT_EXTENDED_GET_VERSIONS               , "Extended Get Versions" },
482     { VT_EXTENDED_STORE_VERSION              , "Extended Store Version" },
483     { VT_EXTENDED_LOAD_VERSION               , "Extended Load Version" },
484     { VT_EXTENDED_DELETE_VERSION             , "Extended Delete Version" },
485     { VT_GET_VERSIONS_MESSAGE                , "Get Versions message" },
486     { VT_GET_VERSIONS_RESPONSE               , "Get Versions response" },
487     { VT_UNSUPPORTED_VT_FUNCTION             , "Unsupported VT Function" },
488     { VT_VT_STATUS                           , "VT Status" },
489     { VT_WORKING_SET_MAINTENANCE             , "Working Set Maintenance" },
490     { 0, NULL }
491 };
492 static value_string_ext vt_function_code_ext = VALUE_STRING_EXT_INIT(vt_function_code);
493 
494 #define SET_GRAPHICS_CURSOR              0
495 #define MOVE_GRAPHICS_CURSOR             1
496 #define SET_FOREGROUND_COLOUR            2
497 #define SET_BACKGROUND_COLOUR            3
498 #define SET_LINE_ATTRIBUTES_OBJECT_ID    4
499 #define SET_FILL_ATTRIBUTES_OBJECT_ID    5
500 #define SET_FONT_ATTRIBUTES_OBJECT_ID    6
501 #define ERASE_RECTANGLE                  7
502 #define DRAW_POINT                       8
503 #define DRAW_LINE                        9
504 #define DRAW_RECTANGLE                   10
505 #define DRAW_CLOSED_ELLIPSE              11
506 #define DRAW_POLYGON                     12
507 #define DRAW_TEXT                        13
508 #define PAN_VIEWPORT                     14
509 #define ZOOM_VIEWPORT                    15
510 #define PAN_AND_ZOOM_VIEWPORT            16
511 #define CHANGE_VIEWPORT_SIZE             17
512 #define DRAW_VT_OBJECT                   18
513 #define COPY_CANVAS_TO_PICTURE_GRAPHIC   19
514 #define COPY_VIEWPORT_TO_PICTURE_GRAPHIC 20
515 
516 static const value_string graphics_context_sub_command_id[] = {
517     { SET_GRAPHICS_CURSOR              , "Set Graphics Cursor" },
518     { MOVE_GRAPHICS_CURSOR             , "Move Graphics Cursor" },
519     { SET_FOREGROUND_COLOUR            , "Set Foreground Colour" },
520     { SET_BACKGROUND_COLOUR            , "Set Background Colour" },
521     { SET_LINE_ATTRIBUTES_OBJECT_ID    , "Set Line Attributes Object ID" },
522     { SET_FILL_ATTRIBUTES_OBJECT_ID    , "Set Fill Attributes Object ID" },
523     { SET_FONT_ATTRIBUTES_OBJECT_ID    , "Set Font Attributes Object ID" },
524     { ERASE_RECTANGLE                  , "Erase Rectangle" },
525     { DRAW_POINT                       , "Draw Point" },
526     { DRAW_LINE                        , "Draw Line" },
527     { DRAW_RECTANGLE                   , "Draw Rectangle" },
528     { DRAW_CLOSED_ELLIPSE              , "Draw Closed Ellipse" },
529     { DRAW_POLYGON                     , "Draw Polygon" },
530     { DRAW_TEXT                        , "Draw Text" },
531     { PAN_VIEWPORT                     , "Pan Viewport" },
532     { ZOOM_VIEWPORT                    , "Zoom Viewport" },
533     { PAN_AND_ZOOM_VIEWPORT            , "Pan and Zoom Viewport" },
534     { CHANGE_VIEWPORT_SIZE             , "Change Viewport Size" },
535     { DRAW_VT_OBJECT                   , "Draw VT Object" },
536     { COPY_CANVAS_TO_PICTURE_GRAPHIC   , "Copy Canvas to Picture Graphic" },
537     { COPY_VIEWPORT_TO_PICTURE_GRAPHIC , "Copy Viewport to Picture Graphic" },
538     { 0, NULL }
539 };
540 static value_string_ext graphics_context_sub_command_id_ext = VALUE_STRING_EXT_INIT(graphics_context_sub_command_id);
541 
542 static const value_string vt_hide_show_action[] = {
543     { 0, "Hide" },
544     { 1, "Show" },
545     { 0, NULL }
546 };
547 
548 static const value_string vt_hide_show_action_info[] = {
549     { 0, "hidden" },
550     { 1, "shown" },
551     { 0, NULL }
552 };
553 
554 static const value_string vt_enable_disable_action[] = {
555     { 0, "Disable" },
556     { 1, "Enable" },
557     { 0, NULL }
558 };
559 
560 static const range_string vt_colours[] = {
561     { 0  , 0  , "Black" },
562     { 1  , 1  , "White" },
563     { 2  , 2  , "Green" },
564     { 3  , 3  , "Teal" },
565     { 4  , 4  , "Maroon" },
566     { 5  , 5  , "Purple" },
567     { 6  , 6  , "Olive" },
568     { 7  , 7  , "Silver" },
569     { 8  , 8  , "Grey" },
570     { 9  , 9  , "Blue" },
571     { 10 , 10 , "Lime" },
572     { 11 , 11 , "Cyan" },
573     { 12 , 12 , "Red" },
574     { 13 , 13 , "Magenta" },
575     { 14 , 14 , "Yellow" },
576     { 15 , 15 , "Navy" },
577     { 16 , 231, "Colour code defined" },
578     { 232, 255, "Proprietary" },
579     { 0  , 0  , NULL }
580 };
581 
582 #define KEY_RELEASED 0
583 #define KEY_PRESSED 1
584 #define KEY_STILL_PRESSED 2
585 #define KEY_PRESS_ABORTED 3
586 
587 static const value_string key_activation_codes[] = {
588     { KEY_RELEASED, "Key has been released (state change)" },
589     { KEY_PRESSED, "Key has been pressed (state change)" },
590     { KEY_STILL_PRESSED, "Key is still pressed" },
591     { KEY_PRESS_ABORTED, "Key press aborted" },
592     { 0, NULL }
593 };
594 
595 static const value_string key_activation_codes_info_postfix[] = {
596     { KEY_RELEASED, "has been released" },
597     { KEY_PRESSED, "has been pressed" },
598     { KEY_STILL_PRESSED, "is still held" },
599     { KEY_PRESS_ABORTED, "press aborted" },
600     { 0, NULL }
601 };
602 
603 #define BUTTON_RELEASED 0
604 #define BUTTON_PRESSED 1
605 #define BUTTON_STILL_HELD 2
606 #define BUTTON_PRESS_ABORTED 3
607 
608 static const value_string button_activation_codes[] = {
609     { BUTTON_RELEASED, "Button has been unlatched or released (state change)" },
610     { BUTTON_PRESSED, "Button has been \"pressed\" or latched (state change)" },
611     { BUTTON_STILL_HELD, "Button is still held (latchable buttons do not repeat)" },
612     { BUTTON_PRESS_ABORTED, "Button press aborted" },
613     { 0, NULL }
614 };
615 
616 #define TOUCH_RELEASED 0
617 #define TOUCH_PRESSED 1
618 #define TOUCH_HELD 2
619 
620 static const value_string pointing_touch_state[] = {
621     { TOUCH_RELEASED, "Released" },
622     { TOUCH_PRESSED, "Pressed" },
623     { TOUCH_HELD, "Held" },
624     { 0, NULL }
625 };
626 
627 static const value_string pointing_touch_state_info_postfix[] = {
628     { TOUCH_RELEASED, "has been released" },
629     { TOUCH_PRESSED, "has been pressed" },
630     { TOUCH_HELD, "is still held" },
631     { 0, NULL }
632 };
633 
634 static const value_string selection[] = {
635     { 0, "Object is deselected" },
636     { 1, "Object is selected (has focus)" },
637     { 0, NULL }
638 };
639 
640 static const range_string vt_versions[] = {
641     { 0, 2, "Reserved" },
642     { 3, 3, "Compliant with VT Version 3" },
643     { 4, 4, "Compliant with VT Version 4" },
644     { 5, 5, "Compliant with VT Version 5" },
645     { 6, 254, "Reserved" },
646     { 255, 255, "Compliant with VT Version 2" },
647     { 0, 0, NULL }
648 };
649 
650 static const value_string line_direction[] = {
651     { 0, "Top left to bottom right" },
652     { 1, "Bottom left to top right" },
653     { 0, NULL }
654 };
655 
656 #define MASK_UNLOCK 0
657 #define MASK_LOCK 1
658 
659 static const value_string lock_unlock[] = {
660     { MASK_UNLOCK, "Unlock Data Mask or User-Layout Data Mask" },
661     { MASK_LOCK  , "Lock Data Mask or User-Layout Data Mask" },
662     { 0, NULL }
663 };
664 
665 #define ENOUGH_MEMORY 0
666 #define NOT_ENOUGH_MEMORY 1
667 
668 static const value_string memory_status[] = {
669     { ENOUGH_MEMORY    , "There can be enough memory." },
670     { NOT_ENOUGH_MEMORY, "There is not enough memory available. Do not transmit Object Pool." },
671     { 0, NULL }
672 };
673 
674 static const value_string vt_versions_extended[] = {
675     { 0, "Hannover Agritechnica 2001 limited feature set" },
676     { 1, "FDIS Version ISO11783-6:2004(E), (Final Draft International Standard)" },
677     { 2, "IS Version ISO11783-6:2004(E), First Edition, 2004-06-15" },
678     { 3, "IS Version ISO11783-6:2010(E), Second Edition, (ISO11783-6:2004(E) and features specifically noted with version 3 reference)" },
679     { 4, "IS Version ISO11783-6:2010(E), Second Edition, (ISO11783-6:2004(E) and features specifically noted with version 4 reference)" },
680     { 5, "IS Version ISO11783-6:2014(E), Third Edition" },
681     { 0, NULL }
682 };
683 
684 static const range_string vt_object_types[] = {
685     /* Top level objects */
686     { 0,   0,   "Working Set object" },
687     { 1,   1,   "Data Mask object" },
688     { 2,   2,   "Alarm Mask object" },
689     { 3,   3,   "Container object" },
690     { 34,  34,  "Window Mask object" },
691     /* Key objects */
692     { 4,   4,   "Soft Key Mask object" },
693     { 5,   5,   "Key object" },
694     { 6,   6,   "Button object" },
695     { 35,  35,  "Key Group object" },
696     /* Input field objects */
697     { 7,   7,   "Input Boolean object" },
698     { 8,   8,   "Input String object" },
699     { 9,   9,   "Input Number object" },
700     { 10,  10,  "Input List object" },
701     /* Output field objects */
702     { 11,  11,  "Output String object" },
703     { 12,  12,  "Output Number object" },
704     { 37,  37,  "Output List object" },
705     /* Output shape objects */
706     { 13,  13,  "Output Line object" },
707     { 14,  14,  "Output Rectangle object" },
708     { 15,  15,  "Output Ellipse object" },
709     { 16,  16,  "Output Polygon object" },
710     /* Output graphic objects */
711     { 17,  17,  "Output Meter object" },
712     { 18,  18,  "Output Linear Bar Graph object" },
713     { 19,  19,  "Output Arched Bar Graph object" },
714     { 36,  36,  "Graphics Context object" },
715     { 44,  44,  "Animation object" },
716     /* Picture graphic object */
717     { 20,  20,  "Picture Graphic object" },
718     /* Variable objects */
719     { 21,  21,  "Number Variable object" },
720     { 22,  22,  "String Variable object" },
721     /* Attribute Objects */
722     { 23,  23,  "Font Attributes object" },
723     { 24,  24,  "Line Attributes object" },
724     { 25,  25,  "Fill Attributes object" },
725     { 26,  26,  "Input Attributes object" },
726     { 38,  38,  "Extended Input Attributes object" },
727     { 39,  39,  "Colour Map object" },
728     { 40,  40,  "Object Label Reference List object" },
729     /* Pointer objects */
730     { 27,  27,  "Object Pointer object" },
731     { 41,  41,  "External Object Definition object" },
732     { 42,  42,  "External Reference NAME object" },
733     { 43,  43,  "External Object Pointer object" },
734     /* Macro object */
735     { 28,  28,  "Macro object" },
736     /* Auxiliary control */
737     { 29,  29,  "Auxiliary Function Type 1 object" },
738     { 30,  30,  "Auxiliary Input Type 1 object" },
739     { 31,  31,  "Auxiliary Function Type 2 object" },
740     { 32,  32,  "Auxiliary Input Type 2 object" },
741     { 33,  33,  "Auxiliary Control Designator Type 2 Object Pointer" },
742     /* Proprietary Objects */
743     { 240, 254, "Manufacturer Defined Objects" },
744     /* Reserved Objects */
745     { 45,  239, "Reserved" },
746     { 255, 255, "Reserved" },
747     { 0, 0, NULL }
748 };
749 
750 static const value_string graphic_types[] = {
751     { 0, "Monochrome" },
752     { 1, "16 Colour" },
753     { 2, "256 Colour" },
754     { 0, NULL }
755 };
756 
757 static const value_string auxiliary_boolean_value[] = {
758     { 0, "Disabled" },
759     { 1, "Enabled" },
760     { 2, "non-latched Boolean held" },
761     { 0xFF, "Analog" },
762     { 0, NULL }
763 };
764 
765 static const value_string auxiliary_maintenance_status[] = {
766     { 0, "Initializing, pool is not currently available for assignment." },
767     { 1, "Ready, pool has been loaded into the VT and is available for assignments." },
768     { 0, NULL }
769 };
770 
771 static const value_string auxiliary_capabilities_request_type[] = {
772     { 0, "Request capabilities of Auxiliary Input Unit(s)" },
773     { 1, "Request capabilities of Auxiliary Function Unit(s)" },
774     { 0, NULL }
775 };
776 
777 static const value_string auxiliary_assigned_attributes[] = {
778     { 0, "auxiliary input" },
779     { 1, "auxiliary function" },
780     { 2, "Input is assigned" },
781     { 0, NULL }
782 };
783 
784 static const value_string select_input_object_option[] = {
785     { 0xFF, "Set Focus to object referenced by Object ID " },
786     { 0   , "Activate for data-input the object reference by Object ID" },
787     { 0, NULL },
788 };
789 
790 static const value_string select_input_opject_response[] = {
791     { 0, "Object referenced by Object ID is not selected or Object ID is the NULL object" },
792     { 1, "Object referenced by Object ID is Selected" },
793     { 2, "Object referenced by Object ID is Opened for Edit" },
794     { 0, NULL }
795 };
796 
797 static const value_string draw_text_background[] = {
798     { 0, "Opaque" },
799     { 1, "Transparent" },
800     { 0, NULL }
801 };
802 
803 static value_string object_id_strings[MAX_OBJECT_ID_DB_SIZE];
804 
805 /* Initialize the subtree pointers */
806 static gint ett_isobus_vt = -1;
807 static gint ett_isobus_vt_vtstatus_busycodes_subtree = -1;
808 static gint ett_isobus_vt_getsupportedwidechars_range = -1;
809 static gint ett_isobus_vt_gettextfontdata_smallfontsizes = -1;
810 static gint ett_isobus_vt_gettextfontdata_largefontsizes = -1;
811 static gint ett_isobus_vt_gettextfontdata_typeattributes = -1;
812 static gint ett_isobus_vt_gethardware_hardware = -1;
813 static gint ett_isobus_vt_preferredassignment_inputunit = -1;
814 static gint ett_isobus_vt_preferredassignment_inputunit_preferredfunction = -1;
815 static gint ett_isobus_vt_auxiliarycapabilities_inputunit = -1;
816 static gint ett_isobus_vt_auxiliarycapabilities_inputunit_set = -1;
817 static gint ett_isobus_vt_auxiliaryassignmenttype2_flags = -1;
818 static gint ett_isobus_vt_auxiliaryinputtype2status_operatingstate = -1;
819 
820 static const char *object_id_translation = "";
821 
822 enum vt_direction
823 {
824     vt_to_ecu,
825     ecu_to_vt
826 };
827 
get_object_id_string(guint16 object_id)828 static const gchar* get_object_id_string(guint16 object_id)
829 {
830     const gchar* translated_string;
831     if(object_id == 0xFFFF)
832     {
833         return "NULL Object ID";
834     }
835 
836     translated_string = val_to_str(object_id, object_id_strings, "Object ID 0x%04X");
837     return translated_string;
838 }
839 
840 static int
dissect_vt(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,enum vt_direction direction)841 dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_direction direction)
842 {
843     int offset = 0;
844     guint32 function_id;
845     proto_item *ti;
846 
847     ti = proto_tree_add_item(tree,
848         hf_isobus_vt, tvb, 0, 0, ENC_NA);
849     proto_item_set_hidden(ti);
850 
851     proto_tree_add_item_ret_uint(tree,
852         hf_isobus_vt_command, tvb, offset, 1, ENC_LITTLE_ENDIAN, &function_id);
853     offset += 1;
854 
855     switch(function_id)
856     {
857     case VT_SOFT_KEY_ACTIVATION:
858     {
859         guint32 key_activation_code, object_id, parent_object_id;
860 
861         proto_tree_add_item_ret_uint(tree,
862             hf_isobus_vt_softkey_keyactcode, tvb, offset, 1, ENC_LITTLE_ENDIAN, &key_activation_code);
863         offset += 1;
864 
865         proto_tree_add_item_ret_uint(tree,
866             hf_isobus_vt_softkey_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
867         ti = proto_tree_add_item(tree,
868             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
869         proto_item_set_hidden(ti);
870         offset += 2;
871 
872         proto_tree_add_item_ret_uint(tree,
873             hf_isobus_vt_softkey_parentobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &parent_object_id);
874         ti = proto_tree_add_item(tree,
875             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
876         proto_item_set_hidden(ti);
877         offset += 2;
878 
879         proto_tree_add_item(tree,
880             hf_isobus_vt_softkey_keynumber, tvb, offset, 1, ENC_LITTLE_ENDIAN);
881 
882         col_append_fstr(pinfo->cinfo, COL_INFO, "Key %s of parent %s %s",
883             get_object_id_string(object_id), get_object_id_string(parent_object_id),
884             val_to_str(key_activation_code, key_activation_codes_info_postfix, "unknown action"));
885     }
886         break;
887     case VT_BUTTON_ACTIVATION:
888     {
889         guint32 key_activation_code, object_id, parent_object_id;
890 
891         proto_tree_add_item_ret_uint(tree,
892             hf_isobus_vt_button_keyactcode, tvb, offset, 1, ENC_LITTLE_ENDIAN, &key_activation_code);
893         offset += 1;
894 
895         proto_tree_add_item_ret_uint(tree,
896             hf_isobus_vt_button_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
897         ti = proto_tree_add_item(tree,
898             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
899         proto_item_set_hidden(ti);
900         offset += 2;
901 
902         proto_tree_add_item_ret_uint(tree,
903             hf_isobus_vt_button_parentobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &parent_object_id);
904         ti = proto_tree_add_item(tree,
905             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
906         proto_item_set_hidden(ti);
907         offset += 2;
908 
909         proto_tree_add_item(tree,
910             hf_isobus_vt_button_keynumber, tvb, offset, 1, ENC_LITTLE_ENDIAN);
911 
912         col_append_fstr(pinfo->cinfo, COL_INFO, "Button %s of parent %s %s",
913             get_object_id_string(object_id), get_object_id_string(parent_object_id),
914             val_to_str(key_activation_code, key_activation_codes_info_postfix, "unknown action"));
915     }
916         break;
917     case VT_POINTING_EVENT:
918     {
919         guint32 x_position, y_position, touch_state = 0;
920 
921         proto_tree_add_item_ret_uint(tree,
922             hf_isobus_vt_pointing_xposition, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_position);
923         offset += 2;
924 
925         proto_tree_add_item_ret_uint(tree,
926             hf_isobus_vt_pointing_yposition, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_position);
927         offset += 2;
928 
929         if(current_vt_version >= 4)
930         {
931             proto_tree_add_item_ret_uint(tree,
932                 hf_isobus_vt_pointing_touchstate, tvb, offset, 1, ENC_LITTLE_ENDIAN, &touch_state);
933         }
934 
935         col_append_fstr(pinfo->cinfo, COL_INFO, "Touch at [%d;%d]",
936             x_position, y_position);
937 
938         if(current_vt_version >= 4)
939         {
940             col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str(touch_state, pointing_touch_state_info_postfix, "unknown action"));
941         }
942     }
943         break;
944     case VT_VT_SELECT_INPUT_OBJECT:
945     {
946         guint32 object_id;
947 
948         proto_tree_add_item_ret_uint(tree,
949             hf_isobus_vt_vtselectinputobject_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
950         ti = proto_tree_add_item(tree,
951             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
952         proto_item_set_hidden(ti);
953         offset += 2;
954 
955         proto_tree_add_item(tree,
956             hf_isobus_vt_vtselectinputobject_selection, tvb, offset, 1, ENC_LITTLE_ENDIAN);
957         offset += 1;
958 
959         if(current_vt_version >= 4)
960         {
961             proto_tree_add_item(tree,
962                 hf_isobus_vt_vtselectinputobject_openforinput, tvb, offset, 1, ENC_LITTLE_ENDIAN);
963         }
964 
965         col_append_fstr(pinfo->cinfo, COL_INFO, "%s was selected by VT", get_object_id_string(object_id));
966     }
967         break;
968     case VT_VT_ESC_MESSAGE:
969     {
970         guint32 object_id;
971 
972         proto_tree_add_item_ret_uint(tree,
973             hf_isobus_vt_vtescmessage_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
974         ti = proto_tree_add_item(tree,
975             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
976         proto_item_set_hidden(ti);
977         offset += 2;
978 
979         if(direction == vt_to_ecu)
980         {
981             guint32 error_codes;
982 
983             ti = proto_tree_add_item_ret_uint(tree,
984                 hf_isobus_vt_vtescmessage_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
985 
986             proto_item_append_text(ti, ": ");
987             if (error_codes & 0x01)
988                 proto_item_append_text(ti, "No input field is selected ");
989             if (error_codes & 0x10)
990                 proto_item_append_text(ti, "Any other error ");
991 
992             col_append_fstr(pinfo->cinfo, COL_INFO, "ESC button was pressed while %s was selected", get_object_id_string(object_id));
993         }
994         else
995         {
996             col_append_fstr(pinfo->cinfo, COL_INFO, "ESC button press was successfully received");
997         }
998     }
999         break;
1000     case VT_VT_CHANGE_NUMERIC_VALUE:
1001     {
1002         guint32 object_id, value;
1003 
1004         proto_tree_add_item_ret_uint(tree,
1005             hf_isobus_vt_vtchgnumval_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1006         ti = proto_tree_add_item(tree,
1007             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1008         proto_item_set_hidden(ti);
1009         offset += 2;
1010 
1011         offset += 1; /* byte 4 is reserved */
1012 
1013         proto_tree_add_item_ret_uint(tree,
1014             hf_isobus_vt_vtchgnumval_value, tvb, offset, 4, ENC_LITTLE_ENDIAN, &value);
1015 
1016         if(direction == ecu_to_vt)
1017         {
1018             col_append_fstr(pinfo->cinfo, COL_INFO, "VT Numeric value of %s has changed to 0x%X",
1019                 get_object_id_string(object_id), value);
1020         }
1021         else
1022         {
1023             col_append_fstr(pinfo->cinfo, COL_INFO, "VT Numeric value of %s should change to 0x%X",
1024                 get_object_id_string(object_id), value);
1025         }
1026     }
1027         break;
1028     case VT_VT_CHANGE_ACTIVE_MASK:
1029     {
1030         guint32 mask_object_id;
1031 
1032         proto_tree_add_item_ret_uint(tree,
1033             hf_isobus_vt_vtchgactivemask_maskobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &mask_object_id);
1034         ti = proto_tree_add_item(tree,
1035             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1036         proto_item_set_hidden(ti);
1037         offset += 2;
1038 
1039         if(direction == vt_to_ecu)
1040         {
1041             guint32 error_object_id, error_codes;
1042 
1043             ti = proto_tree_add_item_ret_uint(tree,
1044                 hf_isobus_vt_vtchgactivemask_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1045             proto_item_append_text(ti, ": ");
1046             if (error_codes & 0x04)
1047                 proto_item_append_text(ti, "Missing object ");
1048             if (error_codes & 0x08)
1049                 proto_item_append_text(ti, "Mask or child object has errors ");
1050             if (error_codes & 0x10)
1051                 proto_item_append_text(ti, "Any other error ");
1052             if (error_codes & 0x20)
1053                 proto_item_append_text(ti, "Pool being deleted ");
1054             offset += 1;
1055 
1056             proto_tree_add_item_ret_uint(tree,
1057                 hf_isobus_vt_vtchgactivemask_errorobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &error_object_id);
1058             ti = proto_tree_add_item(tree,
1059                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1060             proto_item_set_hidden(ti);
1061             offset += 2;
1062 
1063             proto_tree_add_item_ret_uint(tree,
1064                 hf_isobus_vt_vtchgactivemask_errorobjectidparent, tvb, offset, 2, ENC_LITTLE_ENDIAN, &error_object_id);
1065             ti = proto_tree_add_item(tree,
1066                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1067             proto_item_set_hidden(ti);
1068 
1069             if(error_codes)
1070             {
1071                 col_append_fstr(pinfo->cinfo, COL_INFO, "VT Active mask changed to %s",
1072                     get_object_id_string(mask_object_id));
1073             }
1074             else
1075             {
1076                 col_append_fstr(pinfo->cinfo, COL_INFO, "VT Active mask changed to %s because of error in %s",
1077                     get_object_id_string(mask_object_id), get_object_id_string(error_object_id));
1078             }
1079         }
1080         else
1081         {
1082             col_append_fstr(pinfo->cinfo, COL_INFO, "VT Active mask change to %s acknowledged",
1083                 get_object_id_string(mask_object_id));
1084         }
1085     }
1086         break;
1087     case VT_VT_CHANGE_STRING_VALUE:
1088     {
1089         if(direction == vt_to_ecu)
1090         {
1091             guint encoding = ENC_ASCII|ENC_NA;
1092             guint32 object_id, str_length;
1093             guint16 firstTwoBytesString;
1094             const guint8* value;
1095             guint bomOffset = 0;
1096 
1097             proto_tree_add_item_ret_uint(tree,
1098                 hf_isobus_vt_vtchgstrval_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1099             ti = proto_tree_add_item(tree,
1100                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1101             proto_item_set_hidden(ti);
1102             offset += 2;
1103 
1104             proto_tree_add_item_ret_uint(tree,
1105                 hf_isobus_vt_vtchgstrval_length, tvb, offset, 1, ENC_LITTLE_ENDIAN, &str_length);
1106             offset += 1;
1107 
1108             firstTwoBytesString = tvb_get_letohs(tvb,offset);
1109             if(firstTwoBytesString == 0xFEFF)
1110             {
1111                 encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
1112                 bomOffset = 2;
1113             }
1114 
1115             proto_tree_add_item_ret_string(tree,
1116                 hf_isobus_vt_vtchgstrval_value, tvb, offset + bomOffset, str_length - bomOffset, encoding,
1117                 pinfo->pool, &value);
1118 
1119             col_append_fstr(pinfo->cinfo, COL_INFO, "VT String value of %s should change to %s",
1120                 get_object_id_string(object_id), value);
1121         }
1122         else
1123         {
1124             guint32 object_id;
1125 
1126             offset += 2;    /* first two bytes are reserved */
1127 
1128             proto_tree_add_item_ret_uint(tree,
1129                 hf_isobus_vt_chgstrval_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1130             ti = proto_tree_add_item(tree,
1131                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1132             proto_item_set_hidden(ti);
1133 
1134             col_append_fstr(pinfo->cinfo, COL_INFO, "VT String value change of %s acknowledged",
1135                 get_object_id_string(object_id));
1136         }
1137     }
1138         break;
1139     case VT_VT_ON_USER_LAYOUT_HIDE_SHOW:
1140     {
1141         guint32 object_id[2], status[2];
1142 
1143         proto_tree_add_item_ret_uint(tree,
1144             hf_isobus_vt_vtonuserlayouthideshow_objectid_1, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id[0]);
1145         ti = proto_tree_add_item(tree,
1146             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1147         proto_item_set_hidden(ti);
1148         offset += 2;
1149 
1150         proto_tree_add_item_ret_uint(tree,
1151             hf_isobus_vt_vtonuserlayouthideshow_status_1, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status[0]);
1152         offset += 1;
1153 
1154         proto_tree_add_item_ret_uint(tree,
1155             hf_isobus_vt_vtonuserlayouthideshow_objectid_2, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id[1]);
1156         ti = proto_tree_add_item(tree,
1157             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1158         proto_item_set_hidden(ti);
1159         offset += 2;
1160 
1161         proto_tree_add_item_ret_uint(tree,
1162             hf_isobus_vt_vtonuserlayouthideshow_status_2, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status[1]);
1163 
1164         col_append_fstr(pinfo->cinfo, COL_INFO, "VT On User-Layout Hide/Show. %s is %s, %s is %s",
1165             get_object_id_string(object_id[0]), val_to_str(status[0], vt_hide_show_action_info, "unknown"),
1166             get_object_id_string(object_id[1]), val_to_str(status[1], vt_hide_show_action_info, "unknown"));
1167     }
1168         break;
1169     case VT_VT_CONTROL_AUDIO_SIGNAL_TERMINATION:
1170     {
1171         guint32 termination_cause;
1172 
1173         ti = proto_tree_add_item_ret_uint(tree,
1174             hf_isobus_vt_vtcontrolaudiosignaltermination_terminationcause, tvb, offset, 1, ENC_LITTLE_ENDIAN, &termination_cause);
1175 
1176         proto_item_append_text(ti, ": ");
1177         if (termination_cause & 0x01)
1178         {
1179             proto_item_append_text(ti, "Audio was terminated ");
1180             col_append_fstr(pinfo->cinfo, COL_INFO, "VT Control audio signal termination: Audio was terminated");
1181         }
1182         else
1183         {
1184             col_append_fstr(pinfo->cinfo, COL_INFO, "VT Control audio signal termination: Error in message");
1185         }
1186     }
1187         break;
1188     case VT_END_OF_OBJECT_POOL:
1189     {
1190         if(direction == vt_to_ecu)
1191         {
1192             guint32 error_codes, obj_pool_error_codes;
1193 
1194             ti = proto_tree_add_item_ret_uint(tree,
1195                 hf_isobus_vt_endofobjectpool_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1196             proto_item_append_text(ti, ": ");
1197             if (error_codes & 0x01)
1198                 proto_item_append_text(ti, "There are errors in the Object Pool ");
1199             if (error_codes & 0x02)
1200                 proto_item_append_text(ti, "VT ran out of memory during transfer ");
1201             if (error_codes & 0x10)
1202                 proto_item_append_text(ti, "Any other error ");
1203             offset += 1;
1204 
1205             proto_tree_add_item(tree,
1206                 hf_isobus_vt_endofobjectpool_faultyparentobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1207             ti = proto_tree_add_item(tree,
1208                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1209             proto_item_set_hidden(ti);
1210             offset += 2;
1211 
1212             proto_tree_add_item(tree,
1213                 hf_isobus_vt_endofobjectpool_faultyobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1214             ti = proto_tree_add_item(tree,
1215                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1216             proto_item_set_hidden(ti);
1217             offset += 2;
1218 
1219             ti = proto_tree_add_item_ret_uint(tree,
1220                 hf_isobus_vt_endofobjectpool_objectpoolerrorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &obj_pool_error_codes);
1221             proto_item_append_text(ti, ": ");
1222             if (obj_pool_error_codes & 0x01)
1223                 proto_item_append_text(ti, "method or Attribute not supported by the VT ");
1224             if (obj_pool_error_codes & 0x02)
1225                 proto_item_append_text(ti, "unknown object reference (missing object) ");
1226             if (obj_pool_error_codes & 0x04)
1227                 proto_item_append_text(ti, "any other error ");
1228             if (obj_pool_error_codes & 0x08)
1229                 proto_item_append_text(ti, "object pool was deleted from volatile memory ");
1230 
1231             if(error_codes & 0x01)
1232             {
1233                 col_append_fstr(pinfo->cinfo, COL_INFO, "End of object pool received, object pool contains errors");
1234             }
1235             else if(error_codes & 0x02)
1236             {
1237                 col_append_fstr(pinfo->cinfo, COL_INFO, "End of object pool received, but VT ran out of memory");
1238             }
1239             else
1240             {
1241                 col_append_fstr(pinfo->cinfo, COL_INFO, "End of object pool received, object pool accepted");
1242             }
1243         }
1244     }
1245         break;
1246     case VT_AUXILIARY_ASSIGNMENT_TYPE_1:
1247     {
1248         guint32 source_address, aux_input_number, object_id;
1249 
1250         proto_tree_add_item_ret_uint(tree,
1251             hf_isobus_vt_auxiliaryassignmenttype1_sourceaddressauxinputdevice, tvb, offset, 1, ENC_LITTLE_ENDIAN, &source_address);
1252         offset += 1;
1253 
1254         proto_tree_add_item_ret_uint(tree,
1255             hf_isobus_vt_auxiliaryassignmenttype1_auxinputnumber, tvb, offset, 1, ENC_LITTLE_ENDIAN, &aux_input_number);
1256         offset += 1;
1257 
1258         proto_tree_add_item_ret_uint(tree,
1259             hf_isobus_vt_auxiliaryassignmenttype1_objectidauxinputdevice, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1260         ti = proto_tree_add_item(tree,
1261             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1262         proto_item_set_hidden(ti);
1263 
1264         if(direction == ecu_to_vt)
1265         {
1266             col_append_fstr(pinfo->cinfo, COL_INFO, "Assign auxiliary input type 1 number %u of device %u to %s",
1267                 aux_input_number, source_address, get_object_id_string(object_id));
1268         }
1269         else
1270         {
1271             col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary input type 1 number %u of device %u has been assigned to %s",
1272                 aux_input_number, source_address, get_object_id_string(object_id));
1273         }
1274     }
1275         break;
1276     case VT_AUXILIARY_INPUT_TYPE_1_STATUS:
1277     {
1278         guint32 input_number, boolean_value, analyze_value;
1279 
1280         proto_tree_add_item_ret_uint(tree,
1281             hf_isobus_vt_auxiliaryinputtype1status_inputnumber, tvb, offset, 1, ENC_LITTLE_ENDIAN, &input_number);
1282         offset += 1;
1283 
1284         proto_tree_add_item_ret_uint(tree,
1285             hf_isobus_vt_auxiliaryinputtype1status_analyzevalue, tvb, offset, 2, ENC_LITTLE_ENDIAN, &analyze_value);
1286         offset += 2;
1287 
1288         proto_tree_add_item(tree,
1289             hf_isobus_vt_auxiliaryinputtype1status_numberoftransitions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1290         offset += 2;
1291 
1292         proto_tree_add_item_ret_uint(tree,
1293             hf_isobus_vt_auxiliaryinputtype1status_booleanvalue, tvb, offset, 1, ENC_LITTLE_ENDIAN, &boolean_value);
1294 
1295         col_append_fstr(pinfo->cinfo, COL_INFO, "State of input %u is analog %u or digital %s",
1296             input_number, analyze_value, val_to_str(boolean_value, auxiliary_boolean_value, "unknown"));
1297 
1298     }
1299         break;
1300     case VT_PREFERRED_ASSIGNMENT:
1301     {
1302         if(direction == ecu_to_vt)
1303         {
1304             guint32 number_of_input_units, i;
1305 
1306             proto_tree_add_item_ret_uint(tree,
1307                 hf_isobus_vt_preferredassignment_numberofinputunits, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_input_units);
1308             offset += 1;
1309 
1310             for(i = 0; i < number_of_input_units; i++)
1311             {
1312                 proto_item *input_unit_item;
1313                 proto_tree *input_unit_subtree;
1314                 guint32 number_of_preferred_functions, j, model_identification_code;
1315                 guint64 name;
1316 
1317                 input_unit_subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_isobus_vt_preferredassignment_inputunit, &input_unit_item, "Input Unit");
1318 
1319                 proto_tree_add_item_ret_uint64(input_unit_subtree,
1320                     hf_isobus_vt_preferredassignment_auxinputunit_name, tvb, offset, 8, ENC_LITTLE_ENDIAN, &name);
1321                 offset += 8;
1322 
1323                 proto_tree_add_item_ret_uint(input_unit_subtree,
1324                     hf_isobus_vt_preferredassignment_auxinputunit_modelidentificationcode, tvb, offset, 2, ENC_LITTLE_ENDIAN, &model_identification_code);
1325                 offset += 2;
1326 
1327                 proto_tree_add_item_ret_uint(input_unit_subtree,
1328                     hf_isobus_vt_preferredassignment_auxinputunit_numberofpreferredfunctions, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_preferred_functions);
1329                 offset += 1;
1330 
1331                 proto_item_set_text(input_unit_item, "Input Unit name 0x%" G_GINT64_MODIFIER "X model identification code %u", name, model_identification_code);
1332                 proto_item_set_len(input_unit_item, 8 + 2 + 1 + ((2 + 2) * number_of_preferred_functions));
1333 
1334                 for(j = 0; j < number_of_preferred_functions; j++)
1335                 {
1336                     proto_item *preferred_function_item;
1337                     proto_tree *preferred_function_subtree;
1338                     guint32 auxiliary_function_object_id, auxiliary_input_object_id;
1339 
1340                     preferred_function_subtree = proto_tree_add_subtree(input_unit_subtree, tvb, offset, 4,
1341                         ett_isobus_vt_preferredassignment_inputunit_preferredfunction, &preferred_function_item, "Input Unit");
1342 
1343                     proto_tree_add_item_ret_uint(preferred_function_subtree,
1344                         hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxfunctionobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &auxiliary_function_object_id);
1345                     ti = proto_tree_add_item(tree,
1346                         hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1347                     proto_item_set_hidden(ti);
1348                     offset += 2;
1349 
1350                     proto_tree_add_item_ret_uint(preferred_function_subtree,
1351                         hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxinputobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &auxiliary_input_object_id);
1352                     ti = proto_tree_add_item(tree,
1353                         hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1354                     proto_item_set_hidden(ti);
1355                     offset += 2;
1356 
1357                     proto_item_set_text(preferred_function_item, "Auxiliary Function %s connects to Auxiliary Input %s",
1358                         get_object_id_string(auxiliary_function_object_id), get_object_id_string(auxiliary_input_object_id));
1359                 }
1360             }
1361             col_append_fstr(pinfo->cinfo, COL_INFO, "Create preferred assignment");
1362         }
1363         else
1364         {
1365             guint32 error_codes, faulty_auxiliary_function_object_id;
1366 
1367             ti = proto_tree_add_item_ret_uint(tree,
1368                 hf_isobus_vt_preferredassignment_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1369             proto_item_append_text(ti, ": ");
1370             if (error_codes & 0x01)
1371                 proto_item_append_text(ti, "Auxiliary Input Unit(s) not valid ");
1372             if (error_codes & 0x02)
1373                 proto_item_append_text(ti, "Function Object ID(s) not valid ");
1374             if (error_codes & 0x04)
1375                 proto_item_append_text(ti, "Input Object ID(s) not valid ");
1376             if (error_codes & 0x08)
1377                 proto_item_append_text(ti, "Duplicate Object ID of Auxiliary Function ");
1378             if (error_codes & 0x10)
1379                 proto_item_append_text(ti, "Any other error ");
1380             offset += 1;
1381 
1382             proto_tree_add_item_ret_uint(tree,
1383                 hf_isobus_vt_preferredassignment_faultyauxiliaryfunctionobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &faulty_auxiliary_function_object_id);
1384             ti = proto_tree_add_item(tree,
1385                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1386             proto_item_set_hidden(ti);
1387 
1388             if(error_codes)
1389             {
1390                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while creating preferred assignment because of %s", get_object_id_string(faulty_auxiliary_function_object_id));
1391             }
1392             else
1393             {
1394                 col_append_fstr(pinfo->cinfo, COL_INFO, "Successfully created preferred assignment");
1395             }
1396         }
1397     }
1398         break;
1399     case VT_AUXILIARY_INPUT_TYPE_2_MAINTENANCE:
1400     {
1401         if(direction == ecu_to_vt)
1402         {
1403             guint32 model_identification_code, status;
1404 
1405             proto_tree_add_item_ret_uint(tree,
1406                 hf_isobus_vt_auxiliaryinputtype2maintenance_modelidentificationcode, tvb, offset, 2, ENC_LITTLE_ENDIAN, &model_identification_code);
1407             offset += 2;
1408 
1409             proto_tree_add_item_ret_uint(tree,
1410                 hf_isobus_vt_auxiliaryinputtype2maintenance_status, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status);
1411 
1412             if(status == 0)
1413             {
1414                 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input Type 2 Maintenance: Model Identification Code %u, Status is Initializing",
1415                     model_identification_code);
1416             }
1417             else
1418             {
1419                 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input Type 2 Maintenance: Model Identification Code %u, Status is Ready",
1420                     model_identification_code);
1421             }
1422         }
1423     }
1424         break;
1425     case VT_AUXILIARY_ASSIGNMENT_TYPE_2:
1426     {
1427         guint32 error_codes, auxiliary_input_object_id = 0, auxiliary_function_object_id;
1428         guint64 name = 0;
1429 
1430         if(direction == ecu_to_vt)
1431         {
1432             proto_tree *flags_subtree;
1433 
1434             proto_tree_add_item_ret_uint64(tree,
1435                 hf_isobus_vt_auxiliaryassignmenttype2_name, tvb, offset, 8, ENC_LITTLE_ENDIAN, &name);
1436             offset += 8;
1437 
1438             ti = proto_tree_add_item(tree,
1439                 hf_isobus_vt_auxiliaryassignmenttype2_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1440             flags_subtree = proto_item_add_subtree(ti, ett_isobus_vt_auxiliaryassignmenttype2_flags);
1441             ti = proto_tree_add_item(flags_subtree,
1442                 hf_isobus_vt_auxiliaryassignmenttype2_flags_preferredassignment, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1443             proto_item_set_generated(ti);
1444             ti = proto_tree_add_item(flags_subtree,
1445                 hf_isobus_vt_auxiliaryassignmenttype2_flags_auxiliaryfunctiontype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1446             proto_item_set_generated(ti);
1447             offset += 1;
1448 
1449             proto_tree_add_item_ret_uint(tree,
1450                 hf_isobus_vt_auxiliaryassignmenttype2_auxinputobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &auxiliary_input_object_id);
1451             ti = proto_tree_add_item(tree,
1452                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1453             proto_item_set_hidden(ti);
1454             offset += 2;
1455         }
1456 
1457         proto_tree_add_item_ret_uint(tree,
1458             hf_isobus_vt_auxiliaryassignmenttype2_auxfunctionobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &auxiliary_function_object_id);
1459         ti = proto_tree_add_item(tree,
1460             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1461         proto_item_set_hidden(ti);
1462         offset += 2;
1463 
1464         if(direction == vt_to_ecu)
1465         {
1466             ti = proto_tree_add_item_ret_uint(tree,
1467                 hf_isobus_vt_auxiliaryassignmenttype2_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1468             proto_item_append_text(ti, ": ");
1469             if (error_codes & 0x01)
1470                 proto_item_append_text(ti, "error, assignment not accepted ");
1471             if (error_codes & 0x02)
1472                 proto_item_append_text(ti, "error, this function is already assigned ");
1473         }
1474 
1475         if(direction == ecu_to_vt)
1476         {
1477             col_append_fstr(pinfo->cinfo, COL_INFO, "Assign %s of name 0x%" G_GINT64_MODIFIER "X to function %s",
1478                 get_object_id_string(auxiliary_input_object_id), name, get_object_id_string(auxiliary_function_object_id));
1479         }
1480         else if(direction == vt_to_ecu)
1481         {
1482             if(error_codes)
1483             {
1484                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while assigning function %s",
1485                     get_object_id_string(auxiliary_function_object_id));
1486             }
1487             else
1488             {
1489                 col_append_fstr(pinfo->cinfo, COL_INFO, "Successfully assigned function %s",
1490                     get_object_id_string(auxiliary_function_object_id));
1491             }
1492         }
1493     }
1494         break;
1495     case VT_AUXILIARY_INPUT_STATUS_TYPE_2_ENABLE:
1496     {
1497         guint32 enable, status, error_codes, auxiliary_input_object_id;
1498 
1499         proto_tree_add_item_ret_uint(tree,
1500             hf_isobus_vt_auxiliaryinputstatustype2enable_auxiliaryinputobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &auxiliary_input_object_id);
1501         ti = proto_tree_add_item(tree,
1502             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1503         proto_item_set_hidden(ti);
1504         offset += 2;
1505 
1506         if(direction == ecu_to_vt)
1507         {
1508             proto_tree_add_item_ret_uint(tree,
1509                 hf_isobus_vt_auxiliaryinputstatustype2enable_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN, &enable);
1510         }
1511         else
1512         {
1513             proto_tree_add_item_ret_uint(tree,
1514                 hf_isobus_vt_auxiliaryinputstatustype2enable_status, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status);
1515             offset += 1;
1516 
1517             ti = proto_tree_add_item_ret_uint(tree,
1518                 hf_isobus_vt_auxiliaryinputstatustype2enable_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1519             proto_item_append_text(ti, ": ");
1520             if (error_codes & 0x01)
1521                 proto_item_append_text(ti, "Invalid Auxiliary Input Object ID ");
1522             if (error_codes & 0x02)
1523                 proto_item_append_text(ti, "any other error ");
1524         }
1525 
1526         if(direction == ecu_to_vt)
1527         {
1528             if(enable == 0)
1529             {
1530                 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input %s should be disabled",
1531                     get_object_id_string(auxiliary_input_object_id));
1532             }
1533             else
1534             {
1535                 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input %s should be enabled",
1536                     get_object_id_string(auxiliary_input_object_id));
1537             }
1538         }
1539         else
1540         {
1541             if(error_codes)
1542             {
1543                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing status for Auxiliary Input %s",
1544                     get_object_id_string(auxiliary_input_object_id));
1545             }
1546             else
1547             {
1548                 if (status == 0)
1549                 {
1550                     col_append_fstr(pinfo->cinfo, COL_INFO, "Status of Auxiliary Input %s was successfully changed to disabled",
1551                         get_object_id_string(auxiliary_input_object_id));
1552                 }
1553                 else if (status == 1)
1554                 {
1555                     col_append_fstr(pinfo->cinfo, COL_INFO, "Status of Auxiliary Input %s was successfully changed to enabled",
1556                         get_object_id_string(auxiliary_input_object_id));
1557                 }
1558             }
1559         }
1560     }
1561         break;
1562     case VT_AUXILIARY_INPUT_TYPE_2_STATUS:
1563     {
1564         guint32 auxiliary_input_object_id, value_1, value_2;
1565         proto_tree* operating_state_subtree;
1566 
1567         proto_tree_add_item_ret_uint(tree,
1568             hf_isobus_vt_auxiliaryinputtype2status_auxiliaryinputobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &auxiliary_input_object_id);
1569         ti = proto_tree_add_item(tree,
1570             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1571         proto_item_set_hidden(ti);
1572         offset += 2;
1573 
1574         proto_tree_add_item_ret_uint(tree,
1575             hf_isobus_vt_auxiliaryinputtype2status_value1, tvb, offset, 2, ENC_LITTLE_ENDIAN, &value_1);
1576         offset += 2;
1577 
1578         proto_tree_add_item_ret_uint(tree,
1579             hf_isobus_vt_auxiliaryinputtype2status_value2, tvb, offset, 2, ENC_LITTLE_ENDIAN, &value_2);
1580         offset += 2;
1581 
1582         ti = proto_tree_add_item(tree,
1583             hf_isobus_vt_auxiliaryinputtype2status_operatingstate, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1584         operating_state_subtree = proto_item_add_subtree(ti, ett_isobus_vt_auxiliaryinputtype2status_operatingstate);
1585         ti = proto_tree_add_item(operating_state_subtree,
1586             hf_isobus_vt_auxiliaryinputtype2status_operatingstate_learnmodeactive, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1587         proto_item_set_generated(ti);
1588         ti = proto_tree_add_item(operating_state_subtree,
1589             hf_isobus_vt_auxiliaryinputtype2status_operatingstate_inputactivatedinlearnmode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1590         proto_item_set_generated(ti);
1591 
1592         col_append_fstr(pinfo->cinfo, COL_INFO, "State of input %s value 1 = 0x%X value 2 = 0x%X.",
1593             get_object_id_string(auxiliary_input_object_id), value_1, value_2);
1594     }
1595         break;
1596     case VT_AUXILIARY_CAPABILITIES:
1597     {
1598         if(direction == ecu_to_vt)
1599         {
1600             guint32 request_type;
1601 
1602             proto_tree_add_item_ret_uint(tree,
1603                 hf_isobus_vt_auxiliarycapabilities_requesttype, tvb, offset, 1, ENC_LITTLE_ENDIAN, &request_type);
1604 
1605             col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
1606                 val_to_str(request_type, auxiliary_capabilities_request_type, "Request capabilities of Unknown"));
1607         }
1608         else
1609         {
1610             guint32 number_of_auxiliary_units, i;
1611 
1612             proto_tree_add_item_ret_uint(tree,
1613                 hf_isobus_vt_auxiliarycapabilities_numberofauxiliaryunits, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_auxiliary_units);
1614             offset += 1;
1615 
1616             for(i = 0; i < number_of_auxiliary_units; i++)
1617             {
1618                 proto_item *input_unit_item;
1619                 proto_tree *input_unit_subtree;
1620                 guint32 number_of_different_sets, j;
1621                 guint64 name;
1622 
1623                 input_unit_subtree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_isobus_vt_auxiliarycapabilities_inputunit, &input_unit_item, "Auxiliary Unit");
1624 
1625                 proto_tree_add_item_ret_uint64(input_unit_subtree,
1626                     hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_name, tvb, offset, 8, ENC_LITTLE_ENDIAN, &name);
1627                 offset += 8;
1628 
1629                 proto_tree_add_item_ret_uint(input_unit_subtree,
1630                     hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_numberofdifferentsets, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_different_sets);
1631                 offset += 1;
1632 
1633                 proto_item_set_text(input_unit_item, "Auxiliary unit name 0x%" G_GINT64_MODIFIER "X", name);
1634                 proto_item_set_len(input_unit_item, 8 + 1 + (3 * number_of_different_sets));
1635 
1636                 for(j = 0; j < number_of_different_sets; j++)
1637                 {
1638                     proto_item *auxiliary_unit_set;
1639                     proto_tree *preferred_function_subtree;
1640                     guint32 number_of_instances, function_attribute, assigned_attribute;
1641 
1642                     preferred_function_subtree = proto_tree_add_subtree(input_unit_subtree, tvb, offset, 3, ett_isobus_vt_auxiliarycapabilities_inputunit_set, &auxiliary_unit_set, "Auxiliary Unit");
1643 
1644                     proto_tree_add_item_ret_uint(preferred_function_subtree,
1645                         hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_numberofinstances, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_instances);
1646                     offset += 1;
1647 
1648                     proto_tree_add_item_ret_uint(preferred_function_subtree,
1649                         hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_functionattribute, tvb, offset, 1, ENC_LITTLE_ENDIAN, &function_attribute);
1650                     offset += 1;
1651 
1652                     proto_tree_add_item_ret_uint(preferred_function_subtree,
1653                         hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_assignedattribute, tvb, offset, 1, ENC_LITTLE_ENDIAN, &assigned_attribute);
1654                     offset += 1;
1655 
1656                     proto_item_set_text(input_unit_item, "Auxiliary set containing %u instances with function attribute %u assigned to %s",
1657                         number_of_instances, function_attribute, val_to_str(assigned_attribute, auxiliary_assigned_attributes, "unknown"));
1658                 }
1659             }
1660             col_append_fstr(pinfo->cinfo, COL_INFO, "Received Auxiliary Capabilities");
1661         }
1662     }
1663         break;
1664     case VT_ESC:
1665         if(direction == vt_to_ecu)
1666         {
1667             guint32 object_id, error_codes;
1668 
1669             proto_tree_add_item_ret_uint(tree,
1670                 hf_isobus_vt_esc_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1671             ti = proto_tree_add_item(tree,
1672                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1673             proto_item_set_hidden(ti);
1674             offset += 2;
1675 
1676             ti = proto_tree_add_item_ret_uint(tree,
1677                 hf_isobus_vt_esc_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1678             proto_item_append_text(ti, ": ");
1679             if (error_codes & 0x01)
1680                 proto_item_append_text(ti, "No input field is open for input, ESC ignored ");
1681             if (error_codes & 0x10)
1682                 proto_item_append_text(ti, "any other error ");
1683 
1684             if(error_codes)
1685             {
1686                 col_append_fstr(pinfo->cinfo, COL_INFO, "ESC successful, %s", get_object_id_string(object_id));
1687             }
1688             else
1689             {
1690                 col_append_fstr(pinfo->cinfo, COL_INFO, "ESC error");
1691             }
1692         }
1693         else
1694         {
1695             col_append_fstr(pinfo->cinfo, COL_INFO, "End of object pool received, object pool accepted");
1696         }
1697         break;
1698     case VT_HIDE_SHOW_OBJECT:
1699     {
1700         guint32 object_id, action;
1701 
1702         proto_tree_add_item_ret_uint(tree,
1703             hf_isobus_vt_hideshowobj_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1704         ti = proto_tree_add_item(tree,
1705             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1706         proto_item_set_hidden(ti);
1707         offset += 2;
1708 
1709         proto_tree_add_item_ret_uint(tree,
1710             hf_isobus_vt_hideshowobj_action, tvb, offset, 1, ENC_LITTLE_ENDIAN, &action);
1711         offset += 1;
1712 
1713         if(direction == vt_to_ecu)
1714         {
1715             guint32 error_codes;
1716             ti = proto_tree_add_item_ret_uint(tree,
1717                 hf_isobus_vt_hideshowobj_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1718 
1719             proto_item_append_text(ti, ": ");
1720             if (error_codes & 0x01)
1721                 proto_item_append_text(ti, "Invalid Object ID ");
1722             if (error_codes & 0x02)
1723                 proto_item_append_text(ti, "Invalid Value ");
1724             if (error_codes & 0x04)
1725                 proto_item_append_text(ti, "Value in use ");
1726             if (error_codes & 0x10)
1727                 proto_item_append_text(ti, "Any other error ");
1728 
1729             if(error_codes)
1730             {
1731                 col_append_fstr(pinfo->cinfo, COL_INFO, "Hide Show Error");
1732             }
1733             else
1734             {
1735                 switch(action)
1736                 {
1737                 case 0:
1738                     col_append_fstr(pinfo->cinfo, COL_INFO, "%s is now hidden",
1739                         get_object_id_string(object_id));
1740                     break;
1741                 case 1:
1742                     col_append_fstr(pinfo->cinfo, COL_INFO, "%s is now shown",
1743                         get_object_id_string(object_id));
1744                     break;
1745                 }
1746             }
1747         }
1748         else
1749         {
1750             switch(action)
1751             {
1752             case 0:
1753                 col_append_fstr(pinfo->cinfo, COL_INFO, "%s should hide",
1754                     get_object_id_string(object_id));
1755                 break;
1756             case 1:
1757                 col_append_fstr(pinfo->cinfo, COL_INFO, "%s should show",
1758                     get_object_id_string(object_id));
1759                 break;
1760             }
1761         }
1762     }
1763         break;
1764     case VT_ENABLE_DISABLE_COMMAND:
1765     {
1766         guint32 object_id, enable_disable;
1767 
1768         proto_tree_add_item_ret_uint(tree,
1769             hf_isobus_vt_enabledisableobj_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1770         ti = proto_tree_add_item(tree,
1771             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1772         proto_item_set_hidden(ti);
1773         offset += 2;
1774 
1775         proto_tree_add_item_ret_uint(tree,
1776             hf_isobus_vt_enabledisableobj_enabledisable, tvb, offset, 1, ENC_LITTLE_ENDIAN, &enable_disable);
1777         offset += 1;
1778 
1779         if(direction == ecu_to_vt)
1780         {
1781             switch(enable_disable)
1782             {
1783             case 0:
1784                 col_append_fstr(pinfo->cinfo, COL_INFO, "%s should disable",
1785                     get_object_id_string(object_id));
1786                 break;
1787             case 1:
1788                 col_append_fstr(pinfo->cinfo, COL_INFO, "%s should enable",
1789                     get_object_id_string(object_id));
1790                 break;
1791             }
1792         }
1793         else
1794         {
1795             guint32 error_codes;
1796 
1797             ti = proto_tree_add_item_ret_uint(tree,
1798                 hf_isobus_vt_enabledisableobj_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1799 
1800             proto_item_append_text(ti, ": ");
1801             if (error_codes & 0x02)
1802                 proto_item_append_text(ti, "Invalid Object ID ");
1803             if (error_codes & 0x04)
1804                 proto_item_append_text(ti, "Command error ");
1805             if (error_codes & 0x08)
1806                 proto_item_append_text(ti, "Could not complete. Operator input is active on this object. ");
1807             if (error_codes & 0x10)
1808                 proto_item_append_text(ti, "Any other error ");
1809 
1810             if(error_codes)
1811             {
1812                 col_append_fstr(pinfo->cinfo, COL_INFO, "Enable Disable Error");
1813             }
1814             else
1815             {
1816                 switch(enable_disable)
1817                 {
1818                 case 0:
1819                     col_append_fstr(pinfo->cinfo, COL_INFO, "%s is now disabled",
1820                         get_object_id_string(object_id));
1821                     break;
1822                 case 1:
1823                     col_append_fstr(pinfo->cinfo, COL_INFO, "%s is now enabled",
1824                         get_object_id_string(object_id));
1825                     break;
1826                 }
1827 
1828             }
1829         }
1830     }
1831         break;
1832     case VT_SELECT_INPUT_OBJECT:
1833     {
1834         guint32 object_id;
1835 
1836         proto_tree_add_item_ret_uint(tree,
1837             hf_isobus_vt_selectinputobject_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1838         ti = proto_tree_add_item(tree,
1839             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1840         proto_item_set_hidden(ti);
1841         offset += 2;
1842 
1843         if(direction == ecu_to_vt)
1844         {
1845             proto_tree_add_item(tree,
1846                 hf_isobus_vt_selectinputobject_option, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1847 
1848             col_append_fstr(pinfo->cinfo, COL_INFO, "%s should be selected for input",
1849                 get_object_id_string(object_id));
1850         }
1851         else
1852         {
1853             guint32 response, error_codes;
1854 
1855             proto_tree_add_item_ret_uint(tree,
1856                 hf_isobus_vt_selectinputobject_response, tvb, offset, 1, ENC_LITTLE_ENDIAN, &response);
1857             offset += 1;
1858 
1859             ti = proto_tree_add_item_ret_uint(tree,
1860                 hf_isobus_vt_selectinputobject_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1861             proto_item_append_text(ti, ": ");
1862             if (error_codes & 0x01)
1863                 proto_item_append_text(ti, "Object is disabled ");
1864             if (error_codes & 0x02)
1865                 proto_item_append_text(ti, "Invalid Object ID ");
1866             if (error_codes & 0x04)
1867                 proto_item_append_text(ti, "Object is not on the active mask or object is in a hidden container ");
1868             if (error_codes & 0x08)
1869                 proto_item_append_text(ti, "Could not complete. Another Input field is currently being modified, or a Button or Soft Key is currently being held. ");
1870             if (error_codes & 0x10)
1871                 proto_item_append_text(ti, "Any other error ");
1872             if (error_codes & 0x20)
1873                 proto_item_append_text(ti, "Invalid option value ");
1874 
1875             if(error_codes)
1876             {
1877                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while selecting input object");
1878             }
1879             else
1880             {
1881                 switch(response)
1882                 {
1883                     case 0:
1884                         col_append_fstr(pinfo->cinfo, COL_INFO, "%s is not selected",
1885                             get_object_id_string(object_id));
1886                         break;
1887                     case 1:
1888                         col_append_fstr(pinfo->cinfo, COL_INFO, "%s is selected",
1889                             get_object_id_string(object_id));
1890                         break;
1891                     case 2:
1892                         col_append_fstr(pinfo->cinfo, COL_INFO, "%s is opened for edit",
1893                             get_object_id_string(object_id));
1894                         break;
1895                 }
1896             }
1897         }
1898     }
1899         break;
1900     case VT_CONTROL_AUDIO_SIGNAL:
1901     {
1902         if(direction == ecu_to_vt)
1903         {
1904             guint32 activations, frequency, ontime, offtime;
1905 
1906             proto_tree_add_item_ret_uint(tree,
1907                 hf_isobus_vt_controlaudiosignal_activations, tvb, offset, 1, ENC_LITTLE_ENDIAN, &activations);
1908             offset += 1;
1909 
1910             proto_tree_add_item_ret_uint(tree,
1911                 hf_isobus_vt_controlaudiosignal_frequency, tvb, offset, 2, ENC_LITTLE_ENDIAN, &frequency);
1912             offset += 2;
1913 
1914             proto_tree_add_item_ret_uint(tree,
1915                 hf_isobus_vt_controlaudiosignal_ontime, tvb, offset, 2, ENC_LITTLE_ENDIAN, &ontime);
1916             offset += 2;
1917 
1918             proto_tree_add_item_ret_uint(tree,
1919                 hf_isobus_vt_controlaudiosignal_offtime, tvb, offset, 2, ENC_LITTLE_ENDIAN, &offtime);
1920 
1921             col_append_fstr(pinfo->cinfo, COL_INFO, "Control audio signal with %d activations of %d Hz (On-time %d ms, Off-time %d ms.)",
1922                             activations, frequency, ontime, offtime);
1923         }
1924         else
1925         {
1926             guint32 error_codes;
1927             ti = proto_tree_add_item_ret_uint(tree,
1928                 hf_isobus_vt_controlaudiosignal_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1929 
1930             proto_item_append_text(ti, ": ");
1931             if (error_codes & 0x01)
1932                 proto_item_append_text(ti, "Audio device is busy ");
1933             if (error_codes & 0x10)
1934                 proto_item_append_text(ti, "Any other error ");
1935 
1936             if(error_codes)
1937             {
1938                 col_append_fstr(pinfo->cinfo, COL_INFO, "Control audio signal Error");
1939             }
1940             else
1941             {
1942                 col_append_fstr(pinfo->cinfo, COL_INFO, "Control audio signal successful");
1943             }
1944         }
1945     }
1946         break;
1947     case VT_SET_AUDIO_VOLUME:
1948     {
1949         if(direction == ecu_to_vt)
1950         {
1951             guint32 volume;
1952             proto_tree_add_item_ret_uint(tree,
1953                 hf_isobus_vt_setaudiovolume_volume, tvb, offset, 1, ENC_LITTLE_ENDIAN, &volume);
1954 
1955             col_append_fstr(pinfo->cinfo, COL_INFO, "Set audio volume to %d%%", volume);
1956         }
1957         else
1958         {
1959             guint32 error_codes;
1960             ti = proto_tree_add_item_ret_uint(tree,
1961                 hf_isobus_vt_setaudiovolume_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
1962 
1963             proto_item_append_text(ti, ": ");
1964             if (error_codes & 0x01)
1965                 proto_item_append_text(ti, "Audio device is busy, subsequent commands use the new setting ");
1966             if (error_codes & 0x02)
1967                 proto_item_append_text(ti, "Command is not supported ");
1968             if (error_codes & 0x10)
1969                 proto_item_append_text(ti, "Any other error ");
1970 
1971             if(error_codes)
1972             {
1973                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set audio volume Error");
1974             }
1975             else
1976             {
1977                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set audio volume successful");
1978             }
1979         }
1980     }
1981         break;
1982     case VT_CHANGE_CHILD_LOCATION:
1983     {
1984         guint32 parent_object_id, object_id;
1985 
1986         proto_tree_add_item_ret_uint(tree,
1987             hf_isobus_vt_changechildlocation_parentobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &parent_object_id);
1988         ti = proto_tree_add_item(tree,
1989             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1990         proto_item_set_hidden(ti);
1991         offset += 2;
1992 
1993         proto_tree_add_item_ret_uint(tree,
1994             hf_isobus_vt_changechildlocation_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
1995         ti = proto_tree_add_item(tree,
1996             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1997         proto_item_set_hidden(ti);
1998         offset += 2;
1999 
2000         if(direction == ecu_to_vt)
2001         {
2002             guint32 rel_x_location, rel_y_location;
2003 
2004             proto_tree_add_item_ret_uint(tree,
2005                 hf_isobus_vt_changechildlocation_relativexpos, tvb, offset, 1, ENC_LITTLE_ENDIAN, &rel_x_location);
2006             offset += 1;
2007 
2008             proto_tree_add_item_ret_uint(tree,
2009                 hf_isobus_vt_changechildlocation_relativeypos, tvb, offset, 1, ENC_LITTLE_ENDIAN, &rel_y_location);
2010 
2011             col_append_fstr(pinfo->cinfo, COL_INFO, "Change child location of %s in %s to [%u;%u]",
2012                             get_object_id_string(object_id), get_object_id_string(parent_object_id), rel_x_location, rel_y_location);
2013         }
2014         else
2015         {
2016             guint32 error_codes;
2017             ti = proto_tree_add_item_ret_uint(tree,
2018                 hf_isobus_vt_changechildlocation_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2019 
2020             proto_item_append_text(ti, ": ");
2021             if (error_codes & 0x01)
2022                 proto_item_append_text(ti, "Invalid Parent Object ID ");
2023             if (error_codes & 0x02)
2024                 proto_item_append_text(ti, "Invalid Object ID ");
2025             if (error_codes & 0x10)
2026                 proto_item_append_text(ti, "Any other error ");
2027 
2028             if(error_codes)
2029             {
2030                 col_append_fstr(pinfo->cinfo, COL_INFO, "Change child location error");
2031             }
2032             else
2033             {
2034                 col_append_fstr(pinfo->cinfo, COL_INFO, "Change child location of %s in %s succeeded",
2035                     get_object_id_string(object_id), get_object_id_string(parent_object_id));
2036             }
2037         }
2038     }
2039         break;
2040     case VT_CHANGE_SIZE:
2041     {
2042         guint32 object_id;
2043 
2044         proto_tree_add_item_ret_uint(tree,
2045             hf_isobus_vt_changesize_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2046         ti = proto_tree_add_item(tree,
2047             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2048         proto_item_set_hidden(ti);
2049         offset += 2;
2050 
2051         if(direction == ecu_to_vt)
2052         {
2053             guint32 new_width, new_height;
2054 
2055             proto_tree_add_item_ret_uint(tree,
2056                 hf_isobus_vt_changesize_newwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_width);
2057             offset += 2;
2058 
2059             proto_tree_add_item_ret_uint(tree,
2060                 hf_isobus_vt_changesize_newheight, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_height);
2061 
2062             col_append_fstr(pinfo->cinfo, COL_INFO, "Change size of %s to %u x %u",
2063                 get_object_id_string(object_id), new_width, new_height);
2064         }
2065         else
2066         {
2067             guint32 error_codes;
2068             ti = proto_tree_add_item_ret_uint(tree,
2069                 hf_isobus_vt_changesize_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2070 
2071             proto_item_append_text(ti, ": ");
2072             if (error_codes & 0x01)
2073                 proto_item_append_text(ti, "Invalid Object ID ");
2074             if (error_codes & 0x10)
2075                 proto_item_append_text(ti, "Any other error ");
2076 
2077             if(error_codes)
2078             {
2079                 col_append_fstr(pinfo->cinfo, COL_INFO, "Change size error");
2080             }
2081             else
2082             {
2083                 col_append_fstr(pinfo->cinfo, COL_INFO, "Change size of %s succeeded",
2084                     get_object_id_string(object_id));
2085             }
2086         }
2087     }
2088         break;
2089     case VT_CHANGE_BACKGROUND_COLOUR:
2090     {
2091         guint32 object_id, colour;
2092 
2093         proto_tree_add_item_ret_uint(tree,
2094             hf_isobus_vt_changebackgroundcolour_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2095         ti = proto_tree_add_item(tree,
2096             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2097         proto_item_set_hidden(ti);
2098         offset += 2;
2099 
2100         proto_tree_add_item_ret_uint(tree,
2101             hf_isobus_vt_changebackgroundcolour_colour, tvb, offset, 1, ENC_LITTLE_ENDIAN, &colour);
2102         offset += 1;
2103 
2104         if(direction == vt_to_ecu)
2105         {
2106             guint32 error_codes;
2107             ti = proto_tree_add_item_ret_uint(tree,
2108                 hf_isobus_vt_changebackgroundcolour_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2109 
2110             proto_item_append_text(ti, ": ");
2111             if (error_codes & 0x01)
2112                 proto_item_append_text(ti, "Invalid Object ID ");
2113             if (error_codes & 0x02)
2114                 proto_item_append_text(ti, "Invalid Value ");
2115             if (error_codes & 0x04)
2116                 proto_item_append_text(ti, "Value in use ");
2117             if (error_codes & 0x10)
2118                 proto_item_append_text(ti, "Any other error ");
2119 
2120             if(error_codes)
2121             {
2122                 col_append_fstr(pinfo->cinfo, COL_INFO, "Background colour change error");
2123             }
2124             else
2125             {
2126                 col_append_fstr(pinfo->cinfo, COL_INFO, "Background colour of %s has changed to %s",
2127                     get_object_id_string(object_id), rval_to_str(colour, vt_colours, "Unknown"));
2128             }
2129         }
2130         else
2131         {
2132             col_append_fstr(pinfo->cinfo, COL_INFO, "Background colour of %s should change to %s",
2133                 get_object_id_string(object_id), rval_to_str(colour, vt_colours, "Unknown"));
2134         }
2135     }
2136         break;
2137     case VT_CHANGE_NUMERIC_VALUE:
2138     {
2139         guint32 object_id, error_codes, value;
2140 
2141         proto_tree_add_item_ret_uint(tree,
2142             hf_isobus_vt_chgnumval_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2143         ti = proto_tree_add_item(tree,
2144             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2145         proto_item_set_hidden(ti);
2146         offset += 2;
2147 
2148         if(direction == vt_to_ecu)
2149         {
2150             ti = proto_tree_add_item_ret_uint(tree,
2151                 hf_isobus_vt_chgnumval_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2152             proto_item_append_text(ti, ": ");
2153             if (error_codes & 0x01)
2154                 proto_item_append_text(ti, "Invalid Object ID ");
2155             if (error_codes & 0x02)
2156                 proto_item_append_text(ti, "Invalid Value ");
2157             if (error_codes & 0x04)
2158                 proto_item_append_text(ti, "Value in use ");
2159             if (error_codes & 0x10)
2160                 proto_item_append_text(ti, "Any other error ");
2161         } /* no else, byte is reserved for ecu_to_vt */
2162         offset += 1;
2163 
2164         proto_tree_add_item_ret_uint(tree,
2165             hf_isobus_vt_chgnumval_value, tvb, offset, 4, ENC_LITTLE_ENDIAN, &value);
2166 
2167         if(direction == vt_to_ecu)
2168         {
2169             if(error_codes)
2170             {
2171                 col_append_fstr(pinfo->cinfo, COL_INFO, "Numeric value change error");
2172             }
2173             else
2174             {
2175                 col_append_fstr(pinfo->cinfo, COL_INFO, "Numeric value of %s has changed to 0x%X",
2176                     get_object_id_string(object_id), value);
2177             }
2178         }
2179         else
2180         {
2181             col_append_fstr(pinfo->cinfo, COL_INFO, "Numeric value of %s should change to 0x%X",
2182                 get_object_id_string(object_id), value);
2183         }
2184     }
2185         break;
2186     case VT_CHANGE_END_POINT:
2187     {
2188         guint32 object_id;
2189 
2190         proto_tree_add_item_ret_uint(tree,
2191             hf_isobus_vt_changeendpoint_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2192         ti = proto_tree_add_item(tree,
2193             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2194         proto_item_set_hidden(ti);
2195         offset += 2;
2196 
2197         if(direction == ecu_to_vt)
2198         {
2199             guint32 width, height;
2200 
2201             proto_tree_add_item_ret_uint(tree,
2202                 hf_isobus_vt_changeendpoint_width, tvb, offset, 2, ENC_LITTLE_ENDIAN, &width);
2203             offset += 2;
2204 
2205             proto_tree_add_item_ret_uint(tree,
2206                 hf_isobus_vt_changeendpoint_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
2207             offset += 2;
2208 
2209             proto_tree_add_item(tree,
2210                 hf_isobus_vt_changeendpoint_linedirection, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2211 
2212             col_append_fstr(pinfo->cinfo, COL_INFO, "Change end point of line %s to width %d and height %d",
2213                 get_object_id_string(object_id), width, height);
2214         }
2215     }
2216         break;
2217     case VT_CHANGE_FONT_ATTRIBUTES:
2218     {
2219         guint32 object_id;
2220 
2221         proto_tree_add_item_ret_uint(tree,
2222             hf_isobus_vt_changefontattributes_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2223         ti = proto_tree_add_item(tree,
2224             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2225         proto_item_set_hidden(ti);
2226         offset += 2;
2227 
2228         if(direction == ecu_to_vt)
2229         {
2230             proto_tree_add_item(tree,
2231                 hf_isobus_vt_changefontattributes_fontcolour, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2232             offset += 1;
2233 
2234             proto_tree_add_item(tree,
2235                 hf_isobus_vt_changefontattributes_fontsize, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2236             offset += 1;
2237 
2238             proto_tree_add_item(tree,
2239                 hf_isobus_vt_changefontattributes_fonttype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2240             offset += 1;
2241 
2242             proto_tree_add_item(tree,
2243                 hf_isobus_vt_changefontattributes_fontstyle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2244 
2245             col_append_fstr(pinfo->cinfo, COL_INFO, "Change font attributes of %s", get_object_id_string(object_id));
2246         }
2247         else
2248         {
2249             guint32 error_codes;
2250 
2251             ti = proto_tree_add_item_ret_uint(tree,
2252                 hf_isobus_vt_changefontattributes_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2253             proto_item_append_text(ti, ": ");
2254             if (error_codes & 0x01)
2255                 proto_item_append_text(ti, "Invalid Object ID ");
2256             if (error_codes & 0x02)
2257                 proto_item_append_text(ti, "Invalid colour ");
2258             if (error_codes & 0x04)
2259                 proto_item_append_text(ti, "Invalid size ");
2260             if (error_codes & 0x08)
2261                 proto_item_append_text(ti, "Invalid type ");
2262             if (error_codes & 0x10)
2263                 proto_item_append_text(ti, "Invalid style ");
2264             if (error_codes & 0x20)
2265                 proto_item_append_text(ti, "Any other error ");
2266 
2267             if(error_codes == 0)
2268             {
2269                 col_append_fstr(pinfo->cinfo, COL_INFO, "Font attributes of %s successfully changed", get_object_id_string(object_id));
2270             }
2271             else
2272             {
2273                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing font attributes of %s", get_object_id_string(object_id));
2274             }
2275         }
2276     }
2277         break;
2278     case VT_CHANGE_LINE_ATTRIBUTES:
2279     {
2280         guint32 object_id;
2281 
2282         proto_tree_add_item_ret_uint(tree,
2283             hf_isobus_vt_changelineattributes_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2284         ti = proto_tree_add_item(tree,
2285             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2286         proto_item_set_hidden(ti);
2287         offset += 2;
2288 
2289         if(direction == ecu_to_vt)
2290         {
2291             proto_tree_add_item(tree,
2292                 hf_isobus_vt_changelineattributes_linecolour, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2293             offset += 1;
2294 
2295             proto_tree_add_item(tree,
2296                 hf_isobus_vt_changelineattributes_linewidth, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2297             offset += 1;
2298 
2299             proto_tree_add_item(tree,
2300                 hf_isobus_vt_changelineattributes_lineart, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2301 
2302             col_append_fstr(pinfo->cinfo, COL_INFO, "Change line attributes of %s", get_object_id_string(object_id));
2303         }
2304         else
2305         {
2306             guint32 error_codes;
2307 
2308             ti = proto_tree_add_item_ret_uint(tree,
2309                 hf_isobus_vt_changelineattributes_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2310             proto_item_append_text(ti, ": ");
2311             if (error_codes & 0x01)
2312                 proto_item_append_text(ti, "Invalid Object ID ");
2313             if (error_codes & 0x02)
2314                 proto_item_append_text(ti, "Invalid colour ");
2315             if (error_codes & 0x04)
2316                 proto_item_append_text(ti, "Invalid width ");
2317             if (error_codes & 0x10)
2318                 proto_item_append_text(ti, "Any other error ");
2319 
2320             if(error_codes == 0)
2321             {
2322                 col_append_fstr(pinfo->cinfo, COL_INFO, "Line attributes of %s successfully changed", get_object_id_string(object_id));
2323             }
2324             else
2325             {
2326                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing line attributes of %s", get_object_id_string(object_id));
2327             }
2328         }
2329     }
2330         break;
2331     case VT_CHANGE_FILL_ATTRIBUTES:
2332     {
2333         guint32 object_id;
2334 
2335         proto_tree_add_item_ret_uint(tree,
2336             hf_isobus_vt_changefillattributes_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2337         ti = proto_tree_add_item(tree,
2338             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2339         proto_item_set_hidden(ti);
2340         offset += 2;
2341 
2342         if(direction == ecu_to_vt)
2343         {
2344             proto_tree_add_item(tree,
2345                 hf_isobus_vt_changefillattributes_filltype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2346             offset += 1;
2347 
2348             proto_tree_add_item(tree,
2349                 hf_isobus_vt_changefillattributes_fillcolour, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2350             offset += 1;
2351 
2352             proto_tree_add_item(tree,
2353                 hf_isobus_vt_changefillattributes_fillpatternobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2354             ti = proto_tree_add_item(tree,
2355                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2356             proto_item_set_hidden(ti);
2357 
2358             col_append_fstr(pinfo->cinfo, COL_INFO, "Change fill attributes of %s", get_object_id_string(object_id));
2359         }
2360         else
2361         {
2362             guint32 error_codes;
2363 
2364             ti = proto_tree_add_item_ret_uint(tree,
2365                 hf_isobus_vt_changefillattributes_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2366             proto_item_append_text(ti, ": ");
2367             if (error_codes & 0x01)
2368                 proto_item_append_text(ti, "Invalid Object ID ");
2369             if (error_codes & 0x02)
2370                 proto_item_append_text(ti, "Invalid type ");
2371             if (error_codes & 0x04)
2372                 proto_item_append_text(ti, "Invalid colour ");
2373             if (error_codes & 0x08)
2374                 proto_item_append_text(ti, "Invalid pattern Object ID ");
2375             if (error_codes & 0x10)
2376                 proto_item_append_text(ti, "Any other error ");
2377 
2378             if(error_codes == 0)
2379             {
2380                 col_append_fstr(pinfo->cinfo, COL_INFO, "Fill attributes of %s successfully changed", get_object_id_string(object_id));
2381             }
2382             else
2383             {
2384                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing fill attributes of %s", get_object_id_string(object_id));
2385             }
2386         }
2387     }
2388         break;
2389     case VT_CHANGE_ACTIVE_MASK:
2390     {
2391         guint32 working_set_object_id, new_active_mask_object_id, error_codes;
2392 
2393         if(direction == ecu_to_vt)
2394         {
2395             proto_tree_add_item_ret_uint(tree,
2396                 hf_isobus_vt_changeactivemask_workingset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &working_set_object_id);
2397             ti = proto_tree_add_item(tree,
2398                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2399             proto_item_set_hidden(ti);
2400             offset += 2;
2401         }
2402         else
2403         {
2404             working_set_object_id = 0;
2405         }
2406 
2407         proto_tree_add_item_ret_uint(tree,
2408             hf_isobus_vt_changeactivemask_newactivemask, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_active_mask_object_id);
2409         ti = proto_tree_add_item(tree,
2410             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2411         proto_item_set_hidden(ti);
2412         offset += 2;
2413 
2414         if(direction == vt_to_ecu)
2415         {
2416             ti = proto_tree_add_item_ret_uint(tree,
2417                 hf_isobus_vt_changeactivemask_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2418             proto_item_append_text(ti, ": ");
2419             if (error_codes & 0x01)
2420                 proto_item_append_text(ti, "Invalid Working Set Object ID ");
2421             if (error_codes & 0x02)
2422                 proto_item_append_text(ti, "Invalid Mask Object ID ");
2423             if (error_codes & 0x10)
2424                 proto_item_append_text(ti, "Any other error ");
2425         }
2426 
2427         if(direction == ecu_to_vt)
2428         {
2429             col_append_fstr(pinfo->cinfo, COL_INFO, "Change active mask of working set %s to %s", get_object_id_string(working_set_object_id), get_object_id_string(new_active_mask_object_id));
2430         }
2431         else if(direction == vt_to_ecu)
2432         {
2433             if(error_codes == 0)
2434             {
2435                 col_append_fstr(pinfo->cinfo, COL_INFO, "Active mask successfully changed to %s", get_object_id_string(new_active_mask_object_id));
2436             }
2437             else
2438             {
2439                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing active mask to %s", get_object_id_string(new_active_mask_object_id));
2440             }
2441         }
2442     }
2443         break;
2444     case VT_CHANGE_SOFT_KEY_MASK:
2445     {
2446         guint32 error_codes, data_mask_object_id, new_soft_key_mask_object_id;
2447 
2448         if(direction == ecu_to_vt)
2449         {
2450             proto_tree_add_item(tree,
2451                 hf_isobus_vt_changesoftkeymask_masktype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2452             offset += 1;
2453         }
2454 
2455         proto_tree_add_item_ret_uint(tree,
2456             hf_isobus_vt_changesoftkeymask_datamaskobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &data_mask_object_id);
2457         ti = proto_tree_add_item(tree,
2458             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2459         proto_item_set_hidden(ti);
2460         offset += 2;
2461 
2462         proto_tree_add_item_ret_uint(tree,
2463             hf_isobus_vt_changesoftkeymask_newsoftkeymaskobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_soft_key_mask_object_id);
2464         ti = proto_tree_add_item(tree,
2465             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2466         proto_item_set_hidden(ti);
2467         offset += 2;
2468 
2469         if(direction == vt_to_ecu)
2470         {
2471             ti = proto_tree_add_item_ret_uint(tree,
2472                 hf_isobus_vt_changesoftkeymask_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2473             proto_item_append_text(ti, ": ");
2474             if (error_codes & 0x01)
2475                 proto_item_append_text(ti, "Invalid Data or Alarm Mask Object ID ");
2476             if (error_codes & 0x02)
2477                 proto_item_append_text(ti, "Invalid Soft Key Mask Object ID ");
2478             if (error_codes & 0x04)
2479                 proto_item_append_text(ti, "Missing Objects ");
2480             if (error_codes & 0x08)
2481                 proto_item_append_text(ti, "Mask or child object has errors ");
2482             if (error_codes & 0x10)
2483                 proto_item_append_text(ti, "Any other error ");
2484         }
2485 
2486         if(direction == ecu_to_vt)
2487         {
2488             col_append_fstr(pinfo->cinfo, COL_INFO, "Soft key mask of %s should change to %s", get_object_id_string(data_mask_object_id), get_object_id_string(new_soft_key_mask_object_id));
2489         }
2490         else if(direction == vt_to_ecu)
2491         {
2492             if(error_codes == 0)
2493             {
2494                 col_append_fstr(pinfo->cinfo, COL_INFO, "Soft key mask of %s successfully changed to %s", get_object_id_string(data_mask_object_id), get_object_id_string(new_soft_key_mask_object_id));
2495             }
2496             else
2497             {
2498                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing soft key mask of %s to %s", get_object_id_string(data_mask_object_id), get_object_id_string(new_soft_key_mask_object_id));
2499             }
2500         }
2501     }
2502         break;
2503     case VT_CHANGE_ATTRIBUTES:
2504     {
2505         guint32 attribute_id, error_codes, object_id, new_value;
2506 
2507         proto_tree_add_item_ret_uint(tree,
2508             hf_isobus_vt_changeattributes_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2509         ti = proto_tree_add_item(tree,
2510             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2511         proto_item_set_hidden(ti);
2512         offset += 2;
2513 
2514         proto_tree_add_item_ret_uint(tree,
2515             hf_isobus_vt_changeattributes_attributeid, tvb, offset, 1, ENC_LITTLE_ENDIAN, &attribute_id);
2516         offset += 1;
2517 
2518         if(direction == ecu_to_vt)
2519         {
2520             proto_tree_add_item_ret_uint(tree,
2521                 hf_isobus_vt_changeattributes_newvalue, tvb, offset, 1, ENC_LITTLE_ENDIAN, &new_value);
2522         }
2523         else if(direction == vt_to_ecu)
2524         {
2525             ti = proto_tree_add_item_ret_uint(tree,
2526                 hf_isobus_vt_changeattributes_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2527             proto_item_append_text(ti, ": ");
2528             if (error_codes & 0x01)
2529                 proto_item_append_text(ti, "Invalid Object ID ");
2530             if (error_codes & 0x02)
2531                 proto_item_append_text(ti, "Invalid Attribute ID ");
2532             if (error_codes & 0x04)
2533                 proto_item_append_text(ti, "Invalid Value ");
2534             if (error_codes & 0x08)
2535                 proto_item_append_text(ti, "Value in use ");
2536             if (error_codes & 0x10)
2537                 proto_item_append_text(ti, "Any other error ");
2538         }
2539 
2540         if(direction == ecu_to_vt)
2541         {
2542             col_append_fstr(pinfo->cinfo, COL_INFO, "Attribute ID %u of %s should change to 0x%X", attribute_id, get_object_id_string(object_id), new_value);
2543         }
2544         else if(direction == vt_to_ecu)
2545         {
2546             if(error_codes)
2547             {
2548                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing Attribute ID %u of %s", attribute_id, get_object_id_string(object_id));
2549             }
2550             else
2551             {
2552                 col_append_fstr(pinfo->cinfo, COL_INFO, "Attribute ID %u of %s has successfully changed", attribute_id, get_object_id_string(object_id));
2553             }
2554         }
2555     }
2556         break;
2557     case VT_CHANGE_PRIORITY:
2558     {
2559         guint32 object_id, new_priority, error_codes;
2560 
2561         proto_tree_add_item_ret_uint(tree,
2562             hf_isobus_vt_changepriority_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2563         ti = proto_tree_add_item(tree,
2564             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2565         proto_item_set_hidden(ti);
2566         offset += 2;
2567 
2568         proto_tree_add_item_ret_uint(tree,
2569             hf_isobus_vt_changepriority_newpriority, tvb, offset, 1, ENC_LITTLE_ENDIAN, &new_priority);
2570         offset += 1;
2571 
2572         if(direction == vt_to_ecu)
2573         {
2574             ti = proto_tree_add_item_ret_uint(tree,
2575                 hf_isobus_vt_changepriority_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2576             proto_item_append_text(ti, ": ");
2577             if (error_codes & 0x01)
2578                 proto_item_append_text(ti, "Invalid Object ID ");
2579             if (error_codes & 0x02)
2580                 proto_item_append_text(ti, "Invalid priority ");
2581             if (error_codes & 0x10)
2582                 proto_item_append_text(ti, "Any other error ");
2583         }
2584 
2585         if(direction == ecu_to_vt)
2586         {
2587             col_append_fstr(pinfo->cinfo, COL_INFO, "Priority of alarm mask with %s should change to %u", get_object_id_string(object_id), new_priority);
2588         }
2589         else if(direction == vt_to_ecu)
2590         {
2591             if(error_codes)
2592             {
2593                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing priority of alarm mask with %s to %u", get_object_id_string(object_id), new_priority);
2594             }
2595             else
2596             {
2597                 col_append_fstr(pinfo->cinfo, COL_INFO, "Priority of alarm mask with %s has successfully changed to %u", get_object_id_string(object_id), new_priority);
2598             }
2599         }
2600     }
2601         break;
2602     case VT_CHANGE_LIST_ITEM:
2603     {
2604         guint32 list_object_id, new_object_id, list_index, error_codes;
2605 
2606         proto_tree_add_item_ret_uint(tree,
2607             hf_isobus_vt_changelistitem_listobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &list_object_id);
2608         ti = proto_tree_add_item(tree,
2609             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2610         proto_item_set_hidden(ti);
2611         offset += 2;
2612 
2613         proto_tree_add_item_ret_uint(tree,
2614             hf_isobus_vt_changelistitem_listindex, tvb, offset, 1, ENC_LITTLE_ENDIAN, &list_index);
2615         offset += 1;
2616 
2617         proto_tree_add_item_ret_uint(tree,
2618             hf_isobus_vt_changelistitem_newobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_object_id);
2619         ti = proto_tree_add_item(tree,
2620             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2621         proto_item_set_hidden(ti);
2622         offset += 2;
2623 
2624         if(direction == vt_to_ecu)
2625         {
2626             ti = proto_tree_add_item_ret_uint(tree,
2627                 hf_isobus_vt_changelistitem_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2628             proto_item_append_text(ti, ": ");
2629             if (error_codes & 0x01)
2630                 proto_item_append_text(ti, "Invalid Input List object ID or Output List object ID, Animation object, External Object Definition object ");
2631             if (error_codes & 0x02)
2632                 proto_item_append_text(ti, "Invalid List Index ");
2633             if (error_codes & 0x04)
2634                 proto_item_append_text(ti, "Invalid New List Item Object ID ");
2635             if (error_codes & 0x08)
2636                 proto_item_append_text(ti, "Value in user ");
2637             if (error_codes & 0x10)
2638                 proto_item_append_text(ti, "Any other error ");
2639         }
2640 
2641         if(direction == ecu_to_vt)
2642         {
2643             col_append_fstr(pinfo->cinfo, COL_INFO, "%s should be added to list %s at index %u", get_object_id_string(new_object_id), get_object_id_string(list_object_id), list_index);
2644         }
2645         else if(direction == vt_to_ecu)
2646         {
2647             if(error_codes)
2648             {
2649                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while adding %s to list %s at index %u", get_object_id_string(new_object_id), get_object_id_string(list_object_id), list_index);
2650             }
2651             else
2652             {
2653                 col_append_fstr(pinfo->cinfo, COL_INFO, "%s was successfully added to %s at index %u", get_object_id_string(new_object_id), get_object_id_string(list_object_id), list_index);
2654             }
2655         }
2656     }
2657         break;
2658     case VT_DELETE_OBJECT_POOL:
2659     {
2660         if(direction == ecu_to_vt)
2661         {
2662             col_append_fstr(pinfo->cinfo, COL_INFO, "Object pool should be deleted from volatile memory");
2663         }
2664         else
2665         {
2666             guint32 error_codes;
2667 
2668             ti = proto_tree_add_item_ret_uint(tree,
2669                 hf_isobus_vt_deleteobjectpool_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2670             proto_item_append_text(ti, ": ");
2671             if (error_codes & 0x01)
2672                 proto_item_append_text(ti, "Deletion Error ");
2673             if (error_codes & 0x10)
2674                 proto_item_append_text(ti, "Any other error ");
2675 
2676             if(error_codes)
2677             {
2678                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while deleting object pool from volatile memory");
2679             }
2680             else
2681             {
2682                 col_append_fstr(pinfo->cinfo, COL_INFO, "Object pool was successfully deleted from volatile memory");
2683             }
2684         }
2685     }
2686         break;
2687     case VT_CHANGE_STRING_VALUE:
2688     {
2689         if(direction == ecu_to_vt)
2690         {
2691             guint encoding = ENC_ASCII|ENC_NA;
2692             guint32 object_id, str_length;
2693             guint16 firstTwoBytesString;
2694             const guint8* value;
2695             guint bomOffset = 0;
2696 
2697             proto_tree_add_item_ret_uint(tree,
2698                 hf_isobus_vt_chgstrval_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2699             ti = proto_tree_add_item(tree,
2700                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2701             proto_item_set_hidden(ti);
2702             offset += 2;
2703 
2704             proto_tree_add_item_ret_uint(tree,
2705                 hf_isobus_vt_chgstrval_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &str_length);
2706             offset += 2;
2707 
2708             firstTwoBytesString = tvb_get_letohs(tvb,offset);
2709             if(firstTwoBytesString == 0xFEFF)
2710             {
2711                 encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
2712                 bomOffset = 2;
2713             }
2714 
2715             proto_tree_add_item_ret_string(tree,
2716                 hf_isobus_vt_chgstrval_value, tvb, offset + bomOffset, str_length - bomOffset, encoding, pinfo->pool, &value);
2717 
2718             col_append_fstr(pinfo->cinfo, COL_INFO, "String value of %s should change to %s",
2719                 get_object_id_string(object_id), value);
2720         }
2721         else
2722         {
2723             guint32 object_id, error_codes;
2724 
2725             offset += 2;    /*first two bytes are reserved*/
2726 
2727             proto_tree_add_item_ret_uint(tree,
2728                 hf_isobus_vt_chgstrval_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2729             ti = proto_tree_add_item(tree,
2730                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2731             proto_item_set_hidden(ti);
2732             offset += 2;
2733 
2734             ti = proto_tree_add_item_ret_uint(tree,
2735                 hf_isobus_vt_chgstrval_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2736 
2737             proto_item_append_text(ti, ": ");
2738             if (error_codes & 0x02)
2739                 proto_item_append_text(ti, "Invalid Object ID ");
2740             if (error_codes & 0x04)
2741                 proto_item_append_text(ti, "String too long ");
2742             if (error_codes & 0x08)
2743                 proto_item_append_text(ti, "Any other error ");
2744             if (error_codes & 0x10)
2745                 proto_item_append_text(ti, "Value in use ");
2746 
2747             if(error_codes)
2748             {
2749                 col_append_fstr(pinfo->cinfo, COL_INFO, "String value change error");
2750             }
2751             else
2752             {
2753                 col_append_fstr(pinfo->cinfo, COL_INFO, "String value of %s has changed",
2754                     get_object_id_string(object_id));
2755             }
2756         }
2757     }
2758         break;
2759     case VT_CHANGE_CHILD_POSITION:
2760     {
2761         guint32 parent_object_id, object_id;
2762 
2763         proto_tree_add_item_ret_uint(tree,
2764             hf_isobus_vt_changechildposition_parentobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &parent_object_id);
2765         ti = proto_tree_add_item(tree,
2766             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2767         proto_item_set_hidden(ti);
2768         offset += 2;
2769 
2770 
2771         proto_tree_add_item_ret_uint(tree,
2772             hf_isobus_vt_changechildposition_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2773         ti = proto_tree_add_item(tree,
2774             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2775         proto_item_set_hidden(ti);
2776         offset += 2;
2777 
2778         if(direction == ecu_to_vt)
2779         {
2780             guint32 rel_x_position, rel_y_position;
2781 
2782             proto_tree_add_item_ret_uint(tree,
2783                 hf_isobus_vt_changechildposition_xpos, tvb, offset, 2, ENC_LITTLE_ENDIAN, &rel_x_position);
2784             offset += 2;
2785 
2786             proto_tree_add_item_ret_uint(tree,
2787                 hf_isobus_vt_changechildposition_ypos, tvb, offset, 2, ENC_LITTLE_ENDIAN, &rel_y_position);
2788 
2789             col_append_fstr(pinfo->cinfo, COL_INFO, "Change child position of %s in %s to [%u:%u]",
2790                 get_object_id_string(object_id), get_object_id_string(parent_object_id), rel_x_position, rel_y_position);
2791         }
2792         else
2793         {
2794             guint32 error_codes;
2795             ti = proto_tree_add_item_ret_uint(tree,
2796                 hf_isobus_vt_changechildposition_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2797 
2798             proto_item_append_text(ti, ": ");
2799             if (error_codes & 0x01)
2800                 proto_item_append_text(ti, "Invalid Parent Object ID ");
2801             if (error_codes & 0x02)
2802                 proto_item_append_text(ti, "Invalid Object ID ");
2803             if (error_codes & 0x10)
2804                 proto_item_append_text(ti, "Any other error ");
2805 
2806             if(error_codes)
2807             {
2808                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing child position of %s", get_object_id_string(object_id));
2809             }
2810             else
2811             {
2812                 col_append_fstr(pinfo->cinfo, COL_INFO, "Change child position of %s in %s succeeded",
2813                     get_object_id_string(object_id), get_object_id_string(parent_object_id));
2814             }
2815         }
2816     }
2817         break;
2818     case VT_CHANGE_OBJECT_LABEL:
2819     {
2820         if(direction == ecu_to_vt)
2821         {
2822             guint32 object_id, string_object_id;
2823 
2824             proto_tree_add_item_ret_uint(tree,
2825                 hf_isobus_vt_changeobjectlabel_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2826             ti = proto_tree_add_item(tree,
2827                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2828             proto_item_set_hidden(ti);
2829             offset += 2;
2830 
2831             proto_tree_add_item_ret_uint(tree,
2832                 hf_isobus_vt_changeobjectlabel_stringobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &string_object_id);
2833             ti = proto_tree_add_item(tree,
2834                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2835             proto_item_set_hidden(ti);
2836             offset += 2;
2837 
2838             proto_tree_add_item(tree,
2839                 hf_isobus_vt_changeobjectlabel_fonttype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2840             offset += 1;
2841 
2842             proto_tree_add_item(tree,
2843                 hf_isobus_vt_changeobjectlabel_graphicobjectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2844             ti = proto_tree_add_item(tree,
2845                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2846             proto_item_set_hidden(ti);
2847 
2848             col_append_fstr(pinfo->cinfo, COL_INFO, "Change object label of %s to string %s",
2849                             get_object_id_string(object_id), get_object_id_string(string_object_id));
2850         }
2851         else
2852         {
2853             guint32 error_codes;
2854             ti = proto_tree_add_item_ret_uint(tree,
2855                 hf_isobus_vt_changeobjectlabel_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2856 
2857             proto_item_append_text(ti, ": ");
2858             if (error_codes & 0x01)
2859                 proto_item_append_text(ti, "Invalid object id ");
2860             if (error_codes & 0x02)
2861                 proto_item_append_text(ti, "Invalid String Variable object id ");
2862             if (error_codes & 0x04)
2863                 proto_item_append_text(ti, "Invalid font type ");
2864             if (error_codes & 0x08)
2865                 proto_item_append_text(ti, "No Object Label Reference List object available in object pool ");
2866             if (error_codes & 0x10)
2867                 proto_item_append_text(ti, "Designator references invalid objects ");
2868             if (error_codes & 0x20)
2869                 proto_item_append_text(ti, "Any other error ");
2870 
2871             if(error_codes)
2872             {
2873                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing object label");
2874             }
2875             else
2876             {
2877                 col_append_fstr(pinfo->cinfo, COL_INFO, "Object label successfully changed");
2878             }
2879         }
2880     }
2881         break;
2882     case VT_CHANGE_POLYGON_POINT:
2883     {
2884         guint32 object_id;
2885 
2886         proto_tree_add_item_ret_uint(tree,
2887             hf_isobus_vt_changepolygonpoint_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2888         ti = proto_tree_add_item(tree,
2889             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2890         proto_item_set_hidden(ti);
2891         offset += 2;
2892 
2893         if(direction == ecu_to_vt)
2894         {
2895             guint32 x_value, y_value, point_index;
2896 
2897             proto_tree_add_item_ret_uint(tree,
2898                 hf_isobus_vt_changepolygonpoint_pointindex, tvb, offset, 1, ENC_LITTLE_ENDIAN, &point_index);
2899             offset += 1;
2900 
2901             proto_tree_add_item_ret_uint(tree,
2902                 hf_isobus_vt_changepolygonpoint_xvalue, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_value);
2903             offset += 2;
2904 
2905             proto_tree_add_item_ret_uint(tree,
2906                 hf_isobus_vt_changepolygonpoint_yvalue, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_value);
2907 
2908             col_append_fstr(pinfo->cinfo, COL_INFO, "Change point %u of polygon %s to location [%u:%u] ",
2909                 point_index, get_object_id_string(object_id), x_value, y_value);
2910         }
2911         else
2912         {
2913             guint32 error_codes;
2914             ti = proto_tree_add_item_ret_uint(tree,
2915                 hf_isobus_vt_changepolygonpoint_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2916             proto_item_append_text(ti, ": ");
2917             if (error_codes & 0x01)
2918                 proto_item_append_text(ti, "Invalid Object ID ");
2919             if (error_codes & 0x02)
2920                 proto_item_append_text(ti, "Invalid point index ");
2921             if (error_codes & 0x04)
2922                 proto_item_append_text(ti, "Any other error ");
2923 
2924             if(error_codes)
2925             {
2926                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing polygon point");
2927             }
2928             else
2929             {
2930                 col_append_fstr(pinfo->cinfo, COL_INFO, "Polygon point successfully changed");
2931             }
2932         }
2933     }
2934         break;
2935     case VT_CHANGE_POLYGON_SCALE:
2936     {
2937         guint32 object_id, new_width, new_height, error_codes;
2938 
2939         proto_tree_add_item_ret_uint(tree,
2940             hf_isobus_vt_changepolygonscale_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2941         ti = proto_tree_add_item(tree,
2942             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2943         proto_item_set_hidden(ti);
2944         offset += 2;
2945 
2946         proto_tree_add_item_ret_uint(tree,
2947             hf_isobus_vt_changepolygonscale_newwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_width);
2948         offset += 2;
2949 
2950         proto_tree_add_item_ret_uint(tree,
2951             hf_isobus_vt_changepolygonscale_newheight, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_height);
2952         offset += 2;
2953 
2954         if(direction == vt_to_ecu)
2955         {
2956             ti = proto_tree_add_item_ret_uint(tree,
2957                 hf_isobus_vt_changepolygonscale_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
2958             proto_item_append_text(ti, ": ");
2959             if (error_codes & 0x01)
2960                 proto_item_append_text(ti, "Invalid Object ID ");
2961             if (error_codes & 0x10)
2962                 proto_item_append_text(ti, "Any other error ");
2963         }
2964 
2965         if(direction == ecu_to_vt)
2966         {
2967             col_append_fstr(pinfo->cinfo, COL_INFO, "Change scale of polygon %s to width %u and height %u ",
2968                 get_object_id_string(object_id), new_width, new_height);
2969         }
2970         else if(direction == vt_to_ecu)
2971         {
2972             if(error_codes)
2973             {
2974                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing scale of polygon %s to width %u and height %u ",
2975                     get_object_id_string(object_id), new_width, new_height);
2976             }
2977             else
2978             {
2979                 col_append_fstr(pinfo->cinfo, COL_INFO, "Scale of polygon %s scale successfully changed to width %u and height %u ",
2980                     get_object_id_string(object_id), new_width, new_height);
2981             }
2982         }
2983     }
2984         break;
2985     case VT_GRAPHICS_CONTEXT:
2986     {
2987         guint32 object_id, sub_command_id;
2988 
2989         proto_tree_add_item_ret_uint(tree,
2990             hf_isobus_vt_graphicscontext_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
2991         ti = proto_tree_add_item(tree,
2992             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2993         proto_item_set_hidden(ti);
2994         offset += 2;
2995 
2996         proto_tree_add_item_ret_uint(tree,
2997             hf_isobus_vt_graphicscontext_subcommandid, tvb, offset, 1, ENC_LITTLE_ENDIAN, &sub_command_id);
2998         offset += 1;
2999 
3000         col_append_fstr(pinfo->cinfo, COL_INFO, "Graphic Context of %s: ", get_object_id_string(object_id));
3001 
3002         switch(sub_command_id)
3003         {
3004             case SET_GRAPHICS_CURSOR:
3005             {
3006                 gint32 x_position, y_position;
3007 
3008                 proto_tree_add_item_ret_int(tree,
3009                     hf_isobus_vt_graphicscontext_setgraphicscursor_xposition, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_position);
3010                 offset += 2;
3011 
3012                 proto_tree_add_item_ret_int(tree,
3013                     hf_isobus_vt_graphicscontext_setgraphicscursor_yposition, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_position);
3014 
3015                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Graphics Cursor to Position [%d;%d] ",
3016                     x_position, y_position);
3017             }
3018                 break;
3019             case MOVE_GRAPHICS_CURSOR:
3020             {
3021                 gint32 x_offset, y_offset;
3022 
3023                 proto_tree_add_item_ret_int(tree,
3024                     hf_isobus_vt_graphicscontext_movegraphicscursor_xoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_offset);
3025                 offset += 2;
3026 
3027                 proto_tree_add_item_ret_int(tree,
3028                     hf_isobus_vt_graphicscontext_movegraphicscursor_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3029 
3030                 col_append_fstr(pinfo->cinfo, COL_INFO, "Move Graphics Cursor by Offset [%d;%d] ",
3031                     x_offset, y_offset);
3032             }
3033                 break;
3034             case SET_FOREGROUND_COLOUR:
3035             {
3036                 guint32 colour;
3037 
3038                 proto_tree_add_item_ret_uint(tree,
3039                     hf_isobus_vt_graphicscontext_setforegroundcolour_colour, tvb, offset, 1, ENC_LITTLE_ENDIAN, &colour);
3040 
3041                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Foreground Colour to %u",
3042                     colour);
3043             }
3044                 break;
3045             case SET_BACKGROUND_COLOUR:
3046             {
3047                 guint32 colour;
3048 
3049                 proto_tree_add_item_ret_uint(tree,
3050                     hf_isobus_vt_graphicscontext_setbackgroundcolour_colour, tvb, offset, 1, ENC_LITTLE_ENDIAN, &colour);
3051 
3052                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Background Colour to %u",
3053                     colour);
3054             }
3055                 break;
3056             case SET_LINE_ATTRIBUTES_OBJECT_ID:
3057             {
3058                 guint32 line_attr_object_id;
3059 
3060                 proto_tree_add_item_ret_uint(tree,
3061                     hf_isobus_vt_graphicscontext_setlineattributesobjectid_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &line_attr_object_id);
3062                 ti = proto_tree_add_item(tree,
3063                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3064                 proto_item_set_hidden(ti);
3065 
3066                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Line Attributes to %s",
3067                     get_object_id_string(line_attr_object_id));
3068             }
3069                 break;
3070             case SET_FILL_ATTRIBUTES_OBJECT_ID:
3071             {
3072                 guint32 fill_attr_object_id;
3073 
3074                 proto_tree_add_item_ret_uint(tree,
3075                     hf_isobus_vt_graphicscontext_setfillattributesobjectid_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &fill_attr_object_id);
3076                 ti = proto_tree_add_item(tree,
3077                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3078                 proto_item_set_hidden(ti);
3079 
3080                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Fill Attributes to %s",
3081                     get_object_id_string(fill_attr_object_id));
3082             }
3083                 break;
3084             case SET_FONT_ATTRIBUTES_OBJECT_ID:
3085             {
3086                 guint32 font_attr_object_id;
3087 
3088                 proto_tree_add_item_ret_uint(tree,
3089                     hf_isobus_vt_graphicscontext_setfontattributesobjectid_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &font_attr_object_id);
3090                 ti = proto_tree_add_item(tree,
3091                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3092                 proto_item_set_hidden(ti);
3093 
3094                 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Font Attributes to %s",
3095                     get_object_id_string(font_attr_object_id));
3096             }
3097                 break;
3098             case ERASE_RECTANGLE:
3099             {
3100                 guint32 width, height;
3101 
3102                 proto_tree_add_item_ret_uint(tree,
3103                     hf_isobus_vt_graphicscontext_eraserectangle_width, tvb, offset, 2, ENC_LITTLE_ENDIAN, &width);
3104                 offset += 2;
3105 
3106                 proto_tree_add_item_ret_uint(tree,
3107                     hf_isobus_vt_graphicscontext_eraserectangle_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
3108 
3109                 col_append_fstr(pinfo->cinfo, COL_INFO, "Erase Rectangle width %u height %u",
3110                     width, height);
3111             }
3112                 break;
3113             case DRAW_POINT:
3114             {
3115                 gint32 x_offset, y_offset;
3116 
3117                 proto_tree_add_item_ret_int(tree,
3118                     hf_isobus_vt_graphicscontext_drawpoint_xoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_offset);
3119                 offset += 2;
3120 
3121                 proto_tree_add_item_ret_int(tree,
3122                     hf_isobus_vt_graphicscontext_drawpoint_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3123 
3124                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw point at graphics cursor with offset [%d;%d] ",
3125                     x_offset, y_offset);
3126             }
3127                 break;
3128             case DRAW_LINE:
3129             {
3130                 gint32 x_offset, y_offset;
3131 
3132                 proto_tree_add_item_ret_int(tree,
3133                     hf_isobus_vt_graphicscontext_drawline_xoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_offset);
3134                 offset += 2;
3135 
3136                 proto_tree_add_item_ret_int(tree,
3137                     hf_isobus_vt_graphicscontext_drawline_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3138 
3139                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw line from graphics cursor to offset [%d;%d] ",
3140                     x_offset, y_offset);
3141             }
3142                 break;
3143             case DRAW_RECTANGLE:
3144             {
3145                 guint32 width, height;
3146 
3147                 proto_tree_add_item_ret_uint(tree,
3148                     hf_isobus_vt_graphicscontext_drawrectangle_width, tvb, offset, 2, ENC_LITTLE_ENDIAN, &width);
3149                 offset += 2;
3150 
3151                 proto_tree_add_item_ret_uint(tree,
3152                     hf_isobus_vt_graphicscontext_drawrectangle_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
3153 
3154                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw Rectangle width %u height %u",
3155                     width, height);
3156             }
3157                 break;
3158             case DRAW_CLOSED_ELLIPSE:
3159             {
3160                 guint32 width, height;
3161 
3162                 proto_tree_add_item_ret_uint(tree,
3163                     hf_isobus_vt_graphicscontext_drawclosedellipse_width, tvb, offset, 2, ENC_LITTLE_ENDIAN, &width);
3164                 offset += 2;
3165 
3166                 proto_tree_add_item_ret_uint(tree,
3167                     hf_isobus_vt_graphicscontext_drawclosedellipse_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
3168 
3169                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw Closed Ellipse width %u height %u",
3170                     width, height);
3171             }
3172                 break;
3173             case DRAW_POLYGON:
3174             {
3175                 guint32 number_of_points, i;
3176 
3177                 proto_tree_add_item_ret_uint(tree,
3178                     hf_isobus_vt_graphicscontext_drawpolygon_numberofpoints, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_points);
3179                 offset += 1;
3180 
3181                 for(i = 0; i < number_of_points; i++)
3182                 {
3183                     proto_item *point_item;
3184                     proto_tree *point_subtree;
3185                     gint32 x_offset, y_offset;
3186 
3187                     point_subtree = proto_tree_add_subtree(tree,
3188                         tvb, offset, 4, ett_isobus_vt_getsupportedwidechars_range, &point_item, "Point");
3189 
3190                     proto_tree_add_item_ret_int(point_subtree,
3191                         hf_isobus_vt_graphicscontext_drawpolygon_point_xoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_offset);
3192                     offset += 2;
3193 
3194                     proto_tree_add_item_ret_int(point_subtree,
3195                         hf_isobus_vt_graphicscontext_drawpolygon_point_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3196                     offset += 2;
3197 
3198                     proto_item_set_text(point_item, "Point with offset [%d;%d]", x_offset, y_offset);
3199                 }
3200 
3201                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw Polygon of %u points",
3202                     number_of_points);
3203             }
3204                 break;
3205             case DRAW_TEXT:
3206             {
3207                 guint encoding = ENC_ASCII|ENC_NA;
3208                 guint16 firstTwoBytesString;
3209                 guint bomOffset = 0;
3210                 guint32 background, number_of_bytes;
3211                 const guint8* value;
3212 
3213                 proto_tree_add_item_ret_uint(tree,
3214                     hf_isobus_vt_graphicscontext_drawtext_background, tvb, offset, 1, ENC_LITTLE_ENDIAN, &background);
3215                 offset += 1;
3216 
3217                 proto_tree_add_item_ret_uint(tree,
3218                     hf_isobus_vt_graphicscontext_drawtext_numberofbytes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_bytes);
3219                 offset += 1;
3220 
3221                 firstTwoBytesString = tvb_get_letohs(tvb,offset);
3222                 if(firstTwoBytesString == 0xFEFF)
3223                 {
3224                     encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
3225                     bomOffset = 2;
3226                 }
3227 
3228                 proto_tree_add_item_ret_string(tree,
3229                     hf_isobus_vt_graphicscontext_drawtext_textstring, tvb, offset + bomOffset, number_of_bytes - bomOffset, encoding, pinfo->pool, &value);
3230 
3231                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw string \"%s\" at cursor with a %s background",
3232                     value, val_to_str(background, draw_text_background, "unknown"));
3233             }
3234                 break;
3235             case PAN_VIEWPORT:
3236             {
3237                 gint32 viewport_x, viewport_y;
3238 
3239                 proto_tree_add_item_ret_int(tree,
3240                     hf_isobus_vt_graphicscontext_panviewport_viewportx, tvb, offset, 2, ENC_LITTLE_ENDIAN, &viewport_x);
3241                 offset += 2;
3242 
3243                 proto_tree_add_item_ret_int(tree,
3244                     hf_isobus_vt_graphicscontext_panviewport_viewporty, tvb, offset, 2, ENC_LITTLE_ENDIAN, &viewport_y);
3245 
3246                 col_append_fstr(pinfo->cinfo, COL_INFO, "Pan Viewport by [%d;%d] pixels",
3247                     viewport_x, viewport_y);
3248             }
3249                 break;
3250             case ZOOM_VIEWPORT:
3251             {
3252                 gfloat zoom_value;
3253 
3254                 zoom_value = tvb_get_ieee_float(tvb, offset, ENC_LITTLE_ENDIAN);
3255                 proto_tree_add_item(tree,
3256                     hf_isobus_vt_graphicscontext_zoomviewport_zoomvalue, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3257 
3258                 col_append_fstr(pinfo->cinfo, COL_INFO, "Zoom Viewport by %g",
3259                     zoom_value);
3260             }
3261                 break;
3262             case PAN_AND_ZOOM_VIEWPORT:
3263             {
3264                 gfloat zoom_value;
3265                 gint32 viewport_x, viewport_y;
3266 
3267                 proto_tree_add_item_ret_int(tree,
3268                     hf_isobus_vt_graphicscontext_panandzoomviewport_viewportx, tvb, offset, 2, ENC_LITTLE_ENDIAN, &viewport_x);
3269                 offset += 2;
3270 
3271                 proto_tree_add_item_ret_int(tree,
3272                     hf_isobus_vt_graphicscontext_panandzoomviewport_viewporty, tvb, offset, 2, ENC_LITTLE_ENDIAN, &viewport_y);
3273                 offset += 2;
3274 
3275                 zoom_value = tvb_get_ieee_float(tvb, offset, ENC_LITTLE_ENDIAN);
3276                 proto_tree_add_item(tree,
3277                     hf_isobus_vt_graphicscontext_panandzoomviewport_zoomvalue, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3278 
3279                 col_append_fstr(pinfo->cinfo, COL_INFO, "Pan viewport by [%d;%d] pixels and zoom by %g",
3280                     viewport_x, viewport_y, zoom_value);
3281             }
3282                 break;
3283             case CHANGE_VIEWPORT_SIZE:
3284             {
3285                 guint32 new_width, new_height;
3286 
3287                 proto_tree_add_item_ret_uint(tree,
3288                     hf_isobus_vt_graphicscontext_changeviewportsize_newwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_width);
3289                 offset += 2;
3290 
3291                 proto_tree_add_item_ret_uint(tree,
3292                     hf_isobus_vt_graphicscontext_changeviewportsize_newheight, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_height);
3293 
3294                 col_append_fstr(pinfo->cinfo, COL_INFO, "Change viewport size to [%ux%u]",
3295                     new_width, new_height);
3296             }
3297                 break;
3298             case DRAW_VT_OBJECT:
3299             {
3300                 guint32 draw_object_id;
3301 
3302                 proto_tree_add_item_ret_uint(tree,
3303                     hf_isobus_vt_graphicscontext_drawvtobject_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &draw_object_id);
3304                 ti = proto_tree_add_item(tree,
3305                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3306                 proto_item_set_hidden(ti);
3307 
3308                 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw VT %s at graphics cursor",
3309                     get_object_id_string(draw_object_id));
3310             }
3311                 break;
3312             case COPY_CANVAS_TO_PICTURE_GRAPHIC:
3313             {
3314                 guint32 object_id_picture_graphic;
3315 
3316                 proto_tree_add_item_ret_uint(tree,
3317                     hf_isobus_vt_graphicscontext_copycanvastopicturegraphic_objectidpicturegraphic, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id_picture_graphic);
3318                 ti = proto_tree_add_item(tree,
3319                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3320                 proto_item_set_hidden(ti);
3321 
3322                 col_append_fstr(pinfo->cinfo, COL_INFO, "Copy canvas to picture graphics %s",
3323                     get_object_id_string(object_id_picture_graphic));
3324             }
3325                 break;
3326             case COPY_VIEWPORT_TO_PICTURE_GRAPHIC:
3327             {
3328                 guint32 object_id_picture_graphic;
3329 
3330                 proto_tree_add_item_ret_uint(tree,
3331                     hf_isobus_vt_graphicscontext_copyviewporttopicturegraphic_objectidpicturegraphic, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id_picture_graphic);
3332                 ti = proto_tree_add_item(tree,
3333                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3334                 proto_item_set_hidden(ti);
3335 
3336                 col_append_fstr(pinfo->cinfo, COL_INFO, "Copy viewport to picture graphics %s",
3337                     get_object_id_string(object_id_picture_graphic));
3338             }
3339                 break;
3340         }
3341     }
3342         break;
3343     case VT_GET_ATTRIBUTE_VALUE:
3344     {
3345         gboolean error_frame;
3346         guint32 attribute_id, object_id;
3347 
3348         object_id = tvb_get_letohs(tvb, offset);
3349         if(direction == ecu_to_vt || object_id != 0xFFFF)
3350         {
3351             error_frame = FALSE;
3352             proto_tree_add_item(tree,
3353                 hf_isobus_vt_getattributevalue_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3354             ti = proto_tree_add_item(tree,
3355                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3356             proto_item_set_hidden(ti);
3357         }
3358         else
3359         {
3360             error_frame = TRUE;
3361         }
3362         offset += 2;
3363 
3364         proto_tree_add_item_ret_uint(tree,
3365             hf_isobus_vt_getattributevalue_attributeid, tvb, offset, 1, ENC_LITTLE_ENDIAN, &attribute_id);
3366         offset += 1;
3367 
3368         if(direction == vt_to_ecu)
3369         {
3370             if(error_frame == FALSE)
3371             {
3372                 guint32 value;
3373                 proto_tree_add_item_ret_uint(tree,
3374                     hf_isobus_vt_getattributevalue_value, tvb, offset, 4, ENC_LITTLE_ENDIAN, &value);
3375 
3376                 col_append_fstr(pinfo->cinfo, COL_INFO, "Return value of attribute %u from %s, value is 0x%X ",
3377                     attribute_id, get_object_id_string(object_id), value);
3378             }
3379             else
3380             {
3381                 guint32 error_codes;
3382 
3383                 proto_tree_add_item_ret_uint(tree,
3384                     hf_isobus_vt_getattributevalue_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
3385                 ti = proto_tree_add_item(tree,
3386                     hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3387                 proto_item_set_hidden(ti);
3388                 offset += 2;
3389 
3390                 ti = proto_tree_add_item_ret_uint(tree,
3391                     hf_isobus_vt_getattributevalue_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3392                 proto_item_append_text(ti, ": ");
3393                 if (error_codes & 0x01)
3394                     proto_item_append_text(ti, "Invalid Object ID ");
3395                 if (error_codes & 0x02)
3396                     proto_item_append_text(ti, "Invalid Attribute ID ");
3397                 if (error_codes & 0x10)
3398                     proto_item_append_text(ti, "Any other error ");
3399 
3400                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while requesting value of attribute %u from %s ",
3401                     attribute_id, get_object_id_string(object_id));
3402             }
3403         }
3404         else
3405         {
3406             col_append_fstr(pinfo->cinfo, COL_INFO, "Get value of attribute %u from %s ",
3407                 attribute_id, get_object_id_string(object_id));
3408         }
3409     }
3410         break;
3411     case VT_SELECT_COLOUR_MAP:
3412     {
3413         guint32 error_codes, object_id;
3414 
3415         proto_tree_add_item_ret_uint(tree,
3416             hf_isobus_vt_selectcolourmap_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
3417         ti = proto_tree_add_item(tree,
3418             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3419         proto_item_set_hidden(ti);
3420         offset += 2;
3421 
3422         if(direction == vt_to_ecu)
3423         {
3424             ti = proto_tree_add_item_ret_uint(tree,
3425                 hf_isobus_vt_selectcolourmap_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3426             proto_item_append_text(ti, ": ");
3427             if (error_codes & 0x01)
3428                 proto_item_append_text(ti, "Invalid Object ID ");
3429             if (error_codes & 0x02)
3430                 proto_item_append_text(ti, "Invalid Colour Map ");
3431             if (error_codes & 0x04)
3432                 proto_item_append_text(ti, "Any other error ");
3433         }
3434 
3435         if(direction == ecu_to_vt)
3436         {
3437             col_append_fstr(pinfo->cinfo, COL_INFO, "Select colour map %s ",
3438                 get_object_id_string(object_id));
3439         }
3440         else if(direction == vt_to_ecu)
3441         {
3442             if(error_codes)
3443             {
3444                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while selecting colour map %s ",
3445                     get_object_id_string(object_id));
3446             }
3447             else
3448             {
3449                 col_append_fstr(pinfo->cinfo, COL_INFO, "Colour map %s successfully selected ",
3450                     get_object_id_string(object_id));
3451             }
3452         }
3453     }
3454         break;
3455     case VT_IDENTIFY_VT:
3456     {
3457         if(direction == ecu_to_vt)
3458         {
3459             col_append_fstr(pinfo->cinfo, COL_INFO, "Identify VT");
3460         }
3461         else
3462         {
3463             col_append_fstr(pinfo->cinfo, COL_INFO, "Reply Identify VT ");
3464         }
3465     }
3466         break;
3467     case VT_EXECUTE_EXTENDED_MACRO:
3468     {
3469         guint32 error_codes, object_id;
3470 
3471         proto_tree_add_item_ret_uint(tree,
3472             hf_isobus_vt_executeextendedmacro_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
3473         ti = proto_tree_add_item(tree,
3474             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3475         proto_item_set_hidden(ti);
3476         offset += 2;
3477 
3478         if(direction == vt_to_ecu)
3479         {
3480             ti = proto_tree_add_item_ret_uint(tree,
3481                 hf_isobus_vt_executeextendedmacro_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3482             proto_item_append_text(ti, ": ");
3483             if (error_codes & 0x01)
3484                 proto_item_append_text(ti, "Object ID does not exist ");
3485             if (error_codes & 0x02)
3486                 proto_item_append_text(ti, "Object ID is not a Macro object ");
3487             if (error_codes & 0x04)
3488                 proto_item_append_text(ti, "Any other error ");
3489         }
3490 
3491         if(direction == ecu_to_vt)
3492         {
3493             col_append_fstr(pinfo->cinfo, COL_INFO, "Execute extended macro %s ",
3494                 get_object_id_string(object_id));
3495         }
3496         else if(direction == vt_to_ecu)
3497         {
3498             if(error_codes)
3499             {
3500                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while executing extended macro %s ",
3501                     get_object_id_string(object_id));
3502             }
3503             else
3504             {
3505                 col_append_fstr(pinfo->cinfo, COL_INFO, "Extended macro %s successfully executed ",
3506                     get_object_id_string(object_id));
3507             }
3508         }
3509     }
3510         break;
3511     case VT_LOCK_UNLOCK_MASK:
3512     {
3513         guint32 command, error_codes, object_id, lock_timeout;
3514 
3515         proto_tree_add_item_ret_uint(tree,
3516             hf_isobus_vt_lockunlockmask_command, tvb, offset, 1, ENC_LITTLE_ENDIAN, &command);
3517         offset += 1;
3518 
3519         if(direction == ecu_to_vt)
3520         {
3521             proto_tree_add_item_ret_uint(tree,
3522                 hf_isobus_vt_lockunlockmask_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id);
3523             ti = proto_tree_add_item(tree,
3524                 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3525             proto_item_set_hidden(ti);
3526             offset += 2;
3527 
3528             if(command == MASK_LOCK)
3529             {
3530                 proto_tree_add_item_ret_uint(tree,
3531                     hf_isobus_vt_lockunlockmask_locktimeout, tvb, offset, 2, ENC_LITTLE_ENDIAN, &lock_timeout);
3532             }
3533         }
3534         else
3535         {
3536             ti = proto_tree_add_item_ret_uint(tree,
3537                 hf_isobus_vt_lockunlockmask_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3538             proto_item_append_text(ti, ": ");
3539             if (error_codes & 0x01)
3540                 proto_item_append_text(ti, "Command ignored, no mask is visible or given Object ID does not match the visible mask ");
3541             if (error_codes & 0x02)
3542                 proto_item_append_text(ti, "Lock command ignored, already locked ");
3543             if (error_codes & 0x04)
3544                 proto_item_append_text(ti, "Unlock command ignored, not locked ");
3545             if (error_codes & 0x08)
3546                 proto_item_append_text(ti, "Lock command ignored, an Alarm Mask is active ");
3547             if (error_codes & 0x10)
3548                 proto_item_append_text(ti, "Unsolicited unlock, timeout occurred ");
3549             if (error_codes & 0x20)
3550                 proto_item_append_text(ti, "Unsolicited unlock, this mask is hidden ");
3551             if (error_codes & 0x40)
3552                 proto_item_append_text(ti, "Unsolicited unlock, operator induced, or any other error ");
3553             if (error_codes & 0x80)
3554                 proto_item_append_text(ti, "Any other error ");
3555         }
3556 
3557         if(direction == ecu_to_vt)
3558         {
3559             if(command == MASK_LOCK)
3560             {
3561                 col_append_fstr(pinfo->cinfo, COL_INFO, "Lock data mask %s for %ums ",
3562                     get_object_id_string(object_id), lock_timeout);
3563             }
3564             else if(command == MASK_UNLOCK)
3565             {
3566                 col_append_fstr(pinfo->cinfo, COL_INFO, "Unlock data mask %s ",
3567                     get_object_id_string(object_id));
3568             }
3569         }
3570         else if(direction == vt_to_ecu)
3571         {
3572             if(error_codes)
3573             {
3574                 if(command == MASK_LOCK)
3575                 {
3576                     col_append_fstr(pinfo->cinfo, COL_INFO, "Error while locking ");
3577                 }
3578                 else if(command == MASK_UNLOCK)
3579                 {
3580                     col_append_fstr(pinfo->cinfo, COL_INFO, "Error while unlocking ");
3581                 }
3582             }
3583             else
3584             {
3585                 if(command == MASK_LOCK)
3586                 {
3587                     col_append_fstr(pinfo->cinfo, COL_INFO, "Locking successful ");
3588                 }
3589                 else if(command == MASK_UNLOCK)
3590                 {
3591                     col_append_fstr(pinfo->cinfo, COL_INFO, "Unlocking successful ");
3592                 }
3593             }
3594         }
3595     }
3596         break;
3597     case VT_EXECUTE_MACRO:
3598     {
3599         guint32 object_id;
3600         guint32 error_codes;
3601 
3602         /* Other than all object IDs macro object IDs are 1 byte in VT 4 */
3603         proto_tree_add_item_ret_uint(tree,
3604             hf_isobus_vt_executemacro_objectid, tvb, offset, 1, ENC_LITTLE_ENDIAN, &object_id);
3605         ti = proto_tree_add_item(tree,
3606             hf_isobus_vt_objectid, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3607         proto_item_set_hidden(ti);
3608         offset += 1;
3609 
3610         if(direction == vt_to_ecu)
3611         {
3612             ti = proto_tree_add_item_ret_uint(tree,
3613                 hf_isobus_vt_executemacro_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3614             proto_item_append_text(ti, ": ");
3615             if (error_codes & 0x01)
3616                 proto_item_append_text(ti, "Object ID does not exist ");
3617             if (error_codes & 0x02)
3618                 proto_item_append_text(ti, "Object ID is not a Macro object ");
3619             if (error_codes & 0x04)
3620                 proto_item_append_text(ti, "Any other error ");
3621         }
3622 
3623         if(direction == ecu_to_vt)
3624         {
3625             col_append_fstr(pinfo->cinfo, COL_INFO, "Execute macro %s ",
3626                 get_object_id_string(object_id));
3627         }
3628         else if(direction == vt_to_ecu)
3629         {
3630             if(error_codes)
3631             {
3632                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while executing macro %s ",
3633                     get_object_id_string(object_id));
3634             }
3635             else
3636             {
3637                 col_append_fstr(pinfo->cinfo, COL_INFO, "Macro %s successfully executed ",
3638                     get_object_id_string(object_id));
3639             }
3640         }
3641     }
3642         break;
3643     case VT_GET_MEMORY:
3644     {
3645         if(direction == ecu_to_vt)
3646         {
3647             guint32 memory_required;
3648             offset += 1; /* reserved byte */
3649 
3650             proto_tree_add_item_ret_uint(tree,
3651                 hf_isobus_vt_getmemory_memoryrequired, tvb, offset, 4, ENC_LITTLE_ENDIAN, &memory_required);
3652 
3653             col_append_fstr(pinfo->cinfo, COL_INFO, "The amount of memory required is %u ",
3654                 memory_required);
3655         }
3656         else
3657         {
3658             guint32 vt_version, status;
3659 
3660             proto_tree_add_item_ret_uint(tree,
3661                 hf_isobus_vt_getmemory_vtversion, tvb, offset, 1, ENC_LITTLE_ENDIAN, &vt_version);
3662             offset += 1;
3663 
3664             proto_tree_add_item_ret_uint(tree,
3665                 hf_isobus_vt_getmemory_status, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status);
3666 
3667             if(status == ENOUGH_MEMORY)
3668             {
3669                 col_append_fstr(pinfo->cinfo, COL_INFO, "There can be enough memory, VT Version is %u ",
3670                     vt_version);
3671             }
3672             else
3673             {
3674                 col_append_fstr(pinfo->cinfo, COL_INFO, "There is not enough memory available, VT Version is %u ",
3675                     vt_version);
3676             }
3677         }
3678     }
3679         break;
3680     case VT_GET_SUPPORTED_WIDECHARS:
3681     {
3682         guint32 code_plane, first_widechar, last_widechar;
3683 
3684         proto_tree_add_item_ret_uint(tree,
3685             hf_isobus_vt_getsupportedwidechars_codeplane, tvb, offset, 1, ENC_LITTLE_ENDIAN, &code_plane);
3686         offset += 1;
3687 
3688         proto_tree_add_item_ret_uint(tree,
3689             hf_isobus_vt_getsupportedwidechars_firstwidechar, tvb, offset, 2, ENC_LITTLE_ENDIAN, &first_widechar);
3690         offset += 2;
3691 
3692         proto_tree_add_item_ret_uint(tree,
3693             hf_isobus_vt_getsupportedwidechars_lastwidechar, tvb, offset, 2, ENC_LITTLE_ENDIAN, &last_widechar);
3694         offset += 2;
3695 
3696         if(direction == vt_to_ecu)
3697         {
3698             guint32 error_codes, number_of_ranges, i;
3699 
3700             ti = proto_tree_add_item_ret_uint(tree,
3701                 hf_isobus_vt_getsupportedwidechars_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3702             proto_item_append_text(ti, ": ");
3703             if (error_codes & 0x01)
3704                 proto_item_append_text(ti, "Too many ranges ");
3705             if (error_codes & 0x02)
3706                 proto_item_append_text(ti, "Error in Code plane ");
3707             if (error_codes & 0x10)
3708                 proto_item_append_text(ti, "Any other error ");
3709             offset += 1;
3710 
3711             proto_tree_add_item_ret_uint(tree,
3712                 hf_isobus_vt_getsupportedwidechars_numberofranges, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_ranges);
3713             offset += 1;
3714 
3715             for(i = 0; i < number_of_ranges; i++)
3716             {
3717                 guint32 first_avail_widechar, last_avail_widechar;
3718                 proto_tree* subtree;
3719                 proto_item* item;
3720 
3721                 subtree = proto_tree_add_subtree_format(tree,
3722                     tvb, offset, 4, ett_isobus_vt_getsupportedwidechars_range, &item, "Range");
3723 
3724                 proto_tree_add_item_ret_uint(subtree,
3725                     hf_isobus_vt_getsupportedwidechars_firstavailablewidechar, tvb, offset, 2, ENC_LITTLE_ENDIAN, &first_avail_widechar);
3726                 offset += 2;
3727 
3728                 proto_tree_add_item_ret_uint(subtree,
3729                     hf_isobus_vt_getsupportedwidechars_lastavailablewidechar, tvb, offset, 2, ENC_LITTLE_ENDIAN, &last_avail_widechar);
3730                 offset += 2;
3731 
3732                 proto_item_set_text(item, "Range 0x%04X - 0x%04X", first_avail_widechar, last_avail_widechar);
3733             }
3734 
3735             if(error_codes)
3736             {
3737                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while getting supported widechars for code plane %u ",
3738                     code_plane);
3739             }
3740             else
3741             {
3742                 col_append_fstr(pinfo->cinfo, COL_INFO, "Received supported widechars for code plane %u in %u range",
3743                     code_plane, number_of_ranges);
3744 
3745                 if(number_of_ranges > 1)
3746                 {
3747                     col_append_fstr(pinfo->cinfo, COL_INFO, "s");
3748                 }
3749             }
3750         }
3751         else if(direction == ecu_to_vt)
3752         {
3753             col_append_fstr(pinfo->cinfo, COL_INFO, "Requesting supported widechars for code plane %u from character 0x%04X till 0x%04X ",
3754                     code_plane, first_widechar, last_widechar);
3755         }
3756     }
3757         break;
3758     case VT_GET_NUMBER_OF_SOFT_KEYS:
3759     {
3760         if(direction == ecu_to_vt)
3761         {
3762             col_append_fstr(pinfo->cinfo, COL_INFO, "Requesting number of soft keys");
3763         }
3764         else
3765         {
3766             guint32 navigation_soft_keys, virtual_soft_keys, physical_soft_keys;
3767 
3768             proto_tree_add_item_ret_uint(tree,
3769                 hf_isobus_vt_getnumberofsoftkeys_navigationsoftkeys, tvb, offset, 1, ENC_LITTLE_ENDIAN, &navigation_soft_keys);
3770             offset += 1;
3771 
3772             offset += 2; /* 2 reserved bytes */
3773 
3774             proto_tree_add_item(tree,
3775                 hf_isobus_vt_getnumberofsoftkeys_xdots, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3776             offset += 1;
3777 
3778             proto_tree_add_item(tree,
3779                 hf_isobus_vt_getnumberofsoftkeys_ydots, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3780             offset += 1;
3781 
3782             proto_tree_add_item_ret_uint(tree,
3783                 hf_isobus_vt_getnumberofsoftkeys_virtualsoftkeys, tvb, offset, 1, ENC_LITTLE_ENDIAN, &virtual_soft_keys);
3784             offset += 1;
3785 
3786             proto_tree_add_item_ret_uint(tree,
3787                 hf_isobus_vt_getnumberofsoftkeys_physicalsoftkeys, tvb, offset, 1, ENC_LITTLE_ENDIAN, &physical_soft_keys);
3788 
3789             col_append_fstr(pinfo->cinfo, COL_INFO, "VT has %u softkeys, %u virtual soft keys and %u physical soft keys",
3790                 navigation_soft_keys, virtual_soft_keys, physical_soft_keys);
3791         }
3792     }
3793         break;
3794     case VT_GET_TEXT_FONT_DATA:
3795     {
3796         if(direction == ecu_to_vt)
3797         {
3798             col_append_fstr(pinfo->cinfo, COL_INFO, "Requesting text font data");
3799         }
3800         else if(direction == vt_to_ecu)
3801         {
3802             proto_tree *ti_smallfonts_subtree, *ti_largefonts_subtree, *ti_typeattribute_subtree;
3803             proto_item *smallfonts_item, *largefonts_item, *typeattributes_item;
3804 
3805             offset += 4;
3806 
3807             smallfonts_item = proto_tree_add_item(tree,
3808                 hf_isobus_vt_gettextfontdata_smallfontsizes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3809             ti_smallfonts_subtree = proto_item_add_subtree(smallfonts_item, ett_isobus_vt_gettextfontdata_smallfontsizes);
3810             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font8x8, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3811             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font8x12, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3812             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font12x16, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3813             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font16x16, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3814             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font16x24, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3815             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font24x32, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3816             proto_tree_add_item(ti_smallfonts_subtree, hf_isobus_vt_gettextfontdata_smallfontsizes_font32x32, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3817             offset += 1;
3818 
3819             largefonts_item = proto_tree_add_item(tree,
3820                 hf_isobus_vt_gettextfontdata_largefontsizes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3821             ti_largefonts_subtree = proto_item_add_subtree(largefonts_item, ett_isobus_vt_gettextfontdata_largefontsizes);
3822             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font32x48, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3823             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font48x64, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3824             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font64x64, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3825             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font64x96, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3826             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font96x128, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3827             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font128x128, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3828             proto_tree_add_item(ti_largefonts_subtree, hf_isobus_vt_gettextfontdata_largefontsizes_font128x192, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3829             offset += 1;
3830 
3831             typeattributes_item = proto_tree_add_item(tree,
3832                 hf_isobus_vt_gettextfontdata_typeattributes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3833             ti_typeattribute_subtree = proto_item_add_subtree(typeattributes_item, ett_isobus_vt_gettextfontdata_typeattributes);
3834             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_boldtext, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3835             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_crossedouttext, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3836             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_underlinedtext, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3837             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_italicstext, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3838             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_invertedtext, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3839             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_flashinverted, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3840             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_flashhidden, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3841             proto_tree_add_item(ti_typeattribute_subtree, hf_isobus_vt_gettextfontdata_typeattributes_proportionalfontrendering, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3842 
3843             col_append_fstr(pinfo->cinfo, COL_INFO, "Text font data received");
3844         }
3845     }
3846         break;
3847     case VT_GET_WINDOW_MASK_DATA:
3848     {
3849         if(direction == ecu_to_vt)
3850         {
3851             col_append_fstr(pinfo->cinfo, COL_INFO, "Request window mask data");
3852         }
3853         else
3854         {
3855             guint32 background_colour_data_mask, background_colour_soft_key_mask;
3856 
3857             proto_tree_add_item_ret_uint(tree,
3858                 hf_isobus_vt_getwindowmaskdata_backgroundcolourdatamask, tvb, offset, 1, ENC_LITTLE_ENDIAN, &background_colour_data_mask);
3859             offset += 1;
3860 
3861             proto_tree_add_item_ret_uint(tree,
3862                 hf_isobus_vt_getwindowmaskdata_backgroundcoloursoftkeymask, tvb, offset, 1, ENC_LITTLE_ENDIAN, &background_colour_soft_key_mask);
3863 
3864             col_append_fstr(pinfo->cinfo, COL_INFO, "Background colour of data mask is %s, soft key mask is %s",
3865                 rval_to_str(background_colour_data_mask, vt_colours, "Unknown"),
3866                 rval_to_str(background_colour_soft_key_mask, vt_colours, "Unknown"));
3867         }
3868     }
3869         break;
3870     case VT_GET_SUPPORTED_OBJECTS:
3871     {
3872         if(direction == ecu_to_vt)
3873         {
3874             col_append_fstr(pinfo->cinfo, COL_INFO, "Request supported objects");
3875         }
3876         else
3877         {
3878             guint32 number_of_bytes, i;
3879 
3880             proto_tree_add_item_ret_uint(tree,
3881                 hf_isobus_vt_getsupportedobjects_numberofbytes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_bytes);
3882             offset += 1;
3883 
3884             for(i = 0; i < number_of_bytes; i++)
3885             {
3886                 guint8 object_type;
3887 
3888                 object_type = tvb_get_guint8(tvb, offset);
3889                 if(object_type == 0xFF)
3890                 {
3891                     break;
3892                 }
3893 
3894                 proto_tree_add_item(tree,
3895                     hf_isobus_vt_getsupportedobjects_objecttype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3896                 offset += 1;
3897             }
3898 
3899             col_append_fstr(pinfo->cinfo, COL_INFO, "Supported objects received");
3900         }
3901     }
3902         break;
3903     case VT_GET_HARDWARE:
3904     {
3905         if(direction == ecu_to_vt)
3906         {
3907             col_append_fstr(pinfo->cinfo, COL_INFO, "Request hardware info");
3908         }
3909         else
3910         {
3911             guint32 graphic_type, x_pixels, y_pixels;
3912             proto_item *hardware_item;
3913             proto_tree *hardware_subtree;
3914 
3915             proto_tree_add_item(tree,
3916                 hf_isobus_vt_gethardware_boottime, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3917             offset += 1;
3918 
3919             proto_tree_add_item_ret_uint(tree,
3920                 hf_isobus_vt_gethardware_graphictype, tvb, offset, 1, ENC_LITTLE_ENDIAN, &graphic_type);
3921             offset += 1;
3922 
3923             hardware_item = proto_tree_add_item(tree,
3924                 hf_isobus_vt_gethardware_hardware, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3925 
3926             hardware_subtree = proto_item_add_subtree(hardware_item, ett_isobus_vt_gethardware_hardware);
3927             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_touchscreen, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3928             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_pointingdevice, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3929             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_multifreqaudiooutput, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3930             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_adjustvolumeaudiooutput, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3931             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_simultaneousactivationphysicalsoftkeys, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3932             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_simultaneousactivationbuttons, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3933             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_dragoperation, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3934             proto_tree_add_item(hardware_subtree, hf_isobus_vt_gethardware_hardware_intermediatecoordinatesdrag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3935             offset += 1;
3936 
3937             proto_tree_add_item_ret_uint(tree,
3938                 hf_isobus_vt_gethardware_xpixels, tvb, offset, 2, ENC_LITTLE_ENDIAN, &x_pixels);
3939             offset += 2;
3940 
3941             proto_tree_add_item_ret_uint(tree,
3942                 hf_isobus_vt_gethardware_ypixels, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_pixels);
3943 
3944             col_append_fstr(pinfo->cinfo, COL_INFO, "Hardware info received. Graphic type is %s, screen is %u by %u pixels",
3945                 val_to_str(graphic_type, graphic_types, "unknown"), x_pixels, y_pixels);
3946         }
3947     }
3948         break;
3949     case VT_STORE_VERSION:
3950     {
3951         if(direction == ecu_to_vt)
3952         {
3953             const guint8 *version_label;
3954 
3955             proto_tree_add_item_ret_string(tree,
3956                 hf_isobus_vt_storeversion_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
3957 
3958             col_append_fstr(pinfo->cinfo, COL_INFO, "Store version under label %s", version_label);
3959         }
3960         else
3961         {
3962             guint32 error_codes;
3963             offset += 4;
3964 
3965             ti = proto_tree_add_item_ret_uint(tree,
3966                 hf_isobus_vt_storeversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3967             proto_item_append_text(ti, ": ");
3968             if (error_codes & 0x02)
3969                 proto_item_append_text(ti, "Version label is not correct ");
3970             if (error_codes & 0x04)
3971                 proto_item_append_text(ti, "Insufficient memory available ");
3972             if (error_codes & 0x08)
3973                 proto_item_append_text(ti, "Any other error ");
3974 
3975             if(error_codes)
3976             {
3977                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while storing version");
3978             }
3979             else
3980             {
3981                 col_append_fstr(pinfo->cinfo, COL_INFO, "Version successfully stored");
3982             }
3983         }
3984     }
3985         break;
3986     case VT_LOAD_VERSION:
3987     {
3988         if(direction == ecu_to_vt)
3989         {
3990             const guint8* version_label;
3991 
3992             proto_tree_add_item_ret_string(tree,
3993                 hf_isobus_vt_loadversion_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
3994 
3995             col_append_fstr(pinfo->cinfo, COL_INFO, "Load version stored under label \"%s\"", version_label);
3996         }
3997         else
3998         {
3999             guint32 error_codes;
4000             offset += 4;
4001 
4002             ti = proto_tree_add_item_ret_uint(tree,
4003                 hf_isobus_vt_loadversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4004             proto_item_append_text(ti, ": ");
4005             if (error_codes & 0x01)
4006                 proto_item_append_text(ti, "File system error or pool data corruption ");
4007             if (error_codes & 0x02)
4008                 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4009             if (error_codes & 0x04)
4010                 proto_item_append_text(ti, "Insufficient memory available ");
4011             if (error_codes & 0x08)
4012                 proto_item_append_text(ti, "Any other error ");
4013 
4014             if(error_codes)
4015             {
4016                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while loading version");
4017             }
4018             else
4019             {
4020                 col_append_fstr(pinfo->cinfo, COL_INFO, "Version successfully loaded");
4021             }
4022         }
4023     }
4024         break;
4025     case VT_DELETE_VERSION:
4026     {
4027         if(direction == ecu_to_vt)
4028         {
4029             const guint8* version_label;
4030 
4031             proto_tree_add_item_ret_string(tree,
4032                 hf_isobus_vt_deleteversion_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4033 
4034             col_append_fstr(pinfo->cinfo, COL_INFO, "Delete version stored under label \"%s\"", version_label);
4035         }
4036         else
4037         {
4038             guint32 error_codes;
4039             offset += 4;
4040 
4041             ti = proto_tree_add_item_ret_uint(tree,
4042                 hf_isobus_vt_deleteversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4043             proto_item_append_text(ti, ": ");
4044             if (error_codes & 0x02)
4045                 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4046             if (error_codes & 0x08)
4047                 proto_item_append_text(ti, "Any other error ");
4048 
4049             if(error_codes)
4050             {
4051                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while deleting version");
4052             }
4053             else
4054             {
4055                 col_append_fstr(pinfo->cinfo, COL_INFO, "Version successfully deleted");
4056             }
4057         }
4058     }
4059         break;
4060     case VT_EXTENDED_GET_VERSIONS:
4061     {
4062         if(direction == ecu_to_vt)
4063         {
4064             col_append_fstr(pinfo->cinfo, COL_INFO, "Request a list of extended versions");
4065         }
4066         else
4067         {
4068             guint32 number_of_versions, i;
4069 
4070             proto_tree_add_item_ret_uint(tree,
4071                 hf_isobus_vt_extendedgetversions_numberofversions, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_versions);
4072             offset += 1;
4073 
4074             for(i = 0; i < number_of_versions; i++)
4075             {
4076                 proto_tree_add_item(tree,
4077                     hf_isobus_vt_extendedgetversions_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA);
4078                 offset += 32;
4079             }
4080 
4081             col_append_fstr(pinfo->cinfo, COL_INFO, "Extended versions received");
4082         }
4083     }
4084         break;
4085     case VT_EXTENDED_STORE_VERSION:
4086     {
4087         if(direction == ecu_to_vt)
4088         {
4089             const guint8* version_label;
4090 
4091             proto_tree_add_item_ret_string(tree,
4092                 hf_isobus_vt_extendedstoreversion_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4093 
4094             col_append_fstr(pinfo->cinfo, COL_INFO, "Store extended version under label \"%s\"", version_label);
4095         }
4096         else
4097         {
4098             guint32 error_codes;
4099             offset += 4;
4100 
4101             ti = proto_tree_add_item_ret_uint(tree,
4102                 hf_isobus_vt_extendedstoreversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4103             proto_item_append_text(ti, ": ");
4104             if (error_codes & 0x02)
4105                 proto_item_append_text(ti, "Version label is not correct ");
4106             if (error_codes & 0x04)
4107                 proto_item_append_text(ti, "Insufficient memory available ");
4108             if (error_codes & 0x08)
4109                 proto_item_append_text(ti, "Any other error ");
4110 
4111             if(error_codes)
4112             {
4113                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while storing extended version");
4114             }
4115             else
4116             {
4117                 col_append_fstr(pinfo->cinfo, COL_INFO, "Extended version successfully stored");
4118             }
4119         }
4120     }
4121         break;
4122     case VT_EXTENDED_LOAD_VERSION:
4123     {
4124         if(direction == ecu_to_vt)
4125         {
4126             const guint8* version_label;
4127 
4128             proto_tree_add_item_ret_string(tree,
4129                 hf_isobus_vt_extendedloadversion_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4130 
4131             col_append_fstr(pinfo->cinfo, COL_INFO, "Store extended version under label \"%s\"", version_label);
4132         }
4133         else
4134         {
4135             guint32 error_codes;
4136             offset += 4;
4137 
4138             ti = proto_tree_add_item_ret_uint(tree,
4139                 hf_isobus_vt_extendedloadversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4140             proto_item_append_text(ti, ": ");
4141             if (error_codes & 0x01)
4142                 proto_item_append_text(ti, "File system error or pool data corruption ");
4143             if (error_codes & 0x02)
4144                 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4145             if (error_codes & 0x04)
4146                 proto_item_append_text(ti, "Insufficient memory available ");
4147             if (error_codes & 0x08)
4148                 proto_item_append_text(ti, "Any other error ");
4149 
4150             if(error_codes)
4151             {
4152                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while loading extended version");
4153             }
4154             else
4155             {
4156                 col_append_fstr(pinfo->cinfo, COL_INFO, "Extended version successfully loaded");
4157             }
4158         }
4159     }
4160         break;
4161     case VT_EXTENDED_DELETE_VERSION:
4162     {
4163         if(direction == ecu_to_vt)
4164         {
4165             const guint8* version_label;
4166 
4167             proto_tree_add_item_ret_string(tree,
4168                 hf_isobus_vt_extendeddeleteversion_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4169 
4170             col_append_fstr(pinfo->cinfo, COL_INFO, "Delete version stored under label %s", version_label);
4171         }
4172         else
4173         {
4174             guint32 error_codes;
4175             offset += 4;
4176 
4177             ti = proto_tree_add_item_ret_uint(tree,
4178                 hf_isobus_vt_extendeddeleteversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4179             proto_item_append_text(ti, ": ");
4180             if (error_codes & 0x02)
4181                 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4182             if (error_codes & 0x08)
4183                 proto_item_append_text(ti, "Any other error ");
4184 
4185             if(error_codes)
4186             {
4187                 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while deleting extended version");
4188             }
4189             else
4190             {
4191                 col_append_fstr(pinfo->cinfo, COL_INFO, "Extended version successfully deleted");
4192             }
4193         }
4194     }
4195         break;
4196     case VT_GET_VERSIONS_MESSAGE:
4197     {
4198         if(direction == ecu_to_vt)
4199         {
4200             col_append_fstr(pinfo->cinfo, COL_INFO, "Extended version successfully deleted");
4201         }
4202         /*no else as this message can only be used from ecu to vt*/
4203     }
4204         break;
4205     case VT_GET_VERSIONS_RESPONSE:
4206     {
4207         if(direction == vt_to_ecu)
4208         {
4209             guint32 number_of_versions, i;
4210 
4211             proto_tree_add_item_ret_uint(tree,
4212                 hf_isobus_vt_getversions_numberofversions, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_versions);
4213             offset += 1;
4214 
4215             for(i = 0; i < number_of_versions; i++)
4216             {
4217                 proto_tree_add_item(tree,
4218                     hf_isobus_vt_getversions_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA);
4219                 offset += 7;
4220             }
4221 
4222             col_append_fstr(pinfo->cinfo, COL_INFO, "Versions received");
4223         }
4224         /*no else as this message can only be used from vt to ecu*/
4225     }
4226         break;
4227     case VT_UNSUPPORTED_VT_FUNCTION:
4228     {
4229         guint32 unsupported_vt_function;
4230 
4231         proto_tree_add_item_ret_uint(tree,
4232             hf_isobus_vt_unsupportedvtfunction_unsupportedvtfunction, tvb, offset, 1, ENC_LITTLE_ENDIAN, &unsupported_vt_function);
4233 
4234         if(direction == ecu_to_vt)
4235         {
4236             col_append_fstr(pinfo->cinfo, COL_INFO, "VT function %s (%u) is not supported by ECU",
4237                 val_to_str_ext(unsupported_vt_function, &vt_function_code_ext, "unknown"), unsupported_vt_function);
4238         }
4239         else
4240         {
4241             col_append_fstr(pinfo->cinfo, COL_INFO, "VT function %s (%u) is not supported by VT",
4242                 val_to_str_ext(unsupported_vt_function, &vt_function_code_ext, "unknown"), unsupported_vt_function);
4243         }
4244     }
4245         break;
4246     case VT_VT_STATUS:
4247     {
4248         proto_tree *ti_busycodes_subtree;
4249         proto_item *busycodes_item;
4250         guint32 working_set_master, object_id_data_mask, object_id_soft_key_mask;
4251 
4252         proto_tree_add_item_ret_uint(tree,
4253             hf_isobus_vt_vtstatus_workingsetmaster, tvb, offset, 1, ENC_LITTLE_ENDIAN, &working_set_master);
4254         offset += 1;
4255 
4256         proto_tree_add_item_ret_uint(tree,
4257             hf_isobus_vt_vtstatus_objectiddatamask, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id_data_mask);
4258         ti = proto_tree_add_item(tree,
4259             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4260         proto_item_set_hidden(ti);
4261         offset += 2;
4262 
4263         proto_tree_add_item_ret_uint(tree,
4264             hf_isobus_vt_vtstatus_objectidsoftkeymask, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id_soft_key_mask);
4265         ti = proto_tree_add_item(tree,
4266             hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4267         proto_item_set_hidden(ti);
4268         offset += 2;
4269 
4270         busycodes_item = proto_tree_add_item(tree,
4271             hf_isobus_vt_vtstatus_vtbusycodes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4272 
4273         ti_busycodes_subtree = proto_item_add_subtree(busycodes_item, ett_isobus_vt_vtstatus_busycodes_subtree);
4274         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_updatingvisiblemask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4275         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_savingdata, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4276         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_executingcommand, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4277         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_executingmacro, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4278         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_parsingobjectpool, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4279         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_auxcontrolsactive, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4280         proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_outofmemory, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4281         offset += 1;
4282 
4283         proto_tree_add_item(tree,
4284             hf_isobus_vt_vtstatus_vtfunctioncodes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4285 
4286         col_append_fstr(pinfo->cinfo, COL_INFO, "Status: Current master is %d data mask is %s soft key mask is %s",
4287         working_set_master, get_object_id_string(object_id_data_mask), get_object_id_string(object_id_soft_key_mask));
4288     }
4289         break;
4290     case VT_WORKING_SET_MAINTENANCE:
4291     {
4292         guint8 bitmask = tvb_get_guint8(tvb, offset);
4293         guint8 version = tvb_get_guint8(tvb, offset + 1);
4294         if(version == 0xFF)
4295         {
4296             version = 2;
4297         }
4298         if(version > 3)
4299         {
4300             proto_tree_add_item(tree,
4301                 hf_isobus_vt_wrksetmain_bitmask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4302         }
4303         offset += 1;
4304 
4305         proto_tree_add_item(tree,
4306             hf_isobus_vt_wrksetmain_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4307 
4308         if(version > 3 && bitmask & 0x80)
4309         {
4310             col_append_fstr(pinfo->cinfo, COL_INFO, "Initiate ");
4311         }
4312         col_append_fstr(pinfo->cinfo, COL_INFO, "Working Set Maintenance, VT version is %d",
4313             version);
4314 
4315         current_vt_version = version;
4316     }
4317         break;
4318     }
4319 	return tvb_captured_length(tvb);
4320 }
4321 
4322 static int
dissect_vt_to_ecu(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)4323 dissect_vt_to_ecu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
4324 {
4325     (void)data;
4326     return dissect_vt(tvb, pinfo, tree, vt_to_ecu);
4327 }
4328 
4329 static int
dissect_ecu_to_vt(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)4330 dissect_ecu_to_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
4331 {
4332     (void)data;
4333     return dissect_vt(tvb, pinfo, tree, ecu_to_vt);
4334 }
4335 
4336 /*
4337  * Simple "get a line" routine, copied from giop dissector who copied it from somewhere :)
4338  *
4339  */
4340 
vt_getline(FILE * fp,gchar * line,int maxlen)4341 static int vt_getline(FILE *fp, gchar *line, int maxlen)
4342 {
4343     if (fgets(line, maxlen, fp) == NULL)
4344     {
4345         return 0;
4346     }
4347     else
4348     {
4349         line[strcspn(line, "\n")] = '\0';
4350         return (int)strlen(line);
4351     }
4352 }
4353 
4354 
read_object_id_file(void)4355 static void read_object_id_file(void)
4356 {
4357     gchar   buf[500];
4358     guint16 item_count = 0;
4359     FILE     *file;
4360 
4361     if ((file = ws_fopen(object_id_translation, "r")) == NULL)
4362     {
4363         object_id_strings[0].value = 0;
4364         object_id_strings[0].strptr = NULL;
4365 
4366         return;
4367     }
4368 
4369     while ((vt_getline(file, buf, 500)) > 0)
4370     {
4371         gchar **split_string = g_strsplit(buf, ",", 2);
4372 
4373         object_id_strings[item_count].value = (guint32)g_ascii_strtoll(split_string[0], NULL, 10);
4374         object_id_strings[item_count].strptr = wmem_strdup(wmem_epan_scope(), split_string[1]);
4375 
4376         g_strfreev(split_string);
4377         item_count++;
4378     }
4379 
4380     fclose(file);
4381 
4382     object_id_strings[item_count].value = 0;
4383     object_id_strings[item_count].strptr = NULL;
4384 }
4385 
isobus_vt_init(void)4386 static void isobus_vt_init(void)
4387 {
4388     read_object_id_file();
4389 }
4390 
4391 /* Register the protocol with Wireshark */
4392 void
proto_register_isobus_vt(void)4393 proto_register_isobus_vt(void)
4394 {
4395     static hf_register_info hf[] = {
4396         { &hf_isobus_vt,
4397           { "VT",                       "isobus.vt",
4398             FT_PROTOCOL, BASE_NONE, NULL, 0x0,
4399             NULL, HFILL }
4400         },
4401         { &hf_isobus_vt_command,
4402           { "Command",                  "isobus.vt.command",
4403             FT_UINT8, BASE_DEC | BASE_EXT_STRING, &vt_function_code_ext, 0x0,
4404             NULL, HFILL }
4405         },
4406         { &hf_isobus_vt_objectid,
4407           { "Object ID",                "isobus.vt.object_id",
4408             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4409             NULL, HFILL }
4410         },
4411         { &hf_isobus_vt_softkey_keyactcode,
4412           { "Activation Code",          "isobus.vt.soft_key.act_code",
4413             FT_UINT8, BASE_DEC, VALS(key_activation_codes), 0x0,
4414             NULL, HFILL }
4415         },
4416         { &hf_isobus_vt_softkey_objectid,
4417           { "Object ID",                "isobus.vt.soft_key.object_id",
4418             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4419             NULL, HFILL }
4420         },
4421         { &hf_isobus_vt_softkey_parentobjectid,
4422           { "Parent Object ID",         "isobus.vt.soft_key.parent_object_id",
4423             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4424             NULL, HFILL }
4425         },
4426         { &hf_isobus_vt_softkey_keynumber,
4427           { "Key Number",               "isobus.vt.soft_key.key_number",
4428             FT_UINT8, BASE_DEC, NULL, 0x0,
4429             NULL, HFILL }
4430         },
4431         { &hf_isobus_vt_button_keyactcode,
4432           { "Activation Code",          "isobus.vt.button.act_code",
4433             FT_UINT8, BASE_DEC, VALS(button_activation_codes), 0x0,
4434             NULL, HFILL }
4435         },
4436         { &hf_isobus_vt_button_objectid,
4437           { "Object ID",                "isobus.vt.button.object_id",
4438             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4439             NULL, HFILL }
4440         },
4441         { &hf_isobus_vt_button_parentobjectid,
4442           { "Parent Object ID",         "isobus.vt.button.parent_object_id",
4443             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4444             NULL, HFILL }
4445         },
4446         { &hf_isobus_vt_button_keynumber,
4447           { "Key Number",               "isobus.vt.button.key_number",
4448             FT_UINT8, BASE_DEC, NULL, 0x0,
4449             NULL, HFILL }
4450         },
4451         { &hf_isobus_vt_pointing_xposition,
4452           { "X Position",               "isobus.vt.pointing_event.x_position",
4453             FT_UINT16, BASE_DEC, NULL, 0x0,
4454             NULL, HFILL }
4455         },
4456         { &hf_isobus_vt_pointing_yposition,
4457           { "Y Position",               "isobus.vt.pointing_event.y_position",
4458             FT_UINT16, BASE_DEC, NULL, 0x0,
4459             NULL, HFILL }
4460         },
4461         { &hf_isobus_vt_pointing_touchstate,
4462           { "Touch State",              "isobus.vt.pointing_event.touch_state",
4463             FT_UINT8, BASE_DEC, VALS(pointing_touch_state), 0x0,
4464             NULL, HFILL }
4465         },
4466         { &hf_isobus_vt_vtselectinputobject_objectid,
4467           { "Object ID",                "isobus.vt.vt_select_input_object.object_id",
4468             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4469             NULL, HFILL }
4470         },
4471         { &hf_isobus_vt_vtselectinputobject_selection,
4472           { "Selection",                "isobus.vt.vt_select_input_object.selection",
4473             FT_UINT8, BASE_DEC, VALS(selection), 0x0,
4474             NULL, HFILL }
4475         },
4476         { &hf_isobus_vt_vtselectinputobject_openforinput,
4477           { "Bitmask",                  "isobus.vt.vt_select_input_object.open_for_input",
4478             FT_UINT8, BASE_DEC, NULL, 0x80,
4479             NULL, HFILL }
4480         },
4481         { &hf_isobus_vt_vtescmessage_objectid,
4482           { "Object ID",                "isobus.vt.vt_esc_message.object_id",
4483             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4484             NULL, HFILL }
4485         },
4486         { &hf_isobus_vt_vtescmessage_errorcodes,
4487           { "Error Codes",              "isobus.vt.vt_esc_message.error_codes",
4488             FT_UINT8, BASE_DEC, NULL, 0x0,
4489             NULL, HFILL }
4490         },
4491         { &hf_isobus_vt_vtchgnumval_objectid,
4492           { "Object ID",                "isobus.vt.vt_chg_num_val.object_id",
4493             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4494             NULL, HFILL }
4495         },
4496         { &hf_isobus_vt_vtchgnumval_value,
4497           { "Value",                    "isobus.vt.vt_chg_num_val.val",
4498             FT_UINT32, BASE_DEC, NULL, 0x0,
4499             NULL, HFILL }
4500         },
4501         { &hf_isobus_vt_vtchgactivemask_maskobjectid,
4502           { "Mask Object ID",           "isobus.vt.vt_chg_active_mask.mask_object_id",
4503             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4504             NULL, HFILL }
4505         },
4506         { &hf_isobus_vt_vtchgactivemask_errorcodes,
4507           { "Error Codes",                "isobus.vt.vt_chg_active_mask.error_codes",
4508             FT_UINT8, BASE_HEX, NULL, 0x0,
4509             NULL, HFILL }
4510         },
4511         { &hf_isobus_vt_vtchgactivemask_errorobjectid,
4512           { "Error Object ID",          "isobus.vt.vt_chg_active_mask.error_object_id",
4513             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4514             NULL, HFILL }
4515         },
4516         { &hf_isobus_vt_vtchgactivemask_errorobjectidparent,
4517           { "Error Object ID Parent",   "isobus.vt.vt_chg_active_mask.error_object_id_parent",
4518             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4519             NULL, HFILL }
4520         },
4521         { &hf_isobus_vt_vtchgstrval_objectid,
4522           { "Object ID",                "isobus.vt.vt_chg_str_val.object_id",
4523             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4524             NULL, HFILL }
4525         },
4526         { &hf_isobus_vt_vtchgstrval_length,
4527           { "Length",                   "isobus.vt.vt_chg_str_val.length",
4528             FT_UINT8, BASE_DEC, NULL, 0x0,
4529             NULL, HFILL }
4530         },
4531         { &hf_isobus_vt_vtchgstrval_value,
4532           { "Value",                    "isobus.vt.vt_chg_str_val.val",
4533             FT_STRING, STR_UNICODE, NULL, 0x0,
4534             NULL, HFILL }
4535         },
4536         { &hf_isobus_vt_vtonuserlayouthideshow_objectid_1,
4537           { "Object ID 1",                 "isobus.vt.vt_on_user_layout_hide_show.object_id_1",
4538             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4539             NULL, HFILL }
4540         },
4541         { &hf_isobus_vt_vtonuserlayouthideshow_status_1,
4542           { "Status 1",                    "isobus.vt.vt_on_user_layout_hide_show.status_1",
4543             FT_UINT8, BASE_DEC, NULL, 0x0,
4544             NULL, HFILL }
4545         },
4546         { &hf_isobus_vt_vtonuserlayouthideshow_objectid_2,
4547           { "Object ID 2",                 "isobus.vt.vt_on_user_layout_hide_show.object_id_2",
4548             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4549             NULL, HFILL }
4550         },
4551         { &hf_isobus_vt_vtonuserlayouthideshow_status_2,
4552           { "Status 2",                    "isobus.vt.vt_on_user_layout_hide_show.status_2",
4553             FT_UINT8, BASE_DEC, NULL, 0x0,
4554             NULL, HFILL }
4555         },
4556         { &hf_isobus_vt_vtcontrolaudiosignaltermination_terminationcause,
4557           { "Termination Cause",           "isobus.vt.vt_control_audio_signal_termination.termination_cause",
4558             FT_UINT8, BASE_HEX, NULL, 0x0,
4559             NULL, HFILL }
4560         },
4561         { &hf_isobus_vt_endofobjectpool_errorcodes,
4562           { "Error Codes",                 "isobus.vt.end_of_object_pool.error_codes",
4563             FT_UINT8, BASE_HEX, NULL, 0x0,
4564             NULL, HFILL }
4565         },
4566         { &hf_isobus_vt_endofobjectpool_faultyparentobjectid,
4567           { "Faulty Parent Object ID",     "isobus.vt.end_of_object_pool.faulty_parent_object_id",
4568             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4569             NULL, HFILL }
4570         },
4571         { &hf_isobus_vt_endofobjectpool_faultyobjectid,
4572           { "Faulty Object ID",            "isobus.vt.end_of_object_pool.faulty_object_id",
4573             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4574             NULL, HFILL }
4575         },
4576         { &hf_isobus_vt_endofobjectpool_objectpoolerrorcodes,
4577           { "Object Pool Error Codes",     "isobus.vt.end_of_object_pool.object_pool_error_codes",
4578             FT_UINT8, BASE_HEX, NULL, 0x0,
4579             NULL, HFILL }
4580         },
4581         { &hf_isobus_vt_auxiliaryassignmenttype1_sourceaddressauxinputdevice,
4582           { "Source Address Auxiliary Input Device", "isobus.vt.auxiliary_assignment_type_1.source_address_aux_input_device",
4583             FT_UINT8, BASE_DEC, NULL, 0x0,
4584             NULL, HFILL }
4585         },
4586         { &hf_isobus_vt_auxiliaryassignmenttype1_auxinputnumber,
4587           { "Auxiliary Input Number",   "isobus.vt.auxiliary_assignment_type_1.aux_input_number",
4588             FT_UINT8, BASE_DEC, NULL, 0x0,
4589             NULL, HFILL }
4590         },
4591         { &hf_isobus_vt_auxiliaryassignmenttype1_objectidauxinputdevice,
4592           { "Object ID of Auxiliary Function",                "isobus.vt.auxiliary_assignment_type_1.object_id_of_auxiliary_function",
4593             FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
4594             NULL, HFILL }
4595         },
4596         { &hf_isobus_vt_auxiliaryinputtype1status_inputnumber,
4597           { "Input Number",             "isobus.vt.auxiliary_input_type_1_status.input_number",
4598             FT_UINT8, BASE_DEC, NULL, 0x0,
4599             NULL, HFILL }
4600         },
4601         { &hf_isobus_vt_auxiliaryinputtype1status_analyzevalue,
4602           { "Analyze Value",             "isobus.vt.auxiliary_input_type_1_status.analyze_value",
4603             FT_UINT16, BASE_DEC, NULL, 0x0,
4604             NULL, HFILL }
4605         },
4606         { &hf_isobus_vt_auxiliaryinputtype1status_numberoftransitions,
4607           { "Number of transitions",     "isobus.vt.auxiliary_input_type_1_status.number_of_transitions",
4608             FT_UINT16, BASE_DEC, NULL, 0x0,
4609             NULL, HFILL }
4610         },
4611         { &hf_isobus_vt_auxiliaryinputtype1status_booleanvalue,
4612           { "Boolean Value",             "isobus.vt.auxiliary_input_type_1_status.boolean_value",
4613             FT_UINT8, BASE_DEC, VALS(auxiliary_boolean_value), 0x0,
4614             NULL, HFILL }
4615         },
4616         { &hf_isobus_vt_preferredassignment_numberofinputunits,
4617           { "Number of Input Units",             "isobus.vt.preferred_assignment.number_of_input_units",
4618             FT_UINT8, BASE_DEC, NULL, 0x0,
4619             NULL, HFILL }
4620         },
4621         { &hf_isobus_vt_preferredassignment_auxinputunit_name,
4622           { "64-bit NAME of the Auxiliary Input Unit", "isobus.vt.preferred_assignment.auxiliary_input_unit.name",
4623             FT_UINT64, BASE_HEX, NULL, 0x0,
4624             NULL, HFILL }
4625         },
4626         { &hf_isobus_vt_preferredassignment_auxinputunit_modelidentificationcode,
4627           { "Model Identification Code of the Auxiliary Input Unit", "isobus.vt.preferred_assignment.auxiliary_input_unit.model_identification_code",
4628             FT_UINT16, BASE_HEX, NULL, 0x0,
4629             NULL, HFILL }
4630         },
4631         { &hf_isobus_vt_preferredassignment_auxinputunit_numberofpreferredfunctions,
4632           { "Number of Preferred Functions for this Auxiliary Input Unit", "isobus.vt.preferred_assignment.auxiliary_input_unit.number_of_preferred_functions",
4633             FT_UINT8, BASE_DEC, NULL, 0x0,
4634             NULL, HFILL }
4635         },
4636         { &hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxfunctionobjectid,
4637           { "Object ID of Auxiliary Function", "isobus.vt.preferred_assignment.auxiliary_input_unit.preferred_functions.auxiliary_function_object_id",
4638             FT_UINT16, BASE_HEX_DEC, VALS(object_id_strings), 0x0,
4639             NULL, HFILL }
4640         },
4641         { &hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxinputobjectid,
4642           { "Object ID of Auxiliary Input", "isobus.vt.preferred_assignment.auxiliary_input_unit.preferred_functions.auxiliary_input_object_id",
4643             FT_UINT16, BASE_HEX_DEC, VALS(object_id_strings), 0x0,
4644             NULL, HFILL }
4645         },
4646         { &hf_isobus_vt_preferredassignment_errorcodes,
4647           { "Error Codes", "isobus.vt.preferred_assignment.error_codes",
4648             FT_UINT8, BASE_HEX, NULL, 0x0,
4649             NULL, HFILL }
4650         },
4651         { &hf_isobus_vt_preferredassignment_faultyauxiliaryfunctionobjectid,
4652           { "Faulty Auxiliary Function Object ID", "isobus.vt.preferred_assignment.faulty_auxiliary_function_object_id",
4653             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4654             NULL, HFILL }
4655         },
4656         { &hf_isobus_vt_auxiliaryinputtype2maintenance_modelidentificationcode,
4657           { "Model Identification Code", "isobus.vt.auxiliary_input_type_2_maintenance.model_identification_code",
4658             FT_UINT16, BASE_DEC, NULL, 0x0,
4659             NULL, HFILL }
4660         },
4661         { &hf_isobus_vt_auxiliaryinputtype2maintenance_status,
4662           { "Status", "isobus.vt.auxiliary_input_type_2_maintenance.status",
4663             FT_UINT8, BASE_DEC, VALS(auxiliary_maintenance_status), 0x0,
4664             NULL, HFILL }
4665         },
4666         { &hf_isobus_vt_auxiliaryassignmenttype2_name,
4667           { "64-bit NAME of the Auxiliary Input Unit", "isobus.vt.auxiliary_assignment_type_2.name",
4668             FT_UINT64, BASE_HEX, NULL, 0x0,
4669             NULL, HFILL }
4670         },
4671         { &hf_isobus_vt_auxiliaryassignmenttype2_flags,
4672           { "Flags", "isobus.vt.auxiliary_assignment_type_2.flags",
4673             FT_UINT8, BASE_HEX, NULL, 0x0,
4674             NULL, HFILL }
4675         },
4676         { &hf_isobus_vt_auxiliaryassignmenttype2_flags_preferredassignment,
4677           { "Preferred Assignment", "isobus.vt.auxiliary_assignment_type_2.flags.preferred_assignment",
4678             FT_UINT8, BASE_HEX, NULL, 0x80,
4679             NULL, HFILL }
4680         },
4681         { &hf_isobus_vt_auxiliaryassignmenttype2_flags_auxiliaryfunctiontype,
4682           { "Auxiliary Function Type", "isobus.vt.auxiliary_assignment_type_2.flags.auxiliary_function_type",
4683             FT_UINT8, BASE_DEC, NULL, 0x1F,
4684             NULL, HFILL }
4685         },
4686         { &hf_isobus_vt_auxiliaryassignmenttype2_auxinputobjectid,
4687           { "Object ID of the Auxiliary Input", "isobus.vt.auxiliary_assignment_type_2.auxiliary_input_object_id",
4688             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4689             NULL, HFILL }
4690         },
4691         { &hf_isobus_vt_auxiliaryassignmenttype2_auxfunctionobjectid,
4692           { "Object ID of Auxiliary Function", "isobus.vt.auxiliary_assignment_type_2.auxiliary_function_object_id",
4693             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4694             NULL, HFILL }
4695         },
4696         { &hf_isobus_vt_auxiliaryassignmenttype2_errorcodes,
4697           { "Error Codes", "isobus.vt.auxiliary_assignment_type_2.error_codes",
4698             FT_UINT8, BASE_HEX, NULL, 0x0,
4699             NULL, HFILL }
4700         },
4701         { &hf_isobus_vt_auxiliaryinputstatustype2enable_auxiliaryinputobjectid,
4702           { "Auxiliary Input Object ID", "isobus.vt.auxiliary_input_status_type_2_enable.auxiliary_input_object_id",
4703             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4704             NULL, HFILL }
4705         },
4706         { &hf_isobus_vt_auxiliaryinputstatustype2enable_enable,
4707           { "Enable", "isobus.vt.auxiliary_input_status_type_2_enable.enable",
4708             FT_UINT8, BASE_DEC, NULL, 0x0,
4709             NULL, HFILL }
4710         },
4711         { &hf_isobus_vt_auxiliaryinputstatustype2enable_status,
4712           { "Status", "isobus.vt.auxiliary_input_status_type_2_enable.status",
4713             FT_UINT8, BASE_DEC, NULL, 0x0,
4714             NULL, HFILL }
4715         },
4716         { &hf_isobus_vt_auxiliaryinputstatustype2enable_errorcodes,
4717           { "Error Codes", "isobus.vt.auxiliary_input_status_type_2_enable.error_codes",
4718             FT_UINT8, BASE_HEX, NULL, 0x0,
4719             NULL, HFILL }
4720         },
4721         { &hf_isobus_vt_auxiliaryinputtype2status_auxiliaryinputobjectid,
4722           { "Auxiliary Input Object ID", "isobus.vt.auxiliary_input_type_2_status.auxiliary_input_object_id",
4723             FT_UINT8, BASE_HEX, VALS(object_id_strings), 0x0,
4724             NULL, HFILL }
4725         },
4726         { &hf_isobus_vt_auxiliaryinputtype2status_value1,
4727           { "Value 1", "isobus.vt.auxiliary_input_type_2_status.value_1",
4728             FT_UINT16, BASE_HEX, NULL, 0x0,
4729             NULL, HFILL }
4730         },
4731         { &hf_isobus_vt_auxiliaryinputtype2status_value2,
4732           { "Value 2", "isobus.vt.auxiliary_input_type_2_status.value_2",
4733             FT_UINT16, BASE_HEX, NULL, 0x0,
4734             NULL, HFILL }
4735         },
4736         { &hf_isobus_vt_auxiliaryinputtype2status_operatingstate,
4737           { "Operating State", "isobus.vt.auxiliary_input_type_2_status.operating_state",
4738             FT_UINT8, BASE_HEX, NULL, 0x0,
4739             NULL, HFILL }
4740         },
4741         { &hf_isobus_vt_auxiliaryinputtype2status_operatingstate_learnmodeactive,
4742           { "Operating State", "isobus.vt.auxiliary_input_type_2_status.operating_state.learn_mode_active",
4743             FT_UINT8, BASE_HEX, NULL, 0x01,
4744             NULL, HFILL }
4745         },
4746         { &hf_isobus_vt_auxiliaryinputtype2status_operatingstate_inputactivatedinlearnmode,
4747           { "Input activated in learn mode", "isobus.vt.auxiliary_input_type_2_status.operating_state.input_activated_in_learn_mode",
4748             FT_UINT8, BASE_HEX, NULL, 0x02,
4749             NULL, HFILL }
4750         },
4751         { &hf_isobus_vt_auxiliarycapabilities_requesttype,
4752           { "Request Type", "isobus.vt.auxiliary_capabilities.request_type",
4753             FT_UINT8, BASE_DEC, VALS(auxiliary_capabilities_request_type), 0x0,
4754             NULL, HFILL }
4755         },
4756         { &hf_isobus_vt_auxiliarycapabilities_numberofauxiliaryunits,
4757           { "Number of Auxiliary Unit", "isobus.vt.auxiliary_capabilities.number_of_auxiliary_units",
4758             FT_UINT8, BASE_DEC, NULL, 0x0,
4759             NULL, HFILL }
4760         },
4761         { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_name,
4762           { "64-bit NAME of the Auxiliary Unit", "isobus.vt.auxiliary_capabilities.auxiliary_unit.name",
4763             FT_UINT64, BASE_HEX, NULL, 0x0,
4764             NULL, HFILL }
4765         },
4766         { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_numberofdifferentsets,
4767           { "Number of different sets for this Auxiliary Unit", "isobus.vt.auxiliary_capabilities.auxiliary_unit.number_of_different_sets",
4768             FT_UINT8, BASE_DEC, NULL, 0x0,
4769             NULL, HFILL }
4770         },
4771         { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_numberofinstances,
4772           { "Number of Instances", "isobus.vt.auxiliary_capabilities.auxiliary_unit.set.number_of_instances",
4773             FT_UINT8, BASE_DEC, NULL, 0x0,
4774             NULL, HFILL }
4775         },
4776         { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_functionattribute,
4777           { "Function attribute", "isobus.vt.auxiliary_capabilities.auxiliary_unit.set.function_attribute",
4778             FT_UINT8, BASE_DEC, NULL, 0x0,
4779             NULL, HFILL }
4780         },
4781         { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_assignedattribute,
4782           { "Assigned attribute", "isobus.vt.auxiliary_capabilities.auxiliary_unit.set.assigned_attribute",
4783             FT_UINT8, BASE_HEX, VALS(auxiliary_assigned_attributes), 0x0,
4784             NULL, HFILL }
4785         },
4786         { &hf_isobus_vt_esc_objectid,
4787           { "Object ID", "isobus.vt.esc.object_id",
4788             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4789             NULL, HFILL }
4790         },
4791         { &hf_isobus_vt_esc_errorcodes,
4792           { "Error Codes", "isobus.vt.esc.error_codes",
4793             FT_UINT8, BASE_HEX, NULL, 0x0,
4794             NULL, HFILL }
4795         },
4796         { &hf_isobus_vt_hideshowobj_objectid,
4797           { "Object ID", "isobus.vt.hide_show_object.object_id",
4798             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4799             NULL, HFILL }
4800         },
4801         { &hf_isobus_vt_hideshowobj_action,
4802           { "Action", "isobus.vt.hide_show_object.action",
4803             FT_UINT8, BASE_DEC, VALS(vt_hide_show_action), 0x0,
4804             NULL, HFILL }
4805         },
4806         { &hf_isobus_vt_hideshowobj_errorcodes,
4807           { "Error Codes", "isobus.vt.hide_show_object.error_codes",
4808             FT_UINT8, BASE_HEX, NULL, 0x0,
4809             NULL, HFILL }
4810         },
4811         { &hf_isobus_vt_enabledisableobj_objectid,
4812           { "Object ID", "isobus.vt.enable_disable_object.object_id",
4813             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4814             NULL, HFILL }
4815         },
4816         { &hf_isobus_vt_enabledisableobj_enabledisable,
4817           { "Action",                   "isobus.vt.enable_disable_object.enable_disable",
4818             FT_UINT8, BASE_DEC, VALS(vt_enable_disable_action), 0x0,
4819             NULL, HFILL }
4820         },
4821         { &hf_isobus_vt_enabledisableobj_errorcodes,
4822           { "Error Codes",              "isobus.vt.enable_disable_object.error_codes",
4823             FT_UINT8, BASE_HEX, NULL, 0x0,
4824             NULL, HFILL }
4825         },
4826         { &hf_isobus_vt_selectinputobject_objectid,
4827           { "Object ID",                "isobus.vt.select_input_object.object_id",
4828             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4829             NULL, HFILL }
4830         },
4831         { &hf_isobus_vt_selectinputobject_option,
4832           { "Option",                "isobus.vt.select_input_object.option",
4833             FT_UINT8, BASE_HEX, VALS(select_input_object_option), 0x0,
4834             NULL, HFILL }
4835         },
4836         { &hf_isobus_vt_selectinputobject_response,
4837           { "Response",                "isobus.vt.select_input_object.response",
4838             FT_UINT16, BASE_DEC_HEX, VALS(select_input_opject_response), 0x0,
4839             NULL, HFILL }
4840         },
4841         { &hf_isobus_vt_selectinputobject_errorcodes,
4842           { "Object ID", "isobus.vt.select_input_object.error_codes",
4843             FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
4844             NULL, HFILL }
4845         },
4846         { &hf_isobus_vt_controlaudiosignal_activations,
4847           { "Activations", "isobus.vt.control_audio_signal.activations",
4848             FT_UINT8, BASE_DEC, NULL, 0x0,
4849             NULL, HFILL }
4850         },
4851         { &hf_isobus_vt_controlaudiosignal_frequency,
4852           { "Frequency", "isobus.vt.control_audio_signal.frequency",
4853             FT_UINT16, BASE_DEC, NULL, 0x0,
4854             NULL, HFILL }
4855         },
4856         { &hf_isobus_vt_controlaudiosignal_ontime,
4857           { "On-time duration", "isobus.vt.control_audio_signal.on_time",
4858             FT_UINT16, BASE_DEC, NULL, 0x0,
4859             NULL, HFILL }
4860         },
4861         { &hf_isobus_vt_controlaudiosignal_offtime,
4862           { "Off-time duration", "isobus.vt.control_audio_signal.off_time",
4863             FT_UINT16, BASE_DEC, NULL, 0x0,
4864             NULL, HFILL }
4865         },
4866         { &hf_isobus_vt_controlaudiosignal_errorcodes,
4867           { "Error Codes", "isobus.vt.control_audio_signal.error_codes",
4868             FT_UINT8, BASE_HEX, NULL, 0x0,
4869             NULL, HFILL }
4870         },
4871         { &hf_isobus_vt_setaudiovolume_volume,
4872           { "Volume", "isobus.vt.set_audio_volume.volume",
4873             FT_UINT8, BASE_DEC, NULL, 0x0,
4874             NULL, HFILL }
4875         },
4876         { &hf_isobus_vt_setaudiovolume_errorcodes,
4877           { "Error Codes", "isobus.vt.set_audio_volume.error_codes",
4878             FT_UINT8, BASE_HEX, NULL, 0x0,
4879             NULL, HFILL }
4880         },
4881         { &hf_isobus_vt_changechildlocation_parentobjectid,
4882           { "Parent Object ID", "isobus.vt.change_child_location.parent_object_id",
4883             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4884             NULL, HFILL }
4885         },
4886         { &hf_isobus_vt_changechildlocation_objectid,
4887           { "Object ID", "isobus.vt.change_child_location.object_id",
4888             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4889             NULL, HFILL }
4890         },
4891         { &hf_isobus_vt_changechildlocation_relativexpos,
4892           { "Relative X Position", "isobus.vt.change_child_location.relative_x_position",
4893             FT_UINT8, BASE_DEC, NULL, 0x0,
4894             NULL, HFILL }
4895         },
4896         { &hf_isobus_vt_changechildlocation_relativeypos,
4897           { "Relative Y Position", "isobus.vt.change_child_location.relative_y_position",
4898             FT_UINT8, BASE_DEC, NULL, 0x0,
4899             NULL, HFILL }
4900         },
4901         { &hf_isobus_vt_changechildlocation_errorcodes,
4902           { "Errorcode", "isobus.vt.change_child_location.error_codes",
4903             FT_UINT8, BASE_HEX, NULL, 0x0,
4904             NULL, HFILL }
4905         },
4906         { &hf_isobus_vt_changechildposition_parentobjectid,
4907           { "Parent Object ID", "isobus.vt.chg_child_pos.parent_object_id",
4908             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4909             NULL, HFILL }
4910         },
4911         { &hf_isobus_vt_changechildposition_objectid,
4912           { "Object ID", "isobus.vt.chg_child_pos.object_id",
4913             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4914             NULL, HFILL }
4915         },
4916         { &hf_isobus_vt_changechildposition_xpos,
4917           { "Relative X Position", "isobus.vt.chg_child_pos.rel_x_pos",
4918             FT_UINT8, BASE_DEC, NULL, 0x0,
4919             NULL, HFILL }
4920         },
4921         { &hf_isobus_vt_changechildposition_ypos,
4922           { "Relative Y Position", "isobus.vt.chg_child_pos.rel_y_pos",
4923             FT_UINT8, BASE_DEC, NULL, 0x0,
4924             NULL, HFILL }
4925         },
4926         { &hf_isobus_vt_changechildposition_errorcodes,
4927           { "Error codes", "isobus.vt.chg_child_pos.error_codes",
4928             FT_UINT8, BASE_HEX, NULL, 0x0,
4929             NULL, HFILL }
4930         },
4931         { &hf_isobus_vt_changesize_objectid,
4932           { "Object ID", "isobus.vt.change_size.object_id",
4933             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4934             NULL, HFILL }
4935         },
4936         { &hf_isobus_vt_changesize_newwidth,
4937           { "New Width", "isobus.vt.change_size.new_width",
4938             FT_UINT16, BASE_DEC, NULL, 0x0,
4939             NULL, HFILL }
4940         },
4941         { &hf_isobus_vt_changesize_newheight,
4942           { "New Height", "isobus.vt.change_size.new_height",
4943             FT_UINT16, BASE_DEC, NULL, 0x0,
4944             NULL, HFILL }
4945         },
4946         { &hf_isobus_vt_changesize_errorcodes,
4947           { "Errorcode", "isobus.vt.change_size.error_codes",
4948             FT_UINT8, BASE_HEX, NULL, 0x0,
4949             NULL, HFILL }
4950         },
4951         { &hf_isobus_vt_chgnumval_objectid,
4952           { "Object ID", "isobus.vt.change_numeric_value.object_id",
4953             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4954             NULL, HFILL }
4955         },
4956         { &hf_isobus_vt_chgnumval_errorcodes,
4957           { "Error Codes", "isobus.vt.change_numeric_value.error_codes",
4958             FT_UINT8, BASE_HEX, NULL, 0x0,
4959             NULL, HFILL }
4960         },
4961         { &hf_isobus_vt_chgnumval_value,
4962           { "Value", "isobus.vt.change_numeric_value.val",
4963             FT_UINT32, BASE_DEC, NULL, 0x0,
4964             NULL, HFILL }
4965         },
4966         { &hf_isobus_vt_changeendpoint_objectid,
4967           { "Object ID", "isobus.vt.change_end_point.object_id",
4968             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4969             NULL, HFILL }
4970         },
4971         { &hf_isobus_vt_changeendpoint_width,
4972           { "Width", "isobus.vt.change_end_point.width",
4973             FT_UINT16, BASE_DEC, NULL, 0x0,
4974             NULL, HFILL }
4975         },
4976         { &hf_isobus_vt_changeendpoint_height,
4977           { "Height", "isobus.vt.change_end_point.height",
4978             FT_UINT16, BASE_DEC, NULL, 0x0,
4979             NULL, HFILL }
4980         },
4981         { &hf_isobus_vt_changeendpoint_linedirection,
4982           { "Line Direction", "isobus.vt.change_end_point.line_direction",
4983             FT_UINT8, BASE_DEC, VALS(line_direction), 0x0,
4984             NULL, HFILL }
4985         },
4986         { &hf_isobus_vt_changefontattributes_objectid,
4987           { "Object ID", "isobus.vt.change_font_attributes.object_id",
4988             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4989             NULL, HFILL }
4990         },
4991         { &hf_isobus_vt_changefontattributes_fontcolour,
4992           { "Font Colour", "isobus.vt.change_font_attributes.font_colour",
4993             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
4994             NULL, HFILL }
4995         },
4996         { &hf_isobus_vt_changefontattributes_fontsize,
4997           { "Font Size", "isobus.vt.change_font_attributes.font_size",
4998             FT_UINT8, BASE_DEC, NULL, 0x0,
4999             NULL, HFILL }
5000         },
5001         { &hf_isobus_vt_changefontattributes_fonttype,
5002           { "Font Type", "isobus.vt.change_font_attributes.font_type",
5003             FT_UINT8, BASE_DEC, NULL, 0x0,
5004             NULL, HFILL }
5005         },
5006         { &hf_isobus_vt_changefontattributes_fontstyle,
5007           { "Font Style", "isobus.vt.change_font_attributes.font_style",
5008             FT_UINT8, BASE_DEC, NULL, 0x0,
5009             NULL, HFILL }
5010         },
5011         { &hf_isobus_vt_changefontattributes_errorcodes,
5012           { "Error Codes", "isobus.vt.change_font_attributes.error_codes",
5013             FT_UINT8, BASE_HEX, NULL, 0x0,
5014             NULL, HFILL }
5015         },
5016         { &hf_isobus_vt_changelineattributes_objectid,
5017           { "Object ID", "isobus.vt.change_line_attributes.object_id",
5018             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5019             NULL, HFILL }
5020         },
5021         { &hf_isobus_vt_changelineattributes_linecolour,
5022           { "Line Colour", "isobus.vt.change_line_attributes.line_colour",
5023             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5024             NULL, HFILL }
5025         },
5026         { &hf_isobus_vt_changelineattributes_linewidth,
5027           { "Line Width", "isobus.vt.change_line_attributes.line_width",
5028             FT_UINT8, BASE_DEC, NULL, 0x0,
5029             NULL, HFILL }
5030         },
5031         { &hf_isobus_vt_changelineattributes_lineart,
5032           { "Line Art", "isobus.vt.change_line_attributes.line_art",
5033             FT_UINT8, BASE_DEC, NULL, 0x0,
5034             NULL, HFILL }
5035         },
5036         { &hf_isobus_vt_changelineattributes_errorcodes,
5037           { "Error Codes", "isobus.vt.change_line_attributes.error_codes",
5038             FT_UINT8, BASE_HEX, NULL, 0x0,
5039             NULL, HFILL }
5040         },
5041         { &hf_isobus_vt_changefillattributes_objectid,
5042           { "Object ID", "isobus.vt.change_fill_attributes.object_id",
5043             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5044             NULL, HFILL }
5045         },
5046         { &hf_isobus_vt_changefillattributes_filltype,
5047           { "Fill Type", "isobus.vt.change_fill_attributes.fill_type",
5048             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5049             NULL, HFILL }
5050         },
5051         { &hf_isobus_vt_changefillattributes_fillcolour,
5052           { "Fill Colour", "isobus.vt.change_fill_attributes.fill_colour",
5053             FT_UINT8, BASE_DEC, NULL, 0x0,
5054             NULL, HFILL }
5055         },
5056         { &hf_isobus_vt_changefillattributes_fillpatternobjectid,
5057           { "Fill Pattern Object ID", "isobus.vt.change_fill_attributes.fill_pattern_object_id",
5058             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5059             NULL, HFILL }
5060         },
5061         { &hf_isobus_vt_changefillattributes_errorcodes,
5062           { "Error Codes", "isobus.vt.change_fill_attributes.error_codes",
5063             FT_UINT8, BASE_HEX, NULL, 0x0,
5064             NULL, HFILL }
5065         },
5066         { &hf_isobus_vt_changeactivemask_workingset,
5067           { "Working Set Object ID", "isobus.vt.chg_active_mask.working_set_object_id",
5068             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5069             NULL, HFILL }
5070         },
5071         { &hf_isobus_vt_changeactivemask_newactivemask,
5072           { "New Active Mask Object ID", "isobus.vt.chg_active_mask.new_active_mask_object_id",
5073             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5074             NULL, HFILL }
5075         },
5076         { &hf_isobus_vt_changeactivemask_errorcodes,
5077           { "Error Codes", "isobus.vt.chg_active_mask.error_codes",
5078             FT_UINT8, BASE_HEX, NULL, 0x0,
5079             NULL, HFILL }
5080         },
5081         { &hf_isobus_vt_changesoftkeymask_masktype,
5082           { "Mask Type", "isobus.vt.change_soft_key_mask.mask_type",
5083             FT_UINT8, BASE_HEX, NULL, 0x0,
5084             NULL, HFILL }
5085         },
5086         { &hf_isobus_vt_changesoftkeymask_datamaskobjectid,
5087           { "Working Set Object ID", "isobus.vt.change_soft_key_mask.data_mask_object_id",
5088             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5089             NULL, HFILL }
5090         },
5091         { &hf_isobus_vt_changesoftkeymask_newsoftkeymaskobjectid,
5092           { "New Active Mask Object ID", "isobus.vt.change_soft_key_mask.new_soft_key_mask_object_id",
5093             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5094             NULL, HFILL }
5095         },
5096         { &hf_isobus_vt_changesoftkeymask_errorcodes,
5097           { "Error Codes", "isobus.vt.change_soft_key_mask.error_codes",
5098             FT_UINT8, BASE_HEX, NULL, 0x0,
5099             NULL, HFILL }
5100         },
5101         { &hf_isobus_vt_changeattributes_objectid,
5102           { "Object ID", "isobus.vt.change_attributes.object_id",
5103             FT_UINT16, BASE_DEC, VALS(object_id_strings), 0x0,
5104             NULL, HFILL }
5105         },
5106         { &hf_isobus_vt_changeattributes_attributeid,
5107           { "Attribute ID", "isobus.vt.change_attributes.attribute_id",
5108             FT_UINT16, BASE_DEC, NULL, 0x0,
5109             NULL, HFILL }
5110         },
5111         { &hf_isobus_vt_changeattributes_newvalue,
5112           { "New Value For Attribute", "isobus.vt.change_attributes.new_active_mask",
5113             FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
5114             NULL, HFILL }
5115         },
5116         { &hf_isobus_vt_changeattributes_errorcodes,
5117           { "Error Codes", "isobus.vt.change_attributes.error_codes",
5118             FT_UINT8, BASE_HEX, NULL, 0x0,
5119             NULL, HFILL }
5120         },
5121         { &hf_isobus_vt_changepriority_objectid,
5122           { "Object ID", "isobus.vt.change_priority.object_id",
5123             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5124             NULL, HFILL }
5125         },
5126         { &hf_isobus_vt_changepriority_newpriority,
5127           { "New Priority", "isobus.vt.change_priority.new_priority",
5128             FT_UINT8, BASE_DEC, NULL, 0x0,
5129             NULL, HFILL }
5130         },
5131         { &hf_isobus_vt_changepriority_errorcodes,
5132           { "Error Codes", "isobus.vt.change_priority.error_codes",
5133             FT_UINT8, BASE_HEX, NULL, 0x0,
5134             NULL, HFILL }
5135         },
5136         { &hf_isobus_vt_changelistitem_listobjectid,
5137           { "List Object ID", "isobus.vt.change_list_item.list_object_id",
5138             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5139             NULL, HFILL }
5140         },
5141         { &hf_isobus_vt_changelistitem_listindex,
5142           { "List Index", "isobus.vt.change_list_item.list_index",
5143             FT_UINT8, BASE_DEC, NULL, 0x0,
5144             NULL, HFILL }
5145         },
5146         { &hf_isobus_vt_changelistitem_newobjectid,
5147           { "New Object ID", "isobus.vt.change_list_item.new_object_id",
5148             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5149             NULL, HFILL }
5150         },
5151         { &hf_isobus_vt_changelistitem_errorcodes,
5152           { "Error Codes", "isobus.vt.change_list_item.error_codes",
5153             FT_UINT8, BASE_HEX, NULL, 0x0,
5154             NULL, HFILL }
5155         },
5156         { &hf_isobus_vt_deleteobjectpool_errorcodes,
5157           { "Error Codes", "isobus.vt.delete_object_pool.error_codes",
5158             FT_UINT8, BASE_HEX, NULL, 0x0,
5159             NULL, HFILL }
5160         },
5161         { &hf_isobus_vt_chgstrval_objectid,
5162           { "Object ID", "isobus.vt.change_string_value.object_id",
5163             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5164             NULL, HFILL }
5165         },
5166         { &hf_isobus_vt_chgstrval_length,
5167           { "Length", "isobus.vt.change_string_value.length",
5168             FT_UINT16, BASE_DEC, NULL, 0x0,
5169             NULL, HFILL }
5170         },
5171         { &hf_isobus_vt_chgstrval_errorcodes,
5172           { "Error Codes", "isobus.vt.change_string_value.error_codes",
5173             FT_UINT8, BASE_HEX, NULL, 0x0,
5174             NULL, HFILL }
5175         },
5176         { &hf_isobus_vt_chgstrval_value,
5177           { "Value", "isobus.vt.change_string_value.value",
5178             FT_STRING, STR_UNICODE, NULL, 0x0,
5179             NULL, HFILL }
5180         },
5181         { &hf_isobus_vt_changebackgroundcolour_objectid,
5182           { "Object ID", "isobus.vt.change_background_colour.object_id",
5183             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5184             NULL, HFILL }
5185         },
5186         { &hf_isobus_vt_changebackgroundcolour_errorcodes,
5187           { "Error Codes", "isobus.vt.change_background_colour.error_codes",
5188             FT_UINT8, BASE_HEX, NULL, 0x0,
5189             NULL, HFILL }
5190         },
5191         { &hf_isobus_vt_changebackgroundcolour_colour,
5192           { "Colour", "isobus.vt.change_background_colour.colour",
5193             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5194             NULL, HFILL }
5195         },
5196         { &hf_isobus_vt_changeobjectlabel_objectid,
5197           { "Object ID", "isobus.vt.change_object_label.object_id",
5198             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5199             NULL, HFILL }
5200         },
5201         { &hf_isobus_vt_changeobjectlabel_stringobjectid,
5202           { "String Object ID", "isobus.vt.change_object_label.string_object_id",
5203             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5204             NULL, HFILL }
5205         },
5206         { &hf_isobus_vt_changeobjectlabel_fonttype,
5207           { "Colour", "isobus.vt.change_object_label.colour",
5208             FT_UINT8, BASE_DEC, NULL, 0x0,
5209             NULL, HFILL }
5210         },
5211         { &hf_isobus_vt_changeobjectlabel_graphicobjectid,
5212           { "Graphics Representation Object ID", "isobus.vt.change_object_label.graphic_representation_object_id",
5213             FT_UINT16, BASE_DEC, VALS(object_id_strings), 0x0,
5214             NULL, HFILL }
5215         },
5216         { &hf_isobus_vt_changeobjectlabel_errorcodes,
5217           { "Error Codes", "isobus.vt.change_object_label.error_codes",
5218             FT_UINT8, BASE_HEX, NULL, 0x0,
5219             NULL, HFILL }
5220         },
5221         { &hf_isobus_vt_changepolygonpoint_objectid,
5222           { "Object ID", "isobus.vt.change_polygon_point.object_id",
5223             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5224             NULL, HFILL }
5225         },
5226         { &hf_isobus_vt_changepolygonpoint_pointindex,
5227           { "Point Index", "isobus.vt.change_polygon_point.point_index",
5228             FT_UINT8, BASE_DEC, NULL, 0x0,
5229             NULL, HFILL }
5230         },
5231         { &hf_isobus_vt_changepolygonpoint_xvalue,
5232           { "X Value", "isobus.vt.change_polygon_point.x_value",
5233             FT_UINT16, BASE_DEC, NULL, 0x0,
5234             NULL, HFILL }
5235         },
5236         { &hf_isobus_vt_changepolygonpoint_yvalue,
5237           { "Y Value", "isobus.vt.change_polygon_point.y_value",
5238             FT_UINT16, BASE_DEC, NULL, 0x0,
5239             NULL, HFILL }
5240         },
5241         { &hf_isobus_vt_changepolygonpoint_errorcodes,
5242           { "Error Codes", "isobus.vt.change_polygon_point.error_codes",
5243             FT_UINT8, BASE_HEX, NULL, 0x0,
5244             NULL, HFILL }
5245         },
5246         { &hf_isobus_vt_changepolygonscale_objectid,
5247           { "Object ID", "isobus.vt.change_polygon_scale.object_id",
5248             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5249             NULL, HFILL }
5250         },
5251         { &hf_isobus_vt_changepolygonscale_newwidth,
5252           { "New Width", "isobus.vt.change_polygon_scale.new_width",
5253             FT_UINT16, BASE_DEC, NULL, 0x0,
5254             NULL, HFILL }
5255         },
5256         { &hf_isobus_vt_changepolygonscale_newheight,
5257           { "New Height", "isobus.vt.change_polygon_scale.new_height",
5258             FT_UINT16, BASE_DEC, NULL, 0x0,
5259             NULL, HFILL }
5260         },
5261         { &hf_isobus_vt_changepolygonscale_errorcodes,
5262           { "Error Codes", "isobus.vt.change_polygon_scale.error_codes",
5263             FT_UINT8, BASE_HEX, NULL, 0x0,
5264             NULL, HFILL }
5265         },
5266         { &hf_isobus_vt_graphicscontext_objectid,
5267           { "Object ID", "isobus.vt.graphics_context.object_id",
5268             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5269             NULL, HFILL }
5270         },
5271         { &hf_isobus_vt_graphicscontext_subcommandid,
5272           { "Sub Command ID", "isobus.vt.graphics_context.sub_command_id",
5273             FT_UINT8, BASE_DEC | BASE_EXT_STRING, &graphics_context_sub_command_id_ext, 0x0,
5274             NULL, HFILL }
5275         },
5276         { &hf_isobus_vt_graphicscontext_setgraphicscursor_xposition,
5277           { "X Position", "isobus.vt.graphics_context.set_graphics_cursor.x_position",
5278             FT_INT16, BASE_DEC, NULL, 0x0,
5279             NULL, HFILL }
5280         },
5281         { &hf_isobus_vt_graphicscontext_setgraphicscursor_yposition,
5282           { "Y Position", "isobus.vt.graphics_context.set_graphics_cursor.y_position",
5283             FT_INT16, BASE_DEC, NULL, 0x0,
5284             NULL, HFILL }
5285         },
5286         { &hf_isobus_vt_graphicscontext_movegraphicscursor_xoffset,
5287           { "X Offset", "isobus.vt.graphics_context.move_graphics_cursor.x_offset",
5288             FT_INT16, BASE_DEC, NULL, 0x0,
5289             NULL, HFILL }
5290         },
5291         { &hf_isobus_vt_graphicscontext_movegraphicscursor_yoffset,
5292           { "Y Offset", "isobus.vt.graphics_context.move_graphics_cursor.y_offset",
5293             FT_INT16, BASE_DEC, NULL, 0x0,
5294             NULL, HFILL }
5295         },
5296         { &hf_isobus_vt_graphicscontext_setforegroundcolour_colour,
5297           { "Colour", "isobus.vt.graphics_context.set_foreground_colour.colour",
5298             FT_UINT8, BASE_DEC, NULL, 0x0,
5299             NULL, HFILL }
5300         },
5301         { &hf_isobus_vt_graphicscontext_setbackgroundcolour_colour,
5302           { "Colour", "isobus.vt.graphics_context.set_background_colour.colour",
5303             FT_UINT8, BASE_DEC, NULL, 0x0,
5304             NULL, HFILL }
5305         },
5306         { &hf_isobus_vt_graphicscontext_setlineattributesobjectid_objectid,
5307           { "Object ID", "isobus.vt.graphics_context.set_line_attributes_object_id.object_id",
5308             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5309             NULL, HFILL }
5310         },
5311         { &hf_isobus_vt_graphicscontext_setfillattributesobjectid_objectid,
5312           { "Object ID", "isobus.vt.graphics_context.set_fill_attributes_object_id.object_id",
5313             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5314             NULL, HFILL }
5315         },
5316         { &hf_isobus_vt_graphicscontext_setfontattributesobjectid_objectid,
5317           { "Object ID", "isobus.vt.graphics_context.set_font_attributes_object_id.object_id",
5318             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5319             NULL, HFILL }
5320         },
5321         { &hf_isobus_vt_graphicscontext_eraserectangle_width,
5322           { "Width", "isobus.vt.graphics_context.erase_rectangle.width",
5323             FT_UINT16, BASE_DEC, NULL, 0x0,
5324             NULL, HFILL }
5325         },
5326         { &hf_isobus_vt_graphicscontext_eraserectangle_height,
5327           { "Height", "isobus.vt.graphics_context.erase_rectangle.height",
5328             FT_UINT16, BASE_DEC, NULL, 0x0,
5329             NULL, HFILL }
5330         },
5331         { &hf_isobus_vt_graphicscontext_drawpoint_xoffset,
5332           { "X Offset", "isobus.vt.graphics_context.draw_point.x_offset",
5333             FT_INT16, BASE_DEC, NULL, 0x0,
5334             NULL, HFILL }
5335         },
5336         { &hf_isobus_vt_graphicscontext_drawpoint_yoffset,
5337           { "Y Offset", "isobus.vt.graphics_context.draw_point.y_offset",
5338             FT_INT16, BASE_DEC, NULL, 0x0,
5339             NULL, HFILL }
5340         },
5341         { &hf_isobus_vt_graphicscontext_drawline_xoffset,
5342           { "X Offset", "isobus.vt.graphics_context.draw_line.x_offset",
5343             FT_INT16, BASE_DEC, NULL, 0x0,
5344             NULL, HFILL }
5345         },
5346         { &hf_isobus_vt_graphicscontext_drawline_yoffset,
5347           { "Y Offset", "isobus.vt.graphics_context.draw_line.y_offset",
5348             FT_INT16, BASE_DEC, NULL, 0x0,
5349             NULL, HFILL }
5350         },
5351         { &hf_isobus_vt_graphicscontext_drawrectangle_width,
5352           { "Width", "isobus.vt.graphics_context.draw_rectangle.width",
5353             FT_UINT16, BASE_DEC, NULL, 0x0,
5354             NULL, HFILL }
5355         },
5356         { &hf_isobus_vt_graphicscontext_drawrectangle_height,
5357           { "Height", "isobus.vt.graphics_context.draw_rectangle.height",
5358             FT_UINT16, BASE_DEC, NULL, 0x0,
5359             NULL, HFILL }
5360         },
5361         { &hf_isobus_vt_graphicscontext_drawclosedellipse_width,
5362           { "Width", "isobus.vt.graphics_context.draw_closed_rectangle.width",
5363             FT_UINT16, BASE_DEC, NULL, 0x0,
5364             NULL, HFILL }
5365         },
5366         { &hf_isobus_vt_graphicscontext_drawclosedellipse_height,
5367           { "Height", "isobus.vt.graphics_context.draw_closed_rectangle.height",
5368             FT_UINT16, BASE_DEC, NULL, 0x0,
5369             NULL, HFILL }
5370         },
5371         { &hf_isobus_vt_graphicscontext_drawpolygon_numberofpoints,
5372           { "Number of polygon points", "isobus.vt.graphics_context.draw_polygon.number_of_points",
5373             FT_UINT8, BASE_DEC, NULL, 0x0,
5374             NULL, HFILL }
5375         },
5376         { &hf_isobus_vt_graphicscontext_drawpolygon_point_xoffset,
5377           { "X Offset", "isobus.vt.graphics_context.draw_polygon.point.x_offset",
5378             FT_INT16, BASE_DEC, NULL, 0x0,
5379             NULL, HFILL }
5380         },
5381         { &hf_isobus_vt_graphicscontext_drawpolygon_point_yoffset,
5382           { "Y Offset", "isobus.vt.graphics_context.draw_polygon.point.y_offset",
5383             FT_INT16, BASE_DEC, NULL, 0x0,
5384             NULL, HFILL }
5385         },
5386         { &hf_isobus_vt_graphicscontext_drawtext_background,
5387           { "Background", "isobus.vt.graphics_context.draw_text.point.background",
5388             FT_UINT8, BASE_DEC, VALS(draw_text_background), 0x0,
5389             NULL, HFILL }
5390         },
5391         { &hf_isobus_vt_graphicscontext_drawtext_numberofbytes,
5392           { "Number of Bytes", "isobus.vt.graphics_context.draw_text.point.number_of_bytes",
5393             FT_UINT8, BASE_DEC, NULL, 0x0,
5394             NULL, HFILL }
5395         },
5396         { &hf_isobus_vt_graphicscontext_drawtext_textstring,
5397           { "Text string", "isobus.vt.graphics_context.draw_text.point.text_string",
5398             FT_STRING, STR_UNICODE, NULL, 0x0,
5399             NULL, HFILL }
5400         },
5401         { &hf_isobus_vt_graphicscontext_panviewport_viewportx,
5402           { "Viewport X", "isobus.vt.graphics_context.pan_viewport.viewport_x",
5403             FT_INT16, BASE_DEC, NULL, 0x0,
5404             NULL, HFILL }
5405         },
5406         { &hf_isobus_vt_graphicscontext_panviewport_viewporty,
5407           { "Viewport Y", "isobus.vt.graphics_context.pan_viewport.viewport_y",
5408             FT_INT16, BASE_DEC, NULL, 0x0,
5409             NULL, HFILL }
5410         },
5411         { &hf_isobus_vt_graphicscontext_zoomviewport_zoomvalue,
5412           { "Zoom Value", "isobus.vt.graphics_context.zoom_viewport.zoom_value",
5413             FT_FLOAT, BASE_NONE, NULL, 0x0,
5414             NULL, HFILL }
5415         },
5416         { &hf_isobus_vt_graphicscontext_panandzoomviewport_viewportx,
5417           { "Viewport X", "isobus.vt.graphics_context.pan_and_zoom_viewport.viewport_x",
5418             FT_INT16, BASE_DEC, NULL, 0x0,
5419             NULL, HFILL }
5420         },
5421         { &hf_isobus_vt_graphicscontext_panandzoomviewport_viewporty,
5422           { "Viewport Y", "isobus.vt.graphics_context.pan_and_zoom_viewport.viewport_y",
5423             FT_INT16, BASE_DEC, NULL, 0x0,
5424             NULL, HFILL }
5425         },
5426         { &hf_isobus_vt_graphicscontext_panandzoomviewport_zoomvalue,
5427           { "Zoom Value", "isobus.vt.graphics_context.pan_and_zoom_viewport.zoom_value",
5428             FT_FLOAT, BASE_NONE, NULL, 0x0,
5429             NULL, HFILL }
5430         },
5431         { &hf_isobus_vt_graphicscontext_changeviewportsize_newwidth,
5432           { "New Width", "isobus.vt.graphics_context.change_viewport_size.new_width",
5433             FT_UINT16, BASE_DEC, NULL, 0x0,
5434             NULL, HFILL }
5435         },
5436         { &hf_isobus_vt_graphicscontext_changeviewportsize_newheight,
5437           { "New Height", "isobus.vt.graphics_context.change_viewport_size.new_height",
5438             FT_UINT16, BASE_DEC, NULL, 0x0,
5439             NULL, HFILL }
5440         },
5441         { &hf_isobus_vt_graphicscontext_drawvtobject_objectid,
5442           { "Object ID", "isobus.vt.graphics_context.draw_vt_object.object_id",
5443             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5444             NULL, HFILL }
5445         },
5446         { &hf_isobus_vt_graphicscontext_copycanvastopicturegraphic_objectidpicturegraphic,
5447           { "Object ID of Picture Graphic", "isobus.vt.graphics_context.copy_canvas_to_picture_graphic.object_id_picture_graphic",
5448             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5449             NULL, HFILL }
5450         },
5451         { &hf_isobus_vt_graphicscontext_copyviewporttopicturegraphic_objectidpicturegraphic,
5452           { "Object ID of Picture Graphic", "isobus.vt.graphics_context.copy_viewport_to_picture_graphic.object_id_picture_graphic",
5453             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5454             NULL, HFILL }
5455         },
5456         { &hf_isobus_vt_getattributevalue_objectid,
5457           { "Object ID", "isobus.vt.get_attribute_value.object_id",
5458             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5459             NULL, HFILL }
5460         },
5461         { &hf_isobus_vt_getattributevalue_attributeid,
5462           { "Attribute ID", "isobus.vt.get_attribute_value.attribute_id",
5463             FT_UINT8, BASE_DEC, NULL, 0x0,
5464             NULL, HFILL }
5465         },
5466         { &hf_isobus_vt_getattributevalue_value,
5467           { "Value", "isobus.vt.get_attribute_value.value",
5468             FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
5469             NULL, HFILL }
5470         },
5471         { &hf_isobus_vt_getattributevalue_errorcodes,
5472           { "Error Codes", "isobus.vt.get_attribute_value.error_codes",
5473             FT_UINT8, BASE_HEX, NULL, 0x0,
5474             NULL, HFILL }
5475         },
5476         { &hf_isobus_vt_selectcolourmap_objectid,
5477           { "Object ID", "isobus.vt.select_colour_map.object_id",
5478             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5479             NULL, HFILL }
5480         },
5481         { &hf_isobus_vt_selectcolourmap_errorcodes,
5482           { "Error Codes", "isobus.vt.select_colour_map.error_codes",
5483             FT_UINT8, BASE_HEX, NULL, 0x0,
5484             NULL, HFILL }
5485         },
5486         { &hf_isobus_vt_executeextendedmacro_objectid,
5487           { "Object ID", "isobus.vt.execute_extended_macro.object_id",
5488             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5489             NULL, HFILL }
5490         },
5491         { &hf_isobus_vt_executeextendedmacro_errorcodes,
5492           { "Error Codes", "isobus.vt.execute_extended_macro.error_codes",
5493             FT_UINT8, BASE_HEX, NULL, 0x0,
5494             NULL, HFILL }
5495         },
5496         { &hf_isobus_vt_lockunlockmask_command,
5497           { "Command", "isobus.vt.lock_unlock_mask.command",
5498             FT_UINT8, BASE_DEC, VALS(lock_unlock), 0x0,
5499             NULL, HFILL }
5500         },
5501         { &hf_isobus_vt_lockunlockmask_objectid,
5502           { "Object ID", "isobus.vt.lock_unlock_mask.object_id",
5503             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5504             NULL, HFILL }
5505         },
5506         { &hf_isobus_vt_lockunlockmask_locktimeout,
5507           { "Lock Timeout", "isobus.vt.lock_unlock_mask.lock_timeout",
5508             FT_UINT16, BASE_DEC, NULL, 0x0,
5509             NULL, HFILL }
5510         },
5511         { &hf_isobus_vt_lockunlockmask_errorcodes,
5512           { "Error Codes", "isobus.vt.lock_unlock_mask.error_codes",
5513             FT_UINT8, BASE_HEX, NULL, 0x0,
5514             NULL, HFILL }
5515         },
5516         { &hf_isobus_vt_executemacro_objectid,
5517           { "Object ID", "isobus.vt.execute_macro.object_id",
5518             FT_UINT8, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5519             NULL, HFILL }
5520         },
5521         { &hf_isobus_vt_executemacro_errorcodes,
5522           { "Error Codes", "isobus.vt.execute_macro.error_codes",
5523             FT_UINT8, BASE_HEX, NULL, 0x0,
5524             NULL, HFILL }
5525         },
5526         { &hf_isobus_vt_getmemory_memoryrequired,
5527           { "Memory Required", "isobus.vt.get_memory.memory_required",
5528             FT_UINT32, BASE_DEC, NULL, 0x0,
5529             NULL, HFILL }
5530         },
5531         { &hf_isobus_vt_getmemory_vtversion,
5532           { "VT Version", "isobus.vt.get_memory.vt_version",
5533             FT_UINT8, BASE_DEC, VALS(vt_versions_extended), 0x0,
5534             NULL, HFILL }
5535         },
5536         { &hf_isobus_vt_getmemory_status,
5537           { "Status", "isobus.vt.get_memory.status",
5538             FT_UINT8, BASE_DEC, VALS(memory_status), 0x0,
5539             NULL, HFILL }
5540         },
5541         { &hf_isobus_vt_getsupportedwidechars_codeplane,
5542           { "Code Plane", "isobus.vt.get_supported_widechars.code_plane",
5543             FT_UINT8, BASE_DEC, NULL, 0x0,
5544             NULL, HFILL }
5545         },
5546         { &hf_isobus_vt_getsupportedwidechars_firstwidechar,
5547           { "First Widechar", "isobus.vt.get_supported_widechars.first_widechar",
5548             FT_UINT16, BASE_DEC, NULL, 0x0,
5549             NULL, HFILL }
5550         },
5551         { &hf_isobus_vt_getsupportedwidechars_lastwidechar,
5552           { "Last Widechar", "isobus.vt.get_supported_widechars.last_widechar",
5553             FT_UINT16, BASE_DEC, NULL, 0x0,
5554             NULL, HFILL }
5555         },
5556         { &hf_isobus_vt_getsupportedwidechars_errorcodes,
5557           { "Error Codes", "isobus.vt.get_supported_widechars.error_codes",
5558             FT_UINT8, BASE_HEX, NULL, 0x0,
5559             NULL, HFILL }
5560         },
5561         { &hf_isobus_vt_getsupportedwidechars_numberofranges,
5562           { "Number of Ranges", "isobus.vt.get_supported_widechars.number_of_ranges",
5563             FT_UINT8, BASE_DEC, NULL, 0x0,
5564             NULL, HFILL }
5565         },
5566         { &hf_isobus_vt_getsupportedwidechars_firstavailablewidechar,
5567           { "First Available Widechar", "isobus.vt.get_supported_widechars.first_available_widechar",
5568             FT_UINT16, BASE_DEC, NULL, 0x0,
5569             NULL, HFILL }
5570         },
5571         { &hf_isobus_vt_getsupportedwidechars_lastavailablewidechar,
5572           { "Last Available Widechar", "isobus.vt.get_supported_widechars.last_available_widechar",
5573             FT_UINT16, BASE_DEC, NULL, 0x0,
5574             NULL, HFILL }
5575         },
5576         { &hf_isobus_vt_getnumberofsoftkeys_navigationsoftkeys,
5577           { "Navigation Soft Keys", "isobus.vt.get_number_of_soft_keys.navigation_soft_keys",
5578             FT_UINT8, BASE_DEC, NULL, 0x0,
5579             NULL, HFILL }
5580         },
5581         { &hf_isobus_vt_getnumberofsoftkeys_xdots,
5582           { "X Dots", "isobus.vt.get_number_of_soft_keys.x_dots",
5583             FT_UINT8, BASE_DEC, NULL, 0x0,
5584             NULL, HFILL }
5585         },
5586         { &hf_isobus_vt_getnumberofsoftkeys_ydots,
5587           { "Y Dots", "isobus.vt.get_number_of_soft_keys.y_dots",
5588             FT_UINT8, BASE_DEC, NULL, 0x0,
5589             NULL, HFILL }
5590         },
5591         { &hf_isobus_vt_getnumberofsoftkeys_virtualsoftkeys,
5592           { "Virtual Soft Keys", "isobus.vt.get_number_of_soft_keys.virtual_soft_keys",
5593             FT_UINT8, BASE_DEC, NULL, 0x0,
5594             NULL, HFILL }
5595         },
5596         { &hf_isobus_vt_getnumberofsoftkeys_physicalsoftkeys,
5597           { "Physical Soft Keys", "isobus.vt.get_number_of_soft_keys.physical_soft_keys",
5598             FT_UINT8, BASE_DEC, NULL, 0x0,
5599             NULL, HFILL }
5600         },
5601         { &hf_isobus_vt_gettextfontdata_smallfontsizes,
5602           { "Small Font Sizes", "isobus.vt.get_text_font_data.small_font_sizes",
5603             FT_UINT8, BASE_HEX, NULL, 0x00,
5604             NULL, HFILL }
5605         },
5606         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font8x8,
5607           { "Font 8 x 8",       "isobus.vt.get_text_font_data.small_font_sizes.font_8x8",
5608             FT_UINT8, BASE_HEX, NULL, 0x01,
5609             NULL, HFILL }
5610         },
5611         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font8x12,
5612           { "Font 8 x 12",       "isobus.vt.get_text_font_data.small_font_sizes.font_8x12",
5613             FT_UINT8, BASE_HEX, NULL, 0x02,
5614             NULL, HFILL }
5615         },
5616         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font12x16,
5617           { "Font 12 x 16",       "isobus.vt.get_text_font_data.small_font_sizes.font_12x16",
5618             FT_UINT8, BASE_HEX, NULL, 0x04,
5619             NULL, HFILL }
5620         },
5621         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font16x16,
5622           { "Font 12 x 16",       "isobus.vt.get_text_font_data.small_font_sizes.font_12x16",
5623             FT_UINT8, BASE_HEX, NULL, 0x08,
5624             NULL, HFILL }
5625         },
5626         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font16x24,
5627           { "Font 16 x 24",       "isobus.vt.get_text_font_data.small_font_sizes.font_16x24",
5628             FT_UINT8, BASE_HEX, NULL, 0x10,
5629             NULL, HFILL }
5630         },
5631         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font24x32,
5632           { "Font 24 x 32",       "isobus.vt.get_text_font_data.small_font_sizes.font_24x32",
5633             FT_UINT8, BASE_HEX, NULL, 0x20,
5634             NULL, HFILL }
5635         },
5636         { &hf_isobus_vt_gettextfontdata_smallfontsizes_font32x32,
5637           { "Font 32 x 32",       "isobus.vt.get_text_font_data.small_font_sizes.font_32x32",
5638             FT_UINT8, BASE_HEX, NULL, 0x40,
5639             NULL, HFILL }
5640         },
5641         { &hf_isobus_vt_gettextfontdata_largefontsizes,
5642           { "Large Font Sizes",       "isobus.vt.get_text_font_data.large_font_sizes",
5643             FT_UINT8, BASE_HEX, NULL, 0x00,
5644             NULL, HFILL }
5645         },
5646         { &hf_isobus_vt_gettextfontdata_largefontsizes_font32x48,
5647           { "Font 32 x 48",       "isobus.vt.get_text_font_data.large_font_sizes.font_32x48",
5648             FT_UINT8, BASE_HEX, NULL, 0x01,
5649             NULL, HFILL }
5650         },
5651         { &hf_isobus_vt_gettextfontdata_largefontsizes_font48x64,
5652           { "Font 48 x 64",       "isobus.vt.get_text_font_data.large_font_sizes.font_48x64",
5653             FT_UINT8, BASE_HEX, NULL, 0x02,
5654             NULL, HFILL }
5655         },
5656         { &hf_isobus_vt_gettextfontdata_largefontsizes_font64x64,
5657           { "Font 64 x 64",       "isobus.vt.get_text_font_data.large_font_sizes.font_64x64",
5658             FT_UINT8, BASE_HEX, NULL, 0x04,
5659             NULL, HFILL }
5660         },
5661         { &hf_isobus_vt_gettextfontdata_largefontsizes_font64x96,
5662           { "Font 64 x 96",       "isobus.vt.get_text_font_data.large_font_sizes.font_64x96",
5663             FT_UINT8, BASE_HEX, NULL, 0x08,
5664             NULL, HFILL }
5665         },
5666         { &hf_isobus_vt_gettextfontdata_largefontsizes_font96x128,
5667           { "Font 96 x 128",       "isobus.vt.get_text_font_data.large_font_sizes.font_96x128",
5668             FT_UINT8, BASE_HEX, NULL, 0x10,
5669             NULL, HFILL }
5670         },
5671         { &hf_isobus_vt_gettextfontdata_largefontsizes_font128x128,
5672           { "Font 128 x 128",       "isobus.vt.get_text_font_data.large_font_sizes.font_128x128",
5673             FT_UINT8, BASE_HEX, NULL, 0x20,
5674             NULL, HFILL }
5675         },
5676         { &hf_isobus_vt_gettextfontdata_largefontsizes_font128x192,
5677           { "Font 128 x 192",       "isobus.vt.get_text_font_data.large_font_sizes.font_128x192",
5678             FT_UINT8, BASE_HEX, NULL, 0x40,
5679             NULL, HFILL }
5680         },
5681         { &hf_isobus_vt_gettextfontdata_typeattributes,
5682           { "Type Attributes",       "isobus.vt.get_text_font_data.type_attributes",
5683             FT_UINT8, BASE_HEX, NULL, 0x00,
5684             NULL, HFILL }
5685         },
5686         { &hf_isobus_vt_gettextfontdata_typeattributes_boldtext,
5687           { "Bold text",       "isobus.vt.get_text_font_data.type_attributes.bold_text",
5688             FT_UINT8, BASE_HEX, NULL, 0x01,
5689             NULL, HFILL }
5690         },
5691         { &hf_isobus_vt_gettextfontdata_typeattributes_crossedouttext,
5692           { "Crossed out text",       "isobus.vt.get_text_font_data.type_attributes.crossed_out_text",
5693             FT_UINT8, BASE_HEX, NULL, 0x02,
5694             NULL, HFILL }
5695         },
5696         { &hf_isobus_vt_gettextfontdata_typeattributes_underlinedtext,
5697           { "Underlined text",       "isobus.vt.get_text_font_data.type_attributes.underlined_text",
5698             FT_UINT8, BASE_HEX, NULL, 0x04,
5699             NULL, HFILL }
5700         },
5701         { &hf_isobus_vt_gettextfontdata_typeattributes_italicstext,
5702           { "Italics text",       "isobus.vt.get_text_font_data.type_attributes.italics_text",
5703             FT_UINT8, BASE_HEX, NULL, 0x08,
5704             NULL, HFILL }
5705         },
5706         { &hf_isobus_vt_gettextfontdata_typeattributes_invertedtext,
5707           { "Inverted text",       "isobus.vt.get_text_font_data.type_attributes.inverted_text",
5708             FT_UINT8, BASE_HEX, NULL, 0x10,
5709             NULL, HFILL }
5710         },
5711         { &hf_isobus_vt_gettextfontdata_typeattributes_flashinverted,
5712           { "Flash inverted",       "isobus.vt.get_text_font_data.type_attributes.flash_inverted",
5713             FT_UINT8, BASE_HEX, NULL, 0x20,
5714             NULL, HFILL }
5715         },
5716         { &hf_isobus_vt_gettextfontdata_typeattributes_flashhidden,
5717           { "Flash hidden",       "isobus.vt.get_text_font_data.type_attributes.flash_hidden",
5718             FT_UINT8, BASE_HEX, NULL, 0x40,
5719             NULL, HFILL }
5720         },
5721         { &hf_isobus_vt_gettextfontdata_typeattributes_proportionalfontrendering,
5722           { "Proportional font rendering",       "isobus.vt.get_text_font_data.type_attributes.proportional_font_rendering",
5723             FT_UINT8, BASE_DEC, NULL, 0x40,
5724             NULL, HFILL }
5725         },
5726         { &hf_isobus_vt_getwindowmaskdata_backgroundcolourdatamask,
5727           { "Background Colour Data Mask",      "isobus.vt.get_window_mask_data.background_colour_data_mask",
5728             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5729             NULL, HFILL }
5730         },
5731         { &hf_isobus_vt_getwindowmaskdata_backgroundcoloursoftkeymask,
5732           { "Background Colour Soft Key Mask",      "isobus.vt.get_window_mask_data.background_colour_soft_key_mask",
5733             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5734             NULL, HFILL }
5735         },
5736         { &hf_isobus_vt_getsupportedobjects_numberofbytes,
5737           { "Number of bytes",      "isobus.vt.get_supported_objects.number_of_bytes",
5738             FT_UINT8, BASE_DEC, NULL, 0x0,
5739             NULL, HFILL }
5740         },
5741         { &hf_isobus_vt_getsupportedobjects_objecttype,
5742           { "Object Type",      "isobus.vt.get_supported_objects.object_type",
5743             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_object_types), 0x0,
5744             NULL, HFILL }
5745         },
5746         { &hf_isobus_vt_gethardware_boottime,
5747           { "Boot time",      "isobus.vt.get_hardware.boot_time",
5748             FT_UINT8, BASE_DEC, NULL, 0x0,
5749             NULL, HFILL }
5750         },
5751         { &hf_isobus_vt_gethardware_graphictype,
5752           { "Graphic type",      "isobus.vt.get_hardware.graphic_type",
5753             FT_UINT8, BASE_DEC, VALS(graphic_types), 0x0,
5754             NULL, HFILL }
5755         },
5756         { &hf_isobus_vt_gethardware_hardware,
5757           { "Hardware",      "isobus.vt.get_hardware.hardware",
5758             FT_UINT8, BASE_HEX, NULL, 0x0,
5759             NULL, HFILL }
5760         },
5761         { &hf_isobus_vt_gethardware_hardware_touchscreen,
5762           { "Touch Screen",      "isobus.vt.get_hardware.hardware.touch_screen",
5763             FT_UINT8, BASE_HEX, NULL, 0x01,
5764             NULL, HFILL }
5765         },
5766         { &hf_isobus_vt_gethardware_hardware_pointingdevice,
5767           { "Pointing Device",      "isobus.vt.get_hardware.hardware.pointing_device",
5768             FT_UINT8, BASE_HEX, NULL, 0x02,
5769             NULL, HFILL }
5770         },
5771         { &hf_isobus_vt_gethardware_hardware_multifreqaudiooutput,
5772           { "Multiple frequency audio output",      "isobus.vt.get_hardware.hardware.multiple_frequency_audio_output",
5773             FT_UINT8, BASE_HEX, NULL, 0x04,
5774             NULL, HFILL }
5775         },
5776         { &hf_isobus_vt_gethardware_hardware_adjustvolumeaudiooutput,
5777           { "Adjustable volume audio output",      "isobus.vt.get_hardware.hardware.adjustable_volume_audio_output",
5778             FT_UINT8, BASE_HEX, NULL, 0x08,
5779             NULL, HFILL }
5780         },
5781         { &hf_isobus_vt_gethardware_hardware_simultaneousactivationphysicalsoftkeys,
5782           { "Simultaneous activation of physical soft keys",      "isobus.vt.get_hardware.hardware.simultaneous_activation_physical_soft_keys",
5783             FT_UINT8, BASE_HEX, NULL, 0x10,
5784             NULL, HFILL }
5785         },
5786         { &hf_isobus_vt_gethardware_hardware_simultaneousactivationbuttons,
5787           { "Simultaneous activation of buttons",      "isobus.vt.get_hardware.hardware.simultaneous_activation_buttons",
5788             FT_UINT8, BASE_HEX, NULL, 0x20,
5789             NULL, HFILL }
5790         },
5791         { &hf_isobus_vt_gethardware_hardware_dragoperation,
5792           { "Reports drag operation",      "isobus.vt.get_hardware.hardware.drag_operation",
5793             FT_UINT8, BASE_HEX, NULL, 0x40,
5794             NULL, HFILL }
5795         },
5796         { &hf_isobus_vt_gethardware_hardware_intermediatecoordinatesdrag,
5797           { "Intermediate coordinates during drag",      "isobus.vt.get_hardware.hardware.intermediate_coordinates_drag",
5798             FT_UINT8, BASE_HEX, NULL, 0x80,
5799             NULL, HFILL }
5800         },
5801         { &hf_isobus_vt_gethardware_xpixels,
5802           { "X - Pixels",      "isobus.vt.get_hardware.x_pixels",
5803             FT_UINT16, BASE_DEC, NULL, 0x0,
5804             NULL, HFILL }
5805         },
5806         { &hf_isobus_vt_gethardware_ypixels,
5807           { "Y - Pixels",      "isobus.vt.get_hardware.y_pixels",
5808             FT_UINT16, BASE_DEC, NULL, 0x0,
5809             NULL, HFILL }
5810         },
5811         { &hf_isobus_vt_storeversion_versionlabel,
5812           { "Version Label",       "isobus.vt.store_version.version_label",
5813             FT_STRING, STR_ASCII, NULL, 0x0,
5814             NULL, HFILL }
5815         },
5816         { &hf_isobus_vt_storeversion_errorcodes,
5817           { "Error Codes",       "isobus.vt.store_version.error_codes",
5818             FT_UINT8, BASE_HEX, NULL, 0x0,
5819             NULL, HFILL }
5820         },
5821         { &hf_isobus_vt_loadversion_versionlabel,
5822           { "Version Label",       "isobus.vt.load_version.version_label",
5823             FT_STRING, STR_ASCII, NULL, 0x0,
5824             NULL, HFILL }
5825         },
5826         { &hf_isobus_vt_loadversion_errorcodes,
5827           { "Error Codes",       "isobus.vt.load_version.error_codes",
5828             FT_UINT8, BASE_HEX, NULL, 0x0,
5829             NULL, HFILL }
5830         },
5831         { &hf_isobus_vt_deleteversion_versionlabel,
5832           { "Version Label",       "isobus.vt.delete_version.version_label",
5833             FT_STRING, STR_ASCII, NULL, 0x0,
5834             NULL, HFILL }
5835         },
5836         { &hf_isobus_vt_deleteversion_errorcodes,
5837           { "Error Codes",       "isobus.vt.delete_version.error_codes",
5838             FT_UINT8, BASE_HEX, NULL, 0x0,
5839             NULL, HFILL }
5840         },
5841         { &hf_isobus_vt_extendedgetversions_numberofversions,
5842           { "Number of versions",  "isobus.vt.extended_get_versions.number_of_versions",
5843             FT_UINT8, BASE_DEC, NULL, 0x0,
5844             NULL, HFILL }
5845         },
5846         { &hf_isobus_vt_extendedgetversions_versionlabel,
5847           { "Version label",  "isobus.vt.extended_get_versions.version_label",
5848             FT_STRING, STR_ASCII, NULL, 0x0,
5849             NULL, HFILL }
5850         },
5851         { &hf_isobus_vt_extendedstoreversion_versionlabel,
5852           { "Version Label",       "isobus.vt.extended_store_version.version_label",
5853             FT_STRING, STR_ASCII, NULL, 0x0,
5854             NULL, HFILL }
5855         },
5856         { &hf_isobus_vt_extendedstoreversion_errorcodes,
5857           { "Error Codes",       "isobus.vt.extended_store_version.error_codes",
5858             FT_UINT8, BASE_HEX, NULL, 0x0,
5859             NULL, HFILL }
5860         },
5861         { &hf_isobus_vt_extendedloadversion_versionlabel,
5862           { "Version Label",       "isobus.vt.extended_load_version.version_label",
5863             FT_STRING, STR_ASCII, NULL, 0x0,
5864             NULL, HFILL }
5865         },
5866         { &hf_isobus_vt_extendedloadversion_errorcodes,
5867           { "Error Codes",       "isobus.vt.extended_load_version.error_codes",
5868             FT_UINT8, BASE_HEX, NULL, 0x0,
5869             NULL, HFILL }
5870         },
5871         { &hf_isobus_vt_extendeddeleteversion_versionlabel,
5872           { "Version Label",       "isobus.vt.extended_delete_version.version_label",
5873             FT_STRING, STR_ASCII, NULL, 0x0,
5874             NULL, HFILL }
5875         },
5876         { &hf_isobus_vt_extendeddeleteversion_errorcodes,
5877           { "Error Codes",       "isobus.vt.extended_delete_version.error_codes",
5878             FT_UINT8, BASE_HEX, NULL, 0x0,
5879             NULL, HFILL }
5880         },
5881         { &hf_isobus_vt_getversions_numberofversions,
5882           { "Number of versions",  "isobus.vt.get_versions.number_of_versions",
5883             FT_UINT8, BASE_DEC, NULL, 0x0,
5884             NULL, HFILL }
5885         },
5886         { &hf_isobus_vt_getversions_versionlabel,
5887           { "Version label",  "isobus.vt.get_versions.version_label",
5888             FT_STRING, STR_ASCII, NULL, 0x0,
5889             NULL, HFILL }
5890         },
5891         { &hf_isobus_vt_unsupportedvtfunction_unsupportedvtfunction,
5892           { "Unsupported VT function",       "isobus.vt.unsupported_vt_function.unsupported_vt_function",
5893             FT_UINT8, BASE_DEC | BASE_EXT_STRING, &vt_function_code_ext, 0x0,
5894             NULL, HFILL }
5895         },
5896         { &hf_isobus_vt_vtstatus_workingsetmaster,
5897           { "Working Set Master",       "isobus.vt.vtstatus.working_set_master",
5898             FT_UINT8, BASE_DEC, NULL, 0x0,
5899             NULL, HFILL }
5900         },
5901         { &hf_isobus_vt_vtstatus_objectiddatamask,
5902           { "Object ID Data Mask",      "isobus.vt.vtstatus.object_id_data_mask",
5903             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5904             NULL, HFILL }
5905         },
5906         { &hf_isobus_vt_vtstatus_objectidsoftkeymask,
5907           { "Object ID Soft Key Mask",  "isobus.vt.vtstatus.object_id_soft_key_mask",
5908             FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5909             NULL, HFILL }
5910         },
5911         { &hf_isobus_vt_vtstatus_vtbusycodes,
5912           { "VT Busy Codes",            "isobus.vt.vtstatus.vt_busy_codes",
5913             FT_UINT8, BASE_HEX, NULL, 0x0,
5914             NULL, HFILL }
5915         },
5916         { &hf_isobus_vt_vtstatus_vtbusycodes_updatingvisiblemask,
5917           { "VT is busy updating visible mask",            "isobus.vt.vtstatus.vt_busy_codes.updating_visible_mask",
5918             FT_UINT8, BASE_HEX, NULL, 0x80,
5919             NULL, HFILL }
5920         },
5921         { &hf_isobus_vt_vtstatus_vtbusycodes_savingdata,
5922           { "VT is busy saving data to non-volatile memory","isobus.vt.vtstatus.vt_busy_codes.saving_data",
5923             FT_UINT8, BASE_HEX, NULL, 0x40,
5924             NULL, HFILL }
5925         },
5926         { &hf_isobus_vt_vtstatus_vtbusycodes_executingcommand,
5927           { "VT is busy executing a command",            "isobus.vt.vtstatus.vt_busy_codes.executing_commands",
5928             FT_UINT8, BASE_HEX, NULL, 0x20,
5929             NULL, HFILL }
5930         },
5931         { &hf_isobus_vt_vtstatus_vtbusycodes_executingmacro,
5932           { "VT is busy executing a Macro",            "isobus.vt.vtstatus.vt_busy_codes.executing_macro",
5933             FT_UINT8, BASE_HEX, NULL, 0x10,
5934             NULL, HFILL }
5935         },
5936         { &hf_isobus_vt_vtstatus_vtbusycodes_parsingobjectpool,
5937           { "VT is busy parsing an object pool",            "isobus.vt.vtstatus.vt_busy_codes.parsing_object_pool",
5938             FT_UINT8, BASE_HEX, NULL, 0x8,
5939             NULL, HFILL }
5940         },
5941         { &hf_isobus_vt_vtstatus_vtbusycodes_auxcontrolsactive,
5942           { "Auxiliary controls learn mode active",        "isobus.vt.vtstatus.vt_function_codes.aux_controls_active",
5943             FT_UINT8, BASE_HEX, NULL, 0x2,
5944             NULL, HFILL }
5945         },
5946         { &hf_isobus_vt_vtstatus_vtbusycodes_outofmemory,
5947           { "VT is out of memory",        "isobus.vt.vtstatus.vt_function_codes.out_of_memory",
5948             FT_UINT8, BASE_HEX, NULL, 0x1,
5949             NULL, HFILL }
5950         },
5951         { &hf_isobus_vt_vtstatus_vtfunctioncodes,
5952           { "VT Function Codes",        "isobus.vt.vtstatus.vt_function_codes",
5953             FT_UINT8, BASE_HEX, NULL, 0x0,
5954             NULL, HFILL }
5955         },
5956         { &hf_isobus_vt_wrksetmain_bitmask,
5957           { "Bitmask",                   "isobus.vt.working_set_maintenance.bitmask",
5958             FT_UINT8, BASE_DEC, NULL, 0x80,
5959             NULL, HFILL }
5960         },
5961         { &hf_isobus_vt_wrksetmain_version,
5962           { "Version",                  "isobus.vt.working_set_maintenance.version",
5963             FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_versions), 0x0,
5964             NULL, HFILL }
5965         }
5966     };
5967 
5968     static gint *ett[] = {
5969         &ett_isobus_vt,
5970         &ett_isobus_vt_vtstatus_busycodes_subtree,
5971         &ett_isobus_vt_getsupportedwidechars_range,
5972         &ett_isobus_vt_gettextfontdata_smallfontsizes,
5973         &ett_isobus_vt_gettextfontdata_largefontsizes,
5974         &ett_isobus_vt_gettextfontdata_typeattributes,
5975         &ett_isobus_vt_gethardware_hardware,
5976         &ett_isobus_vt_preferredassignment_inputunit,
5977         &ett_isobus_vt_preferredassignment_inputunit_preferredfunction,
5978         &ett_isobus_vt_auxiliarycapabilities_inputunit,
5979         &ett_isobus_vt_auxiliarycapabilities_inputunit_set,
5980         &ett_isobus_vt_auxiliaryassignmenttype2_flags,
5981         &ett_isobus_vt_auxiliaryinputtype2status_operatingstate
5982     };
5983 
5984     module_t *vt_module;
5985 
5986     register_init_routine(&isobus_vt_init);
5987 
5988     proto_vt = proto_register_protocol("ISObus Virtual Terminal",
5989                                        "ISObus VT",
5990                                        "isobus.vt");
5991 
5992     proto_register_field_array(proto_vt, hf, array_length(hf));
5993     proto_register_subtree_array(ett, array_length(ett));
5994 
5995     /* register preferences */
5996     vt_module = prefs_register_protocol(proto_vt, NULL);
5997 
5998     /* file to translate opject ids to names, format should be separate line for each object.
5999      * objects should be specified in the following way: <object ID number>,<object ID name>
6000      */
6001     prefs_register_filename_preference(vt_module, "object_ids", "Object ID Translation",
6002         "File containing a translation from object ID to string", &object_id_translation,
6003         FALSE);
6004 }
6005 
6006 void
proto_reg_handoff_isobus_vt(void)6007 proto_reg_handoff_isobus_vt(void)
6008 {
6009     dissector_handle_t vt_handle_vt_to_ecu;
6010     dissector_handle_t vt_handle_ecu_to_vt;
6011 
6012     vt_handle_vt_to_ecu = create_dissector_handle( dissect_vt_to_ecu, proto_vt );
6013     vt_handle_ecu_to_vt = create_dissector_handle( dissect_ecu_to_vt, proto_vt );
6014 
6015     dissector_add_uint("isobus.pdu_format", 230, vt_handle_vt_to_ecu);
6016     dissector_add_uint("isobus.pdu_format", 231, vt_handle_ecu_to_vt);
6017 }
6018 
6019 /*
6020  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
6021  *
6022  * Local variables:
6023  * c-basic-offset: 4
6024  * tab-width: 8
6025  * indent-tabs-mode: nil
6026  * End:
6027  *
6028  * vi: set shiftwidth=4 tabstop=8 expandtab:
6029  * :indentSize=4:tabSize=8:noTabs=true:
6030  */
6031