dcerpc-netlogon: maintain netlogon_auth_vars for NetrServerAuthenticateKerberos
[wireshark-sm.git] / epan / dissectors / packet-isobus-vt.c
blob0f251dfd03824cc7119a674cef9c48dc4a70591f
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
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include "config.h"
15 #include <epan/packet.h>
16 #include <epan/prefs.h>
17 #include <wsutil/file_util.h>
19 #define MAX_OBJECT_ID_DB_SIZE 10000
21 void proto_register_isobus_vt(void);
22 void proto_reg_handoff_isobus_vt(void);
24 static uint8_t current_vt_version;
26 /* Initialize the protocol and registered fields */
27 static int proto_vt;
28 static int hf_isobus_vt;
29 static int hf_isobus_vt_command;
30 static int hf_isobus_vt_objectid;
31 static int hf_isobus_vt_softkey_keyactcode;
32 static int hf_isobus_vt_softkey_objectid;
33 static int hf_isobus_vt_softkey_parentobjectid;
34 static int hf_isobus_vt_softkey_keynumber;
35 static int hf_isobus_vt_button_keyactcode;
36 static int hf_isobus_vt_button_objectid;
37 static int hf_isobus_vt_button_parentobjectid;
38 static int hf_isobus_vt_button_keynumber;
39 static int hf_isobus_vt_pointing_xposition;
40 static int hf_isobus_vt_pointing_yposition;
41 static int hf_isobus_vt_pointing_touchstate;
42 static int hf_isobus_vt_vtselectinputobject_objectid;
43 static int hf_isobus_vt_vtselectinputobject_selection;
44 static int hf_isobus_vt_vtselectinputobject_openforinput;
45 static int hf_isobus_vt_vtescmessage_objectid;
46 static int hf_isobus_vt_vtescmessage_errorcodes;
47 static int hf_isobus_vt_vtchgnumval_objectid;
48 static int hf_isobus_vt_vtchgnumval_value;
49 static int hf_isobus_vt_vtchgactivemask_maskobjectid;
50 static int hf_isobus_vt_vtchgactivemask_errorcodes;
51 static int hf_isobus_vt_vtchgactivemask_errorobjectid;
52 static int hf_isobus_vt_vtchgactivemask_errorobjectidparent;
53 static int hf_isobus_vt_vtchgstrval_objectid;
54 static int hf_isobus_vt_vtchgstrval_length;
55 static int hf_isobus_vt_vtchgstrval_value;
56 static int hf_isobus_vt_vtonuserlayouthideshow_objectid_1;
57 static int hf_isobus_vt_vtonuserlayouthideshow_status_1;
58 static int hf_isobus_vt_vtonuserlayouthideshow_objectid_2;
59 static int hf_isobus_vt_vtonuserlayouthideshow_status_2;
60 static int hf_isobus_vt_vtcontrolaudiosignaltermination_terminationcause;
61 static int hf_isobus_vt_endofobjectpool_errorcodes;
62 static int hf_isobus_vt_endofobjectpool_faultyobjectid;
63 static int hf_isobus_vt_endofobjectpool_faultyparentobjectid;
64 static int hf_isobus_vt_endofobjectpool_objectpoolerrorcodes;
65 static int hf_isobus_vt_auxiliaryassignmenttype1_sourceaddressauxinputdevice;
66 static int hf_isobus_vt_auxiliaryassignmenttype1_auxinputnumber;
67 static int hf_isobus_vt_auxiliaryassignmenttype1_objectidauxinputdevice;
68 static int hf_isobus_vt_auxiliaryinputtype1status_inputnumber;
69 static int hf_isobus_vt_auxiliaryinputtype1status_analyzevalue;
70 static int hf_isobus_vt_auxiliaryinputtype1status_numberoftransitions;
71 static int hf_isobus_vt_auxiliaryinputtype1status_booleanvalue;
72 static int hf_isobus_vt_preferredassignment_numberofinputunits;
73 static int hf_isobus_vt_preferredassignment_auxinputunit_name;
74 static int hf_isobus_vt_preferredassignment_auxinputunit_modelidentificationcode;
75 static int hf_isobus_vt_preferredassignment_auxinputunit_numberofpreferredfunctions;
76 static int hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxfunctionobjectid;
77 static int hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxinputobjectid;
78 static int hf_isobus_vt_preferredassignment_errorcodes;
79 static int hf_isobus_vt_preferredassignment_faultyauxiliaryfunctionobjectid;
80 static int hf_isobus_vt_auxiliaryinputtype2maintenance_modelidentificationcode;
81 static int hf_isobus_vt_auxiliaryinputtype2maintenance_status;
82 static int hf_isobus_vt_auxiliaryassignmenttype2_name;
83 static int hf_isobus_vt_auxiliaryassignmenttype2_flags;
84 static int hf_isobus_vt_auxiliaryassignmenttype2_flags_preferredassignment;
85 static int hf_isobus_vt_auxiliaryassignmenttype2_flags_auxiliaryfunctiontype;
86 static int hf_isobus_vt_auxiliaryassignmenttype2_auxinputobjectid;
87 static int hf_isobus_vt_auxiliaryassignmenttype2_auxfunctionobjectid;
88 static int hf_isobus_vt_auxiliaryassignmenttype2_errorcodes;
89 static int hf_isobus_vt_auxiliaryinputstatustype2enable_auxiliaryinputobjectid;
90 static int hf_isobus_vt_auxiliaryinputstatustype2enable_enable;
91 static int hf_isobus_vt_auxiliaryinputstatustype2enable_status;
92 static int hf_isobus_vt_auxiliaryinputstatustype2enable_errorcodes;
93 static int hf_isobus_vt_auxiliaryinputtype2status_auxiliaryinputobjectid;
94 static int hf_isobus_vt_auxiliaryinputtype2status_value1;
95 static int hf_isobus_vt_auxiliaryinputtype2status_value2;
96 static int hf_isobus_vt_auxiliaryinputtype2status_operatingstate;
97 static int hf_isobus_vt_auxiliaryinputtype2status_operatingstate_learnmodeactive;
98 static int hf_isobus_vt_auxiliaryinputtype2status_operatingstate_inputactivatedinlearnmode;
99 static int hf_isobus_vt_auxiliarycapabilities_requesttype;
100 static int hf_isobus_vt_auxiliarycapabilities_numberofauxiliaryunits;
101 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_name;
102 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_numberofdifferentsets;
103 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_numberofinstances;
104 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_functionattribute;
105 static int hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_assignedattribute;
106 static int hf_isobus_vt_esc_objectid;
107 static int hf_isobus_vt_esc_errorcodes;
108 static int hf_isobus_vt_hideshowobj_objectid;
109 static int hf_isobus_vt_hideshowobj_action;
110 static int hf_isobus_vt_hideshowobj_errorcodes;
111 static int hf_isobus_vt_enabledisableobj_objectid;
112 static int hf_isobus_vt_enabledisableobj_enabledisable;
113 static int hf_isobus_vt_enabledisableobj_errorcodes;
114 static int hf_isobus_vt_selectinputobject_objectid;
115 static int hf_isobus_vt_selectinputobject_option;
116 static int hf_isobus_vt_selectinputobject_response;
117 static int hf_isobus_vt_selectinputobject_errorcodes;
118 static int hf_isobus_vt_controlaudiosignal_activations;
119 static int hf_isobus_vt_controlaudiosignal_frequency;
120 static int hf_isobus_vt_controlaudiosignal_ontime;
121 static int hf_isobus_vt_controlaudiosignal_offtime;
122 static int hf_isobus_vt_controlaudiosignal_errorcodes;
123 static int hf_isobus_vt_setaudiovolume_volume;
124 static int hf_isobus_vt_setaudiovolume_errorcodes;
125 static int hf_isobus_vt_changechildlocation_parentobjectid;
126 static int hf_isobus_vt_changechildlocation_objectid;
127 static int hf_isobus_vt_changechildlocation_relativexpos;
128 static int hf_isobus_vt_changechildlocation_relativeypos;
129 static int hf_isobus_vt_changechildlocation_errorcodes;
130 static int hf_isobus_vt_changesize_objectid;
131 static int hf_isobus_vt_changesize_newwidth;
132 static int hf_isobus_vt_changesize_newheight;
133 static int hf_isobus_vt_changesize_errorcodes;
134 static int hf_isobus_vt_changebackgroundcolour_objectid;
135 static int hf_isobus_vt_changebackgroundcolour_colour;
136 static int hf_isobus_vt_changebackgroundcolour_errorcodes;
137 static int hf_isobus_vt_chgnumval_objectid;
138 static int hf_isobus_vt_chgnumval_errorcodes;
139 static int hf_isobus_vt_chgnumval_value;
140 static int hf_isobus_vt_changeendpoint_objectid;
141 static int hf_isobus_vt_changeendpoint_width;
142 static int hf_isobus_vt_changeendpoint_height;
143 static int hf_isobus_vt_changeendpoint_linedirection;
144 static int hf_isobus_vt_changefontattributes_objectid;
145 static int hf_isobus_vt_changefontattributes_fontcolour;
146 static int hf_isobus_vt_changefontattributes_fontsize;
147 static int hf_isobus_vt_changefontattributes_fonttype;
148 static int hf_isobus_vt_changefontattributes_fontstyle;
149 static int hf_isobus_vt_changefontattributes_errorcodes;
150 static int hf_isobus_vt_changelineattributes_objectid;
151 static int hf_isobus_vt_changelineattributes_linecolour;
152 static int hf_isobus_vt_changelineattributes_linewidth;
153 static int hf_isobus_vt_changelineattributes_lineart;
154 static int hf_isobus_vt_changelineattributes_errorcodes;
155 static int hf_isobus_vt_changefillattributes_objectid;
156 static int hf_isobus_vt_changefillattributes_filltype;
157 static int hf_isobus_vt_changefillattributes_fillcolour;
158 static int hf_isobus_vt_changefillattributes_fillpatternobjectid;
159 static int hf_isobus_vt_changefillattributes_errorcodes;
160 static int hf_isobus_vt_changeactivemask_workingset;
161 static int hf_isobus_vt_changeactivemask_newactivemask;
162 static int hf_isobus_vt_changeactivemask_errorcodes;
163 static int hf_isobus_vt_changesoftkeymask_masktype;
164 static int hf_isobus_vt_changesoftkeymask_datamaskobjectid;
165 static int hf_isobus_vt_changesoftkeymask_newsoftkeymaskobjectid;
166 static int hf_isobus_vt_changesoftkeymask_errorcodes;
167 static int hf_isobus_vt_changeattributes_objectid;
168 static int hf_isobus_vt_changeattributes_attributeid;
169 static int hf_isobus_vt_changeattributes_newvalue;
170 static int hf_isobus_vt_changeattributes_errorcodes;
171 static int hf_isobus_vt_changepriority_objectid;
172 static int hf_isobus_vt_changepriority_newpriority;
173 static int hf_isobus_vt_changepriority_errorcodes;
174 static int hf_isobus_vt_changelistitem_listobjectid;
175 static int hf_isobus_vt_changelistitem_listindex;
176 static int hf_isobus_vt_changelistitem_newobjectid;
177 static int hf_isobus_vt_changelistitem_errorcodes;
178 static int hf_isobus_vt_deleteobjectpool_errorcodes;
179 static int hf_isobus_vt_chgstrval_objectid;
180 static int hf_isobus_vt_chgstrval_length;
181 static int hf_isobus_vt_chgstrval_errorcodes;
182 static int hf_isobus_vt_chgstrval_value;
183 static int hf_isobus_vt_changechildposition_parentobjectid;
184 static int hf_isobus_vt_changechildposition_objectid;
185 static int hf_isobus_vt_changechildposition_xpos;
186 static int hf_isobus_vt_changechildposition_ypos;
187 static int hf_isobus_vt_changechildposition_errorcodes;
188 static int hf_isobus_vt_changeobjectlabel_objectid;
189 static int hf_isobus_vt_changeobjectlabel_stringobjectid;
190 static int hf_isobus_vt_changeobjectlabel_fonttype;
191 static int hf_isobus_vt_changeobjectlabel_graphicobjectid;
192 static int hf_isobus_vt_changeobjectlabel_errorcodes;
193 static int hf_isobus_vt_changepolygonpoint_objectid;
194 static int hf_isobus_vt_changepolygonpoint_pointindex;
195 static int hf_isobus_vt_changepolygonpoint_xvalue;
196 static int hf_isobus_vt_changepolygonpoint_yvalue;
197 static int hf_isobus_vt_changepolygonpoint_errorcodes;
198 static int hf_isobus_vt_changepolygonscale_objectid;
199 static int hf_isobus_vt_changepolygonscale_newwidth;
200 static int hf_isobus_vt_changepolygonscale_newheight;
201 static int hf_isobus_vt_changepolygonscale_errorcodes;
202 static int hf_isobus_vt_graphicscontext_objectid;
203 static int hf_isobus_vt_graphicscontext_subcommandid;
204 static int hf_isobus_vt_graphicscontext_setgraphicscursor_xposition;
205 static int hf_isobus_vt_graphicscontext_setgraphicscursor_yposition;
206 static int hf_isobus_vt_graphicscontext_movegraphicscursor_xoffset;
207 static int hf_isobus_vt_graphicscontext_movegraphicscursor_yoffset;
208 static int hf_isobus_vt_graphicscontext_setforegroundcolour_colour;
209 static int hf_isobus_vt_graphicscontext_setbackgroundcolour_colour;
210 static int hf_isobus_vt_graphicscontext_setlineattributesobjectid_objectid;
211 static int hf_isobus_vt_graphicscontext_setfillattributesobjectid_objectid;
212 static int hf_isobus_vt_graphicscontext_setfontattributesobjectid_objectid;
213 static int hf_isobus_vt_graphicscontext_eraserectangle_width;
214 static int hf_isobus_vt_graphicscontext_eraserectangle_height;
215 static int hf_isobus_vt_graphicscontext_drawpoint_xoffset;
216 static int hf_isobus_vt_graphicscontext_drawpoint_yoffset;
217 static int hf_isobus_vt_graphicscontext_drawline_xoffset;
218 static int hf_isobus_vt_graphicscontext_drawline_yoffset;
219 static int hf_isobus_vt_graphicscontext_drawrectangle_width;
220 static int hf_isobus_vt_graphicscontext_drawrectangle_height;
221 static int hf_isobus_vt_graphicscontext_drawclosedellipse_width;
222 static int hf_isobus_vt_graphicscontext_drawclosedellipse_height;
223 static int hf_isobus_vt_graphicscontext_drawpolygon_numberofpoints;
224 static int hf_isobus_vt_graphicscontext_drawpolygon_point_xoffset;
225 static int hf_isobus_vt_graphicscontext_drawpolygon_point_yoffset;
226 static int hf_isobus_vt_graphicscontext_drawtext_background;
227 static int hf_isobus_vt_graphicscontext_drawtext_numberofbytes;
228 static int hf_isobus_vt_graphicscontext_drawtext_textstring;
229 static int hf_isobus_vt_graphicscontext_panviewport_viewportx;
230 static int hf_isobus_vt_graphicscontext_panviewport_viewporty;
231 static int hf_isobus_vt_graphicscontext_zoomviewport_zoomvalue;
232 static int hf_isobus_vt_graphicscontext_panandzoomviewport_viewportx;
233 static int hf_isobus_vt_graphicscontext_panandzoomviewport_viewporty;
234 static int hf_isobus_vt_graphicscontext_panandzoomviewport_zoomvalue;
235 static int hf_isobus_vt_graphicscontext_changeviewportsize_newwidth;
236 static int hf_isobus_vt_graphicscontext_changeviewportsize_newheight;
237 static int hf_isobus_vt_graphicscontext_drawvtobject_objectid;
238 static int hf_isobus_vt_graphicscontext_copycanvastopicturegraphic_objectidpicturegraphic;
239 static int hf_isobus_vt_graphicscontext_copyviewporttopicturegraphic_objectidpicturegraphic;
240 static int hf_isobus_vt_getattributevalue_objectid;
241 static int hf_isobus_vt_getattributevalue_attributeid;
242 static int hf_isobus_vt_getattributevalue_value;
243 static int hf_isobus_vt_getattributevalue_errorcodes;
244 static int hf_isobus_vt_selectcolourmap_objectid;
245 static int hf_isobus_vt_selectcolourmap_errorcodes;
246 static int hf_isobus_vt_executeextendedmacro_objectid;
247 static int hf_isobus_vt_executeextendedmacro_errorcodes;
248 static int hf_isobus_vt_lockunlockmask_command;
249 static int hf_isobus_vt_lockunlockmask_objectid;
250 static int hf_isobus_vt_lockunlockmask_locktimeout;
251 static int hf_isobus_vt_lockunlockmask_errorcodes;
252 static int hf_isobus_vt_executemacro_objectid;
253 static int hf_isobus_vt_executemacro_errorcodes;
254 static int hf_isobus_vt_getmemory_memoryrequired;
255 static int hf_isobus_vt_getmemory_vtversion;
256 static int hf_isobus_vt_getmemory_status;
257 static int hf_isobus_vt_getsupportedwidechars_codeplane;
258 static int hf_isobus_vt_getsupportedwidechars_firstwidechar;
259 static int hf_isobus_vt_getsupportedwidechars_lastwidechar;
260 static int hf_isobus_vt_getsupportedwidechars_errorcodes;
261 static int hf_isobus_vt_getsupportedwidechars_numberofranges;
262 static int hf_isobus_vt_getsupportedwidechars_firstavailablewidechar;
263 static int hf_isobus_vt_getsupportedwidechars_lastavailablewidechar;
264 static int hf_isobus_vt_getnumberofsoftkeys_navigationsoftkeys;
265 static int hf_isobus_vt_getnumberofsoftkeys_xdots;
266 static int hf_isobus_vt_getnumberofsoftkeys_ydots;
267 static int hf_isobus_vt_getnumberofsoftkeys_virtualsoftkeys;
268 static int hf_isobus_vt_getnumberofsoftkeys_physicalsoftkeys;
269 static int hf_isobus_vt_gettextfontdata_smallfontsizes;
270 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font8x8;
271 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font8x12;
272 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font12x16;
273 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font16x16;
274 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font16x24;
275 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font24x32;
276 static int hf_isobus_vt_gettextfontdata_smallfontsizes_font32x32;
277 static int hf_isobus_vt_gettextfontdata_largefontsizes;
278 static int hf_isobus_vt_gettextfontdata_largefontsizes_font32x48;
279 static int hf_isobus_vt_gettextfontdata_largefontsizes_font48x64;
280 static int hf_isobus_vt_gettextfontdata_largefontsizes_font64x64;
281 static int hf_isobus_vt_gettextfontdata_largefontsizes_font64x96;
282 static int hf_isobus_vt_gettextfontdata_largefontsizes_font96x128;
283 static int hf_isobus_vt_gettextfontdata_largefontsizes_font128x128;
284 static int hf_isobus_vt_gettextfontdata_largefontsizes_font128x192;
285 static int hf_isobus_vt_gettextfontdata_typeattributes;
286 static int hf_isobus_vt_gettextfontdata_typeattributes_boldtext;
287 static int hf_isobus_vt_gettextfontdata_typeattributes_crossedouttext;
288 static int hf_isobus_vt_gettextfontdata_typeattributes_underlinedtext;
289 static int hf_isobus_vt_gettextfontdata_typeattributes_italicstext;
290 static int hf_isobus_vt_gettextfontdata_typeattributes_invertedtext;
291 static int hf_isobus_vt_gettextfontdata_typeattributes_flashinverted;
292 static int hf_isobus_vt_gettextfontdata_typeattributes_flashhidden;
293 static int hf_isobus_vt_gettextfontdata_typeattributes_proportionalfontrendering;
294 static int hf_isobus_vt_getwindowmaskdata_backgroundcolourdatamask;
295 static int hf_isobus_vt_getwindowmaskdata_backgroundcoloursoftkeymask;
296 static int hf_isobus_vt_getsupportedobjects_numberofbytes;
297 static int hf_isobus_vt_getsupportedobjects_objecttype;
298 static int hf_isobus_vt_gethardware_boottime;
299 static int hf_isobus_vt_gethardware_graphictype;
300 static int hf_isobus_vt_gethardware_hardware;
301 static int hf_isobus_vt_gethardware_hardware_touchscreen;
302 static int hf_isobus_vt_gethardware_hardware_pointingdevice;
303 static int hf_isobus_vt_gethardware_hardware_multifreqaudiooutput;
304 static int hf_isobus_vt_gethardware_hardware_adjustvolumeaudiooutput;
305 static int hf_isobus_vt_gethardware_hardware_simultaneousactivationphysicalsoftkeys;
306 static int hf_isobus_vt_gethardware_hardware_simultaneousactivationbuttons;
307 static int hf_isobus_vt_gethardware_hardware_dragoperation;
308 static int hf_isobus_vt_gethardware_hardware_intermediatecoordinatesdrag;
309 static int hf_isobus_vt_gethardware_xpixels;
310 static int hf_isobus_vt_gethardware_ypixels;
311 static int hf_isobus_vt_storeversion_versionlabel;
312 static int hf_isobus_vt_storeversion_errorcodes;
313 static int hf_isobus_vt_loadversion_versionlabel;
314 static int hf_isobus_vt_loadversion_errorcodes;
315 static int hf_isobus_vt_deleteversion_versionlabel;
316 static int hf_isobus_vt_deleteversion_errorcodes;
317 static int hf_isobus_vt_extendedgetversions_numberofversions;
318 static int hf_isobus_vt_extendedgetversions_versionlabel;
319 static int hf_isobus_vt_extendedstoreversion_versionlabel;
320 static int hf_isobus_vt_extendedstoreversion_errorcodes;
321 static int hf_isobus_vt_extendedloadversion_versionlabel;
322 static int hf_isobus_vt_extendedloadversion_errorcodes;
323 static int hf_isobus_vt_extendeddeleteversion_versionlabel;
324 static int hf_isobus_vt_extendeddeleteversion_errorcodes;
325 static int hf_isobus_vt_getversions_numberofversions;
326 static int hf_isobus_vt_getversions_versionlabel;
327 static int hf_isobus_vt_unsupportedvtfunction_unsupportedvtfunction;
328 static int hf_isobus_vt_vtstatus_workingsetmaster;
329 static int hf_isobus_vt_vtstatus_objectiddatamask;
330 static int hf_isobus_vt_vtstatus_objectidsoftkeymask;
331 static int hf_isobus_vt_vtstatus_vtbusycodes;
332 static int hf_isobus_vt_vtstatus_vtbusycodes_updatingvisiblemask;
333 static int hf_isobus_vt_vtstatus_vtbusycodes_savingdata;
334 static int hf_isobus_vt_vtstatus_vtbusycodes_executingcommand;
335 static int hf_isobus_vt_vtstatus_vtbusycodes_executingmacro;
336 static int hf_isobus_vt_vtstatus_vtbusycodes_parsingobjectpool;
337 static int hf_isobus_vt_vtstatus_vtbusycodes_auxcontrolsactive;
338 static int hf_isobus_vt_vtstatus_vtbusycodes_outofmemory;
339 static int hf_isobus_vt_vtstatus_vtfunctioncodes;
340 static int hf_isobus_vt_wrksetmain_bitmask;
341 static int hf_isobus_vt_wrksetmain_version;
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
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 }
492 static value_string_ext vt_function_code_ext = VALUE_STRING_EXT_INIT(vt_function_code);
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
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 }
540 static value_string_ext graphics_context_sub_command_id_ext = VALUE_STRING_EXT_INIT(graphics_context_sub_command_id);
542 static const value_string vt_hide_show_action[] = {
543 { 0, "Hide" },
544 { 1, "Show" },
545 { 0, NULL }
548 static const value_string vt_hide_show_action_info[] = {
549 { 0, "hidden" },
550 { 1, "shown" },
551 { 0, NULL }
554 static const value_string vt_enable_disable_action[] = {
555 { 0, "Disable" },
556 { 1, "Enable" },
557 { 0, NULL }
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 }
582 #define KEY_RELEASED 0
583 #define KEY_PRESSED 1
584 #define KEY_STILL_PRESSED 2
585 #define KEY_PRESS_ABORTED 3
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 }
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 }
603 #define BUTTON_RELEASED 0
604 #define BUTTON_PRESSED 1
605 #define BUTTON_STILL_HELD 2
606 #define BUTTON_PRESS_ABORTED 3
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 }
616 #define TOUCH_RELEASED 0
617 #define TOUCH_PRESSED 1
618 #define TOUCH_HELD 2
620 static const value_string pointing_touch_state[] = {
621 { TOUCH_RELEASED, "Released" },
622 { TOUCH_PRESSED, "Pressed" },
623 { TOUCH_HELD, "Held" },
624 { 0, NULL }
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 }
634 static const value_string selection[] = {
635 { 0, "Object is deselected" },
636 { 1, "Object is selected (has focus)" },
637 { 0, NULL }
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 }
650 static const value_string line_direction[] = {
651 { 0, "Top left to bottom right" },
652 { 1, "Bottom left to top right" },
653 { 0, NULL }
656 #define MASK_UNLOCK 0
657 #define MASK_LOCK 1
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 }
665 #define ENOUGH_MEMORY 0
666 #define NOT_ENOUGH_MEMORY 1
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 }
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 }
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 }
750 static const value_string graphic_types[] = {
751 { 0, "Monochrome" },
752 { 1, "16 Colour" },
753 { 2, "256 Colour" },
754 { 0, NULL }
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 }
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 }
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 }
777 static const value_string auxiliary_assigned_attributes[] = {
778 { 0, "auxiliary input" },
779 { 1, "auxiliary function" },
780 { 2, "Input is assigned" },
781 { 0, NULL }
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 },
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 }
797 static const value_string draw_text_background[] = {
798 { 0, "Opaque" },
799 { 1, "Transparent" },
800 { 0, NULL }
803 static value_string object_id_strings[MAX_OBJECT_ID_DB_SIZE];
805 /* Initialize the subtree pointers */
806 static int ett_isobus_vt;
807 static int ett_isobus_vt_vtstatus_busycodes_subtree;
808 static int ett_isobus_vt_getsupportedwidechars_range;
809 static int ett_isobus_vt_gettextfontdata_smallfontsizes;
810 static int ett_isobus_vt_gettextfontdata_largefontsizes;
811 static int ett_isobus_vt_gettextfontdata_typeattributes;
812 static int ett_isobus_vt_gethardware_hardware;
813 static int ett_isobus_vt_preferredassignment_inputunit;
814 static int ett_isobus_vt_preferredassignment_inputunit_preferredfunction;
815 static int ett_isobus_vt_auxiliarycapabilities_inputunit;
816 static int ett_isobus_vt_auxiliarycapabilities_inputunit_set;
817 static int ett_isobus_vt_auxiliaryassignmenttype2_flags;
818 static int ett_isobus_vt_auxiliaryinputtype2status_operatingstate;
820 static const char *object_id_translation = "";
822 enum vt_direction
824 vt_to_ecu,
825 ecu_to_vt
828 static const char* get_object_id_string(uint16_t object_id)
830 const char* translated_string;
831 if(object_id == 0xFFFF)
833 return "NULL Object ID";
836 translated_string = val_to_str(object_id, object_id_strings, "Object ID 0x%04X");
837 return translated_string;
840 static int
841 dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_direction direction)
843 int offset = 0;
844 uint32_t function_id;
845 proto_item *ti;
847 ti = proto_tree_add_item(tree,
848 hf_isobus_vt, tvb, 0, 0, ENC_NA);
849 proto_item_set_hidden(ti);
851 proto_tree_add_item_ret_uint(tree,
852 hf_isobus_vt_command, tvb, offset, 1, ENC_LITTLE_ENDIAN, &function_id);
853 offset += 1;
855 switch(function_id)
857 case VT_SOFT_KEY_ACTIVATION:
859 uint32_t key_activation_code, object_id, parent_object_id;
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;
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;
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;
879 proto_tree_add_item(tree,
880 hf_isobus_vt_softkey_keynumber, tvb, offset, 1, ENC_LITTLE_ENDIAN);
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_const(key_activation_code, key_activation_codes_info_postfix, "unknown action"));
886 break;
887 case VT_BUTTON_ACTIVATION:
889 uint32_t key_activation_code, object_id, parent_object_id;
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;
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;
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;
909 proto_tree_add_item(tree,
910 hf_isobus_vt_button_keynumber, tvb, offset, 1, ENC_LITTLE_ENDIAN);
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_const(key_activation_code, key_activation_codes_info_postfix, "unknown action"));
916 break;
917 case VT_POINTING_EVENT:
919 uint32_t x_position, y_position, touch_state = 0;
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;
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;
929 if(current_vt_version >= 4)
931 proto_tree_add_item_ret_uint(tree,
932 hf_isobus_vt_pointing_touchstate, tvb, offset, 1, ENC_LITTLE_ENDIAN, &touch_state);
935 col_append_fstr(pinfo->cinfo, COL_INFO, "Touch at [%d;%d]",
936 x_position, y_position);
938 if(current_vt_version >= 4)
940 col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str_const(touch_state, pointing_touch_state_info_postfix, "unknown action"));
943 break;
944 case VT_VT_SELECT_INPUT_OBJECT:
946 uint32_t object_id;
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;
955 proto_tree_add_item(tree,
956 hf_isobus_vt_vtselectinputobject_selection, tvb, offset, 1, ENC_LITTLE_ENDIAN);
957 offset += 1;
959 if(current_vt_version >= 4)
961 proto_tree_add_item(tree,
962 hf_isobus_vt_vtselectinputobject_openforinput, tvb, offset, 1, ENC_LITTLE_ENDIAN);
965 col_append_fstr(pinfo->cinfo, COL_INFO, "%s was selected by VT", get_object_id_string(object_id));
967 break;
968 case VT_VT_ESC_MESSAGE:
970 uint32_t object_id;
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;
979 if(direction == vt_to_ecu)
981 uint32_t error_codes;
983 ti = proto_tree_add_item_ret_uint(tree,
984 hf_isobus_vt_vtescmessage_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
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 ");
992 col_append_fstr(pinfo->cinfo, COL_INFO, "ESC button was pressed while %s was selected", get_object_id_string(object_id));
994 else
996 col_append_str(pinfo->cinfo, COL_INFO, "ESC button press was successfully received");
999 break;
1000 case VT_VT_CHANGE_NUMERIC_VALUE:
1002 uint32_t object_id, value;
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;
1011 offset += 1; /* byte 4 is reserved */
1013 proto_tree_add_item_ret_uint(tree,
1014 hf_isobus_vt_vtchgnumval_value, tvb, offset, 4, ENC_LITTLE_ENDIAN, &value);
1016 if(direction == ecu_to_vt)
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);
1021 else
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);
1027 break;
1028 case VT_VT_CHANGE_ACTIVE_MASK:
1030 uint32_t mask_object_id;
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;
1039 if(direction == vt_to_ecu)
1041 uint32_t error_object_id, error_codes;
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;
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;
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);
1069 if(error_codes)
1071 col_append_fstr(pinfo->cinfo, COL_INFO, "VT Active mask changed to %s",
1072 get_object_id_string(mask_object_id));
1074 else
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));
1080 else
1082 col_append_fstr(pinfo->cinfo, COL_INFO, "VT Active mask change to %s acknowledged",
1083 get_object_id_string(mask_object_id));
1086 break;
1087 case VT_VT_CHANGE_STRING_VALUE:
1089 if(direction == vt_to_ecu)
1091 unsigned encoding = ENC_ASCII|ENC_NA;
1092 uint32_t object_id, str_length;
1093 uint16_t firstTwoBytesString;
1094 const uint8_t* value;
1095 unsigned bomOffset = 0;
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;
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;
1108 firstTwoBytesString = tvb_get_letohs(tvb,offset);
1109 if(firstTwoBytesString == 0xFEFF)
1111 encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
1112 bomOffset = 2;
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);
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);
1122 else
1124 uint32_t object_id;
1126 offset += 2; /* first two bytes are reserved */
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);
1134 col_append_fstr(pinfo->cinfo, COL_INFO, "VT String value change of %s acknowledged",
1135 get_object_id_string(object_id));
1138 break;
1139 case VT_VT_ON_USER_LAYOUT_HIDE_SHOW:
1141 uint32_t object_id[2], status[2];
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;
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;
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;
1161 proto_tree_add_item_ret_uint(tree,
1162 hf_isobus_vt_vtonuserlayouthideshow_status_2, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status[1]);
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_const(status[0], vt_hide_show_action_info, "unknown"),
1166 get_object_id_string(object_id[1]), val_to_str_const(status[1], vt_hide_show_action_info, "unknown"));
1168 break;
1169 case VT_VT_CONTROL_AUDIO_SIGNAL_TERMINATION:
1171 uint32_t termination_cause;
1173 ti = proto_tree_add_item_ret_uint(tree,
1174 hf_isobus_vt_vtcontrolaudiosignaltermination_terminationcause, tvb, offset, 1, ENC_LITTLE_ENDIAN, &termination_cause);
1176 proto_item_append_text(ti, ": ");
1177 if (termination_cause & 0x01)
1179 proto_item_append_text(ti, "Audio was terminated ");
1180 col_append_str(pinfo->cinfo, COL_INFO, "VT Control audio signal termination: Audio was terminated");
1182 else
1184 col_append_str(pinfo->cinfo, COL_INFO, "VT Control audio signal termination: Error in message");
1187 break;
1188 case VT_END_OF_OBJECT_POOL:
1190 if(direction == vt_to_ecu)
1192 uint32_t error_codes, obj_pool_error_codes;
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;
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;
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;
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 ");
1231 if(error_codes & 0x01)
1233 col_append_str(pinfo->cinfo, COL_INFO, "End of object pool received, object pool contains errors");
1235 else if(error_codes & 0x02)
1237 col_append_str(pinfo->cinfo, COL_INFO, "End of object pool received, but VT ran out of memory");
1239 else
1241 col_append_str(pinfo->cinfo, COL_INFO, "End of object pool received, object pool accepted");
1245 break;
1246 case VT_AUXILIARY_ASSIGNMENT_TYPE_1:
1248 uint32_t source_address, aux_input_number, object_id;
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;
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;
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);
1264 if(direction == ecu_to_vt)
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));
1269 else
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));
1275 break;
1276 case VT_AUXILIARY_INPUT_TYPE_1_STATUS:
1278 uint32_t input_number, boolean_value, analyze_value;
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;
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;
1288 proto_tree_add_item(tree,
1289 hf_isobus_vt_auxiliaryinputtype1status_numberoftransitions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1290 offset += 2;
1292 proto_tree_add_item_ret_uint(tree,
1293 hf_isobus_vt_auxiliaryinputtype1status_booleanvalue, tvb, offset, 1, ENC_LITTLE_ENDIAN, &boolean_value);
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_const(boolean_value, auxiliary_boolean_value, "unknown"));
1299 break;
1300 case VT_PREFERRED_ASSIGNMENT:
1302 if(direction == ecu_to_vt)
1304 uint32_t number_of_input_units, i;
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;
1310 for(i = 0; i < number_of_input_units; i++)
1312 proto_item *input_unit_item;
1313 proto_tree *input_unit_subtree;
1314 uint32_t number_of_preferred_functions, j, model_identification_code;
1315 uint64_t name;
1317 input_unit_subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_isobus_vt_preferredassignment_inputunit, &input_unit_item, "Input Unit");
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;
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;
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;
1331 proto_item_set_text(input_unit_item, "Input Unit name 0x%" PRIX64 " 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));
1334 for(j = 0; j < number_of_preferred_functions; j++)
1336 proto_item *preferred_function_item;
1337 proto_tree *preferred_function_subtree;
1338 uint32_t auxiliary_function_object_id, auxiliary_input_object_id;
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");
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;
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;
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));
1361 col_append_str(pinfo->cinfo, COL_INFO, "Create preferred assignment");
1363 else
1365 uint32_t error_codes, faulty_auxiliary_function_object_id;
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;
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);
1388 if(error_codes)
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));
1392 else
1394 col_append_str(pinfo->cinfo, COL_INFO, "Successfully created preferred assignment");
1398 break;
1399 case VT_AUXILIARY_INPUT_TYPE_2_MAINTENANCE:
1401 if(direction == ecu_to_vt)
1403 uint32_t model_identification_code, status;
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;
1409 proto_tree_add_item_ret_uint(tree,
1410 hf_isobus_vt_auxiliaryinputtype2maintenance_status, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status);
1412 if(status == 0)
1414 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input Type 2 Maintenance: Model Identification Code %u, Status is Initializing",
1415 model_identification_code);
1417 else
1419 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input Type 2 Maintenance: Model Identification Code %u, Status is Ready",
1420 model_identification_code);
1424 break;
1425 case VT_AUXILIARY_ASSIGNMENT_TYPE_2:
1427 uint32_t error_codes, auxiliary_input_object_id = 0, auxiliary_function_object_id;
1428 uint64_t name = 0;
1430 if(direction == ecu_to_vt)
1432 proto_tree *flags_subtree;
1434 proto_tree_add_item_ret_uint64(tree,
1435 hf_isobus_vt_auxiliaryassignmenttype2_name, tvb, offset, 8, ENC_LITTLE_ENDIAN, &name);
1436 offset += 8;
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;
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;
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;
1464 if(direction == vt_to_ecu)
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 ");
1475 if(direction == ecu_to_vt)
1477 col_append_fstr(pinfo->cinfo, COL_INFO, "Assign %s of name 0x%" PRIX64 " to function %s",
1478 get_object_id_string(auxiliary_input_object_id), name, get_object_id_string(auxiliary_function_object_id));
1480 else if(direction == vt_to_ecu)
1482 if(error_codes)
1484 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while assigning function %s",
1485 get_object_id_string(auxiliary_function_object_id));
1487 else
1489 col_append_fstr(pinfo->cinfo, COL_INFO, "Successfully assigned function %s",
1490 get_object_id_string(auxiliary_function_object_id));
1494 break;
1495 case VT_AUXILIARY_INPUT_STATUS_TYPE_2_ENABLE:
1497 uint32_t enable, status, error_codes, auxiliary_input_object_id;
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;
1506 if(direction == ecu_to_vt)
1508 proto_tree_add_item_ret_uint(tree,
1509 hf_isobus_vt_auxiliaryinputstatustype2enable_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN, &enable);
1511 else
1513 proto_tree_add_item_ret_uint(tree,
1514 hf_isobus_vt_auxiliaryinputstatustype2enable_status, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status);
1515 offset += 1;
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 ");
1526 if(direction == ecu_to_vt)
1528 if(enable == 0)
1530 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input %s should be disabled",
1531 get_object_id_string(auxiliary_input_object_id));
1533 else
1535 col_append_fstr(pinfo->cinfo, COL_INFO, "Auxiliary Input %s should be enabled",
1536 get_object_id_string(auxiliary_input_object_id));
1539 else
1541 if(error_codes)
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));
1546 else
1548 if (status == 0)
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));
1553 else if (status == 1)
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));
1561 break;
1562 case VT_AUXILIARY_INPUT_TYPE_2_STATUS:
1564 uint32_t auxiliary_input_object_id, value_1, value_2;
1565 proto_tree* operating_state_subtree;
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;
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;
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;
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);
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);
1595 break;
1596 case VT_AUXILIARY_CAPABILITIES:
1598 if(direction == ecu_to_vt)
1600 uint32_t request_type;
1602 proto_tree_add_item_ret_uint(tree,
1603 hf_isobus_vt_auxiliarycapabilities_requesttype, tvb, offset, 1, ENC_LITTLE_ENDIAN, &request_type);
1605 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
1606 val_to_str_const(request_type, auxiliary_capabilities_request_type, "Request capabilities of Unknown"));
1608 else
1610 uint32_t number_of_auxiliary_units, i;
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;
1616 for(i = 0; i < number_of_auxiliary_units; i++)
1618 proto_item *input_unit_item;
1619 proto_tree *input_unit_subtree;
1620 uint32_t number_of_different_sets, j;
1621 uint64_t name;
1623 input_unit_subtree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_isobus_vt_auxiliarycapabilities_inputunit, &input_unit_item, "Auxiliary Unit");
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;
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;
1633 proto_item_set_text(input_unit_item, "Auxiliary unit name 0x%" PRIX64, name);
1634 proto_item_set_len(input_unit_item, 8 + 1 + (3 * number_of_different_sets));
1636 for(j = 0; j < number_of_different_sets; j++)
1638 proto_item *auxiliary_unit_set;
1639 proto_tree *preferred_function_subtree;
1640 uint32_t number_of_instances, function_attribute, assigned_attribute;
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");
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;
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;
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;
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_const(assigned_attribute, auxiliary_assigned_attributes, "unknown"));
1660 col_append_str(pinfo->cinfo, COL_INFO, "Received Auxiliary Capabilities");
1663 break;
1664 case VT_ESC:
1665 if(direction == vt_to_ecu)
1667 uint32_t object_id, error_codes;
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;
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 ");
1684 if(error_codes)
1686 col_append_fstr(pinfo->cinfo, COL_INFO, "ESC successful, %s", get_object_id_string(object_id));
1688 else
1690 col_append_str(pinfo->cinfo, COL_INFO, "ESC error");
1693 else
1695 col_append_str(pinfo->cinfo, COL_INFO, "End of object pool received, object pool accepted");
1697 break;
1698 case VT_HIDE_SHOW_OBJECT:
1700 uint32_t object_id, action;
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;
1709 proto_tree_add_item_ret_uint(tree,
1710 hf_isobus_vt_hideshowobj_action, tvb, offset, 1, ENC_LITTLE_ENDIAN, &action);
1711 offset += 1;
1713 if(direction == vt_to_ecu)
1715 uint32_t 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);
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 ");
1729 if(error_codes)
1731 col_append_str(pinfo->cinfo, COL_INFO, "Hide Show Error");
1733 else
1735 switch(action)
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;
1748 else
1750 switch(action)
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;
1763 break;
1764 case VT_ENABLE_DISABLE_COMMAND:
1766 uint32_t object_id, enable_disable;
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;
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;
1779 if(direction == ecu_to_vt)
1781 switch(enable_disable)
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;
1793 else
1795 uint32_t error_codes;
1797 ti = proto_tree_add_item_ret_uint(tree,
1798 hf_isobus_vt_enabledisableobj_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
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 ");
1810 if(error_codes)
1812 col_append_str(pinfo->cinfo, COL_INFO, "Enable Disable Error");
1814 else
1816 switch(enable_disable)
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;
1831 break;
1832 case VT_SELECT_INPUT_OBJECT:
1834 uint32_t object_id;
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;
1843 if(direction == ecu_to_vt)
1845 proto_tree_add_item(tree,
1846 hf_isobus_vt_selectinputobject_option, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1848 col_append_fstr(pinfo->cinfo, COL_INFO, "%s should be selected for input",
1849 get_object_id_string(object_id));
1851 else
1853 uint32_t response, error_codes;
1855 proto_tree_add_item_ret_uint(tree,
1856 hf_isobus_vt_selectinputobject_response, tvb, offset, 1, ENC_LITTLE_ENDIAN, &response);
1857 offset += 1;
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 ");
1875 if(error_codes)
1877 col_append_str(pinfo->cinfo, COL_INFO, "Error while selecting input object");
1879 else
1881 switch(response)
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;
1899 break;
1900 case VT_CONTROL_AUDIO_SIGNAL:
1902 if(direction == ecu_to_vt)
1904 uint32_t activations, frequency, ontime, offtime;
1906 proto_tree_add_item_ret_uint(tree,
1907 hf_isobus_vt_controlaudiosignal_activations, tvb, offset, 1, ENC_LITTLE_ENDIAN, &activations);
1908 offset += 1;
1910 proto_tree_add_item_ret_uint(tree,
1911 hf_isobus_vt_controlaudiosignal_frequency, tvb, offset, 2, ENC_LITTLE_ENDIAN, &frequency);
1912 offset += 2;
1914 proto_tree_add_item_ret_uint(tree,
1915 hf_isobus_vt_controlaudiosignal_ontime, tvb, offset, 2, ENC_LITTLE_ENDIAN, &ontime);
1916 offset += 2;
1918 proto_tree_add_item_ret_uint(tree,
1919 hf_isobus_vt_controlaudiosignal_offtime, tvb, offset, 2, ENC_LITTLE_ENDIAN, &offtime);
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);
1924 else
1926 uint32_t 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);
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 ");
1936 if(error_codes)
1938 col_append_str(pinfo->cinfo, COL_INFO, "Control audio signal Error");
1940 else
1942 col_append_str(pinfo->cinfo, COL_INFO, "Control audio signal successful");
1946 break;
1947 case VT_SET_AUDIO_VOLUME:
1949 if(direction == ecu_to_vt)
1951 uint32_t volume;
1952 proto_tree_add_item_ret_uint(tree,
1953 hf_isobus_vt_setaudiovolume_volume, tvb, offset, 1, ENC_LITTLE_ENDIAN, &volume);
1955 col_append_fstr(pinfo->cinfo, COL_INFO, "Set audio volume to %d%%", volume);
1957 else
1959 uint32_t 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);
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 ");
1971 if(error_codes)
1973 col_append_str(pinfo->cinfo, COL_INFO, "Set audio volume Error");
1975 else
1977 col_append_str(pinfo->cinfo, COL_INFO, "Set audio volume successful");
1981 break;
1982 case VT_CHANGE_CHILD_LOCATION:
1984 uint32_t parent_object_id, object_id;
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;
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;
2000 if(direction == ecu_to_vt)
2002 uint32_t rel_x_location, rel_y_location;
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;
2008 proto_tree_add_item_ret_uint(tree,
2009 hf_isobus_vt_changechildlocation_relativeypos, tvb, offset, 1, ENC_LITTLE_ENDIAN, &rel_y_location);
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);
2014 else
2016 uint32_t 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);
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 ");
2028 if(error_codes)
2030 col_append_str(pinfo->cinfo, COL_INFO, "Change child location error");
2032 else
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));
2039 break;
2040 case VT_CHANGE_SIZE:
2042 uint32_t object_id;
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;
2051 if(direction == ecu_to_vt)
2053 uint32_t new_width, new_height;
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;
2059 proto_tree_add_item_ret_uint(tree,
2060 hf_isobus_vt_changesize_newheight, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_height);
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);
2065 else
2067 uint32_t 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);
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 ");
2077 if(error_codes)
2079 col_append_str(pinfo->cinfo, COL_INFO, "Change size error");
2081 else
2083 col_append_fstr(pinfo->cinfo, COL_INFO, "Change size of %s succeeded",
2084 get_object_id_string(object_id));
2088 break;
2089 case VT_CHANGE_BACKGROUND_COLOUR:
2091 uint32_t object_id, colour;
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;
2100 proto_tree_add_item_ret_uint(tree,
2101 hf_isobus_vt_changebackgroundcolour_colour, tvb, offset, 1, ENC_LITTLE_ENDIAN, &colour);
2102 offset += 1;
2104 if(direction == vt_to_ecu)
2106 uint32_t 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);
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 ");
2120 if(error_codes)
2122 col_append_str(pinfo->cinfo, COL_INFO, "Background colour change error");
2124 else
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_const(colour, vt_colours, "Unknown"));
2130 else
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_const(colour, vt_colours, "Unknown"));
2136 break;
2137 case VT_CHANGE_NUMERIC_VALUE:
2139 uint32_t object_id, error_codes, value;
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;
2148 if(direction == vt_to_ecu)
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;
2164 proto_tree_add_item_ret_uint(tree,
2165 hf_isobus_vt_chgnumval_value, tvb, offset, 4, ENC_LITTLE_ENDIAN, &value);
2167 if(direction == vt_to_ecu)
2169 if(error_codes)
2171 col_append_str(pinfo->cinfo, COL_INFO, "Numeric value change error");
2173 else
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);
2179 else
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);
2185 break;
2186 case VT_CHANGE_END_POINT:
2188 uint32_t object_id;
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;
2197 if(direction == ecu_to_vt)
2199 uint32_t width, height;
2201 proto_tree_add_item_ret_uint(tree,
2202 hf_isobus_vt_changeendpoint_width, tvb, offset, 2, ENC_LITTLE_ENDIAN, &width);
2203 offset += 2;
2205 proto_tree_add_item_ret_uint(tree,
2206 hf_isobus_vt_changeendpoint_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
2207 offset += 2;
2209 proto_tree_add_item(tree,
2210 hf_isobus_vt_changeendpoint_linedirection, tvb, offset, 1, ENC_LITTLE_ENDIAN);
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);
2216 break;
2217 case VT_CHANGE_FONT_ATTRIBUTES:
2219 uint32_t object_id;
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;
2228 if(direction == ecu_to_vt)
2230 proto_tree_add_item(tree,
2231 hf_isobus_vt_changefontattributes_fontcolour, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2232 offset += 1;
2234 proto_tree_add_item(tree,
2235 hf_isobus_vt_changefontattributes_fontsize, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2236 offset += 1;
2238 proto_tree_add_item(tree,
2239 hf_isobus_vt_changefontattributes_fonttype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2240 offset += 1;
2242 proto_tree_add_item(tree,
2243 hf_isobus_vt_changefontattributes_fontstyle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2245 col_append_fstr(pinfo->cinfo, COL_INFO, "Change font attributes of %s", get_object_id_string(object_id));
2247 else
2249 uint32_t error_codes;
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 ");
2267 if(error_codes == 0)
2269 col_append_fstr(pinfo->cinfo, COL_INFO, "Font attributes of %s successfully changed", get_object_id_string(object_id));
2271 else
2273 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing font attributes of %s", get_object_id_string(object_id));
2277 break;
2278 case VT_CHANGE_LINE_ATTRIBUTES:
2280 uint32_t object_id;
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;
2289 if(direction == ecu_to_vt)
2291 proto_tree_add_item(tree,
2292 hf_isobus_vt_changelineattributes_linecolour, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2293 offset += 1;
2295 proto_tree_add_item(tree,
2296 hf_isobus_vt_changelineattributes_linewidth, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2297 offset += 1;
2299 proto_tree_add_item(tree,
2300 hf_isobus_vt_changelineattributes_lineart, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2302 col_append_fstr(pinfo->cinfo, COL_INFO, "Change line attributes of %s", get_object_id_string(object_id));
2304 else
2306 uint32_t error_codes;
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 ");
2320 if(error_codes == 0)
2322 col_append_fstr(pinfo->cinfo, COL_INFO, "Line attributes of %s successfully changed", get_object_id_string(object_id));
2324 else
2326 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing line attributes of %s", get_object_id_string(object_id));
2330 break;
2331 case VT_CHANGE_FILL_ATTRIBUTES:
2333 uint32_t object_id;
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;
2342 if(direction == ecu_to_vt)
2344 proto_tree_add_item(tree,
2345 hf_isobus_vt_changefillattributes_filltype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2346 offset += 1;
2348 proto_tree_add_item(tree,
2349 hf_isobus_vt_changefillattributes_fillcolour, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2350 offset += 1;
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);
2358 col_append_fstr(pinfo->cinfo, COL_INFO, "Change fill attributes of %s", get_object_id_string(object_id));
2360 else
2362 uint32_t error_codes;
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 ");
2378 if(error_codes == 0)
2380 col_append_fstr(pinfo->cinfo, COL_INFO, "Fill attributes of %s successfully changed", get_object_id_string(object_id));
2382 else
2384 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing fill attributes of %s", get_object_id_string(object_id));
2388 break;
2389 case VT_CHANGE_ACTIVE_MASK:
2391 uint32_t working_set_object_id, new_active_mask_object_id, error_codes;
2393 if(direction == ecu_to_vt)
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;
2402 else
2404 working_set_object_id = 0;
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;
2414 if(direction == vt_to_ecu)
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 ");
2427 if(direction == ecu_to_vt)
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));
2431 else if(direction == vt_to_ecu)
2433 if(error_codes == 0)
2435 col_append_fstr(pinfo->cinfo, COL_INFO, "Active mask successfully changed to %s", get_object_id_string(new_active_mask_object_id));
2437 else
2439 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing active mask to %s", get_object_id_string(new_active_mask_object_id));
2443 break;
2444 case VT_CHANGE_SOFT_KEY_MASK:
2446 uint32_t error_codes, data_mask_object_id, new_soft_key_mask_object_id;
2448 if(direction == ecu_to_vt)
2450 proto_tree_add_item(tree,
2451 hf_isobus_vt_changesoftkeymask_masktype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2452 offset += 1;
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;
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;
2469 if(direction == vt_to_ecu)
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 ");
2486 if(direction == ecu_to_vt)
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));
2490 else if(direction == vt_to_ecu)
2492 if(error_codes == 0)
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));
2496 else
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));
2502 break;
2503 case VT_CHANGE_ATTRIBUTES:
2505 uint32_t attribute_id, error_codes, object_id, new_value;
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;
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;
2518 if(direction == ecu_to_vt)
2520 proto_tree_add_item_ret_uint(tree,
2521 hf_isobus_vt_changeattributes_newvalue, tvb, offset, 1, ENC_LITTLE_ENDIAN, &new_value);
2523 else if(direction == vt_to_ecu)
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 ");
2540 if(direction == ecu_to_vt)
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);
2544 else if(direction == vt_to_ecu)
2546 if(error_codes)
2548 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing Attribute ID %u of %s", attribute_id, get_object_id_string(object_id));
2550 else
2552 col_append_fstr(pinfo->cinfo, COL_INFO, "Attribute ID %u of %s has successfully changed", attribute_id, get_object_id_string(object_id));
2556 break;
2557 case VT_CHANGE_PRIORITY:
2559 uint32_t object_id, new_priority, error_codes;
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;
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;
2572 if(direction == vt_to_ecu)
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 ");
2585 if(direction == ecu_to_vt)
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);
2589 else if(direction == vt_to_ecu)
2591 if(error_codes)
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);
2595 else
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);
2601 break;
2602 case VT_CHANGE_LIST_ITEM:
2604 uint32_t list_object_id, new_object_id, list_index, error_codes;
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;
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;
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;
2624 if(direction == vt_to_ecu)
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 ");
2641 if(direction == ecu_to_vt)
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);
2645 else if(direction == vt_to_ecu)
2647 if(error_codes)
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);
2651 else
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);
2657 break;
2658 case VT_DELETE_OBJECT_POOL:
2660 if(direction == ecu_to_vt)
2662 col_append_str(pinfo->cinfo, COL_INFO, "Object pool should be deleted from volatile memory");
2664 else
2666 uint32_t error_codes;
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 ");
2676 if(error_codes)
2678 col_append_str(pinfo->cinfo, COL_INFO, "Error while deleting object pool from volatile memory");
2680 else
2682 col_append_str(pinfo->cinfo, COL_INFO, "Object pool was successfully deleted from volatile memory");
2686 break;
2687 case VT_CHANGE_STRING_VALUE:
2689 if(direction == ecu_to_vt)
2691 unsigned encoding = ENC_ASCII|ENC_NA;
2692 uint32_t object_id, str_length;
2693 uint16_t firstTwoBytesString;
2694 const uint8_t* value;
2695 unsigned bomOffset = 0;
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;
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;
2708 firstTwoBytesString = tvb_get_letohs(tvb,offset);
2709 if(firstTwoBytesString == 0xFEFF)
2711 encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
2712 bomOffset = 2;
2715 proto_tree_add_item_ret_string(tree,
2716 hf_isobus_vt_chgstrval_value, tvb, offset + bomOffset, str_length - bomOffset, encoding, pinfo->pool, &value);
2718 col_append_fstr(pinfo->cinfo, COL_INFO, "String value of %s should change to %s",
2719 get_object_id_string(object_id), value);
2721 else
2723 uint32_t object_id, error_codes;
2725 offset += 2; /*first two bytes are reserved*/
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;
2734 ti = proto_tree_add_item_ret_uint(tree,
2735 hf_isobus_vt_chgstrval_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
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 ");
2747 if(error_codes)
2749 col_append_str(pinfo->cinfo, COL_INFO, "String value change error");
2751 else
2753 col_append_fstr(pinfo->cinfo, COL_INFO, "String value of %s has changed",
2754 get_object_id_string(object_id));
2758 break;
2759 case VT_CHANGE_CHILD_POSITION:
2761 uint32_t parent_object_id, object_id;
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;
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;
2778 if(direction == ecu_to_vt)
2780 uint32_t rel_x_position, rel_y_position;
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;
2786 proto_tree_add_item_ret_uint(tree,
2787 hf_isobus_vt_changechildposition_ypos, tvb, offset, 2, ENC_LITTLE_ENDIAN, &rel_y_position);
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);
2792 else
2794 uint32_t 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);
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 ");
2806 if(error_codes)
2808 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while changing child position of %s", get_object_id_string(object_id));
2810 else
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));
2817 break;
2818 case VT_CHANGE_OBJECT_LABEL:
2820 if(direction == ecu_to_vt)
2822 uint32_t object_id, string_object_id;
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;
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;
2838 proto_tree_add_item(tree,
2839 hf_isobus_vt_changeobjectlabel_fonttype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2840 offset += 1;
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);
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));
2851 else
2853 uint32_t 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);
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 ");
2871 if(error_codes)
2873 col_append_str(pinfo->cinfo, COL_INFO, "Error while changing object label");
2875 else
2877 col_append_str(pinfo->cinfo, COL_INFO, "Object label successfully changed");
2881 break;
2882 case VT_CHANGE_POLYGON_POINT:
2884 uint32_t object_id;
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;
2893 if(direction == ecu_to_vt)
2895 uint32_t x_value, y_value, point_index;
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;
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;
2905 proto_tree_add_item_ret_uint(tree,
2906 hf_isobus_vt_changepolygonpoint_yvalue, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_value);
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);
2911 else
2913 uint32_t 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 ");
2924 if(error_codes)
2926 col_append_str(pinfo->cinfo, COL_INFO, "Error while changing polygon point");
2928 else
2930 col_append_str(pinfo->cinfo, COL_INFO, "Polygon point successfully changed");
2934 break;
2935 case VT_CHANGE_POLYGON_SCALE:
2937 uint32_t object_id, new_width, new_height, error_codes;
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;
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;
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;
2954 if(direction == vt_to_ecu)
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 ");
2965 if(direction == ecu_to_vt)
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);
2970 else if(direction == vt_to_ecu)
2972 if(error_codes)
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);
2977 else
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);
2984 break;
2985 case VT_GRAPHICS_CONTEXT:
2987 uint32_t object_id, sub_command_id;
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;
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;
3000 col_append_fstr(pinfo->cinfo, COL_INFO, "Graphic Context of %s: ", get_object_id_string(object_id));
3002 switch(sub_command_id)
3004 case SET_GRAPHICS_CURSOR:
3006 int32_t x_position, y_position;
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;
3012 proto_tree_add_item_ret_int(tree,
3013 hf_isobus_vt_graphicscontext_setgraphicscursor_yposition, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_position);
3015 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Graphics Cursor to Position [%d;%d] ",
3016 x_position, y_position);
3018 break;
3019 case MOVE_GRAPHICS_CURSOR:
3021 int32_t x_offset, y_offset;
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;
3027 proto_tree_add_item_ret_int(tree,
3028 hf_isobus_vt_graphicscontext_movegraphicscursor_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3030 col_append_fstr(pinfo->cinfo, COL_INFO, "Move Graphics Cursor by Offset [%d;%d] ",
3031 x_offset, y_offset);
3033 break;
3034 case SET_FOREGROUND_COLOUR:
3036 uint32_t colour;
3038 proto_tree_add_item_ret_uint(tree,
3039 hf_isobus_vt_graphicscontext_setforegroundcolour_colour, tvb, offset, 1, ENC_LITTLE_ENDIAN, &colour);
3041 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Foreground Colour to %u",
3042 colour);
3044 break;
3045 case SET_BACKGROUND_COLOUR:
3047 uint32_t colour;
3049 proto_tree_add_item_ret_uint(tree,
3050 hf_isobus_vt_graphicscontext_setbackgroundcolour_colour, tvb, offset, 1, ENC_LITTLE_ENDIAN, &colour);
3052 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Background Colour to %u",
3053 colour);
3055 break;
3056 case SET_LINE_ATTRIBUTES_OBJECT_ID:
3058 uint32_t line_attr_object_id;
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);
3066 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Line Attributes to %s",
3067 get_object_id_string(line_attr_object_id));
3069 break;
3070 case SET_FILL_ATTRIBUTES_OBJECT_ID:
3072 uint32_t fill_attr_object_id;
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);
3080 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Fill Attributes to %s",
3081 get_object_id_string(fill_attr_object_id));
3083 break;
3084 case SET_FONT_ATTRIBUTES_OBJECT_ID:
3086 uint32_t font_attr_object_id;
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);
3094 col_append_fstr(pinfo->cinfo, COL_INFO, "Set Font Attributes to %s",
3095 get_object_id_string(font_attr_object_id));
3097 break;
3098 case ERASE_RECTANGLE:
3100 uint32_t width, height;
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;
3106 proto_tree_add_item_ret_uint(tree,
3107 hf_isobus_vt_graphicscontext_eraserectangle_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
3109 col_append_fstr(pinfo->cinfo, COL_INFO, "Erase Rectangle width %u height %u",
3110 width, height);
3112 break;
3113 case DRAW_POINT:
3115 int32_t x_offset, y_offset;
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;
3121 proto_tree_add_item_ret_int(tree,
3122 hf_isobus_vt_graphicscontext_drawpoint_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3124 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw point at graphics cursor with offset [%d;%d] ",
3125 x_offset, y_offset);
3127 break;
3128 case DRAW_LINE:
3130 int32_t x_offset, y_offset;
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;
3136 proto_tree_add_item_ret_int(tree,
3137 hf_isobus_vt_graphicscontext_drawline_yoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_offset);
3139 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw line from graphics cursor to offset [%d;%d] ",
3140 x_offset, y_offset);
3142 break;
3143 case DRAW_RECTANGLE:
3145 uint32_t width, height;
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;
3151 proto_tree_add_item_ret_uint(tree,
3152 hf_isobus_vt_graphicscontext_drawrectangle_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
3154 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw Rectangle width %u height %u",
3155 width, height);
3157 break;
3158 case DRAW_CLOSED_ELLIPSE:
3160 uint32_t width, height;
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;
3166 proto_tree_add_item_ret_uint(tree,
3167 hf_isobus_vt_graphicscontext_drawclosedellipse_height, tvb, offset, 2, ENC_LITTLE_ENDIAN, &height);
3169 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw Closed Ellipse width %u height %u",
3170 width, height);
3172 break;
3173 case DRAW_POLYGON:
3175 uint32_t number_of_points, i;
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;
3181 for(i = 0; i < number_of_points; i++)
3183 proto_item *point_item;
3184 proto_tree *point_subtree;
3185 int32_t x_offset, y_offset;
3187 point_subtree = proto_tree_add_subtree(tree,
3188 tvb, offset, 4, ett_isobus_vt_getsupportedwidechars_range, &point_item, "Point");
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;
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;
3198 proto_item_set_text(point_item, "Point with offset [%d;%d]", x_offset, y_offset);
3201 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw Polygon of %u points",
3202 number_of_points);
3204 break;
3205 case DRAW_TEXT:
3207 unsigned encoding = ENC_ASCII|ENC_NA;
3208 uint16_t firstTwoBytesString;
3209 unsigned bomOffset = 0;
3210 uint32_t background, number_of_bytes;
3211 const uint8_t* value;
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;
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;
3221 firstTwoBytesString = tvb_get_letohs(tvb,offset);
3222 if(firstTwoBytesString == 0xFEFF)
3224 encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
3225 bomOffset = 2;
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);
3231 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw string \"%s\" at cursor with a %s background",
3232 value, val_to_str_const(background, draw_text_background, "unknown"));
3234 break;
3235 case PAN_VIEWPORT:
3237 int32_t viewport_x, viewport_y;
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;
3243 proto_tree_add_item_ret_int(tree,
3244 hf_isobus_vt_graphicscontext_panviewport_viewporty, tvb, offset, 2, ENC_LITTLE_ENDIAN, &viewport_y);
3246 col_append_fstr(pinfo->cinfo, COL_INFO, "Pan Viewport by [%d;%d] pixels",
3247 viewport_x, viewport_y);
3249 break;
3250 case ZOOM_VIEWPORT:
3252 float zoom_value;
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);
3258 col_append_fstr(pinfo->cinfo, COL_INFO, "Zoom Viewport by %g",
3259 zoom_value);
3261 break;
3262 case PAN_AND_ZOOM_VIEWPORT:
3264 float zoom_value;
3265 int32_t viewport_x, viewport_y;
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;
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;
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);
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);
3282 break;
3283 case CHANGE_VIEWPORT_SIZE:
3285 uint32_t new_width, new_height;
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;
3291 proto_tree_add_item_ret_uint(tree,
3292 hf_isobus_vt_graphicscontext_changeviewportsize_newheight, tvb, offset, 2, ENC_LITTLE_ENDIAN, &new_height);
3294 col_append_fstr(pinfo->cinfo, COL_INFO, "Change viewport size to [%ux%u]",
3295 new_width, new_height);
3297 break;
3298 case DRAW_VT_OBJECT:
3300 uint32_t draw_object_id;
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);
3308 col_append_fstr(pinfo->cinfo, COL_INFO, "Draw VT %s at graphics cursor",
3309 get_object_id_string(draw_object_id));
3311 break;
3312 case COPY_CANVAS_TO_PICTURE_GRAPHIC:
3314 uint32_t object_id_picture_graphic;
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);
3322 col_append_fstr(pinfo->cinfo, COL_INFO, "Copy canvas to picture graphics %s",
3323 get_object_id_string(object_id_picture_graphic));
3325 break;
3326 case COPY_VIEWPORT_TO_PICTURE_GRAPHIC:
3328 uint32_t object_id_picture_graphic;
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);
3336 col_append_fstr(pinfo->cinfo, COL_INFO, "Copy viewport to picture graphics %s",
3337 get_object_id_string(object_id_picture_graphic));
3339 break;
3342 break;
3343 case VT_GET_ATTRIBUTE_VALUE:
3345 bool error_frame;
3346 uint32_t attribute_id, object_id;
3348 object_id = tvb_get_letohs(tvb, offset);
3349 if(direction == ecu_to_vt || object_id != 0xFFFF)
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);
3358 else
3360 error_frame = true;
3362 offset += 2;
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;
3368 if(direction == vt_to_ecu)
3370 if(error_frame == false)
3372 uint32_t value;
3373 proto_tree_add_item_ret_uint(tree,
3374 hf_isobus_vt_getattributevalue_value, tvb, offset, 4, ENC_LITTLE_ENDIAN, &value);
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);
3379 else
3381 uint32_t error_codes;
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;
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 ");
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));
3404 else
3406 col_append_fstr(pinfo->cinfo, COL_INFO, "Get value of attribute %u from %s ",
3407 attribute_id, get_object_id_string(object_id));
3410 break;
3411 case VT_SELECT_COLOUR_MAP:
3413 uint32_t error_codes, object_id;
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;
3422 if(direction == vt_to_ecu)
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 ");
3435 if(direction == ecu_to_vt)
3437 col_append_fstr(pinfo->cinfo, COL_INFO, "Select colour map %s ",
3438 get_object_id_string(object_id));
3440 else if(direction == vt_to_ecu)
3442 if(error_codes)
3444 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while selecting colour map %s ",
3445 get_object_id_string(object_id));
3447 else
3449 col_append_fstr(pinfo->cinfo, COL_INFO, "Colour map %s successfully selected ",
3450 get_object_id_string(object_id));
3454 break;
3455 case VT_IDENTIFY_VT:
3457 if(direction == ecu_to_vt)
3459 col_append_str(pinfo->cinfo, COL_INFO, "Identify VT");
3461 else
3463 col_append_str(pinfo->cinfo, COL_INFO, "Reply Identify VT ");
3466 break;
3467 case VT_EXECUTE_EXTENDED_MACRO:
3469 uint32_t error_codes, object_id;
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;
3478 if(direction == vt_to_ecu)
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 ");
3491 if(direction == ecu_to_vt)
3493 col_append_fstr(pinfo->cinfo, COL_INFO, "Execute extended macro %s ",
3494 get_object_id_string(object_id));
3496 else if(direction == vt_to_ecu)
3498 if(error_codes)
3500 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while executing extended macro %s ",
3501 get_object_id_string(object_id));
3503 else
3505 col_append_fstr(pinfo->cinfo, COL_INFO, "Extended macro %s successfully executed ",
3506 get_object_id_string(object_id));
3510 break;
3511 case VT_LOCK_UNLOCK_MASK:
3513 uint32_t command, error_codes, object_id, lock_timeout;
3515 proto_tree_add_item_ret_uint(tree,
3516 hf_isobus_vt_lockunlockmask_command, tvb, offset, 1, ENC_LITTLE_ENDIAN, &command);
3517 offset += 1;
3519 if(direction == ecu_to_vt)
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;
3528 if(command == MASK_LOCK)
3530 proto_tree_add_item_ret_uint(tree,
3531 hf_isobus_vt_lockunlockmask_locktimeout, tvb, offset, 2, ENC_LITTLE_ENDIAN, &lock_timeout);
3534 else
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 ");
3557 if(direction == ecu_to_vt)
3559 if(command == MASK_LOCK)
3561 col_append_fstr(pinfo->cinfo, COL_INFO, "Lock data mask %s for %ums ",
3562 get_object_id_string(object_id), lock_timeout);
3564 else if(command == MASK_UNLOCK)
3566 col_append_fstr(pinfo->cinfo, COL_INFO, "Unlock data mask %s ",
3567 get_object_id_string(object_id));
3570 else if(direction == vt_to_ecu)
3572 if(error_codes)
3574 if(command == MASK_LOCK)
3576 col_append_str(pinfo->cinfo, COL_INFO, "Error while locking ");
3578 else if(command == MASK_UNLOCK)
3580 col_append_str(pinfo->cinfo, COL_INFO, "Error while unlocking ");
3583 else
3585 if(command == MASK_LOCK)
3587 col_append_str(pinfo->cinfo, COL_INFO, "Locking successful ");
3589 else if(command == MASK_UNLOCK)
3591 col_append_str(pinfo->cinfo, COL_INFO, "Unlocking successful ");
3596 break;
3597 case VT_EXECUTE_MACRO:
3599 uint32_t object_id;
3600 uint32_t error_codes;
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;
3610 if(direction == vt_to_ecu)
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 ");
3623 if(direction == ecu_to_vt)
3625 col_append_fstr(pinfo->cinfo, COL_INFO, "Execute macro %s ",
3626 get_object_id_string(object_id));
3628 else if(direction == vt_to_ecu)
3630 if(error_codes)
3632 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while executing macro %s ",
3633 get_object_id_string(object_id));
3635 else
3637 col_append_fstr(pinfo->cinfo, COL_INFO, "Macro %s successfully executed ",
3638 get_object_id_string(object_id));
3642 break;
3643 case VT_GET_MEMORY:
3645 if(direction == ecu_to_vt)
3647 uint32_t memory_required;
3648 offset += 1; /* reserved byte */
3650 proto_tree_add_item_ret_uint(tree,
3651 hf_isobus_vt_getmemory_memoryrequired, tvb, offset, 4, ENC_LITTLE_ENDIAN, &memory_required);
3653 col_append_fstr(pinfo->cinfo, COL_INFO, "The amount of memory required is %u ",
3654 memory_required);
3656 else
3658 uint32_t vt_version, status;
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;
3664 proto_tree_add_item_ret_uint(tree,
3665 hf_isobus_vt_getmemory_status, tvb, offset, 1, ENC_LITTLE_ENDIAN, &status);
3667 if(status == ENOUGH_MEMORY)
3669 col_append_fstr(pinfo->cinfo, COL_INFO, "There can be enough memory, VT Version is %u ",
3670 vt_version);
3672 else
3674 col_append_fstr(pinfo->cinfo, COL_INFO, "There is not enough memory available, VT Version is %u ",
3675 vt_version);
3679 break;
3680 case VT_GET_SUPPORTED_WIDECHARS:
3682 uint32_t code_plane, first_widechar, last_widechar;
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;
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;
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;
3696 if(direction == vt_to_ecu)
3698 uint32_t error_codes, number_of_ranges, i;
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;
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;
3715 for(i = 0; i < number_of_ranges; i++)
3717 uint32_t first_avail_widechar, last_avail_widechar;
3718 proto_tree* subtree;
3719 proto_item* item;
3721 subtree = proto_tree_add_subtree_format(tree,
3722 tvb, offset, 4, ett_isobus_vt_getsupportedwidechars_range, &item, "Range");
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;
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;
3732 proto_item_set_text(item, "Range 0x%04X - 0x%04X", first_avail_widechar, last_avail_widechar);
3735 if(error_codes)
3737 col_append_fstr(pinfo->cinfo, COL_INFO, "Error while getting supported widechars for code plane %u ",
3738 code_plane);
3740 else
3742 col_append_fstr(pinfo->cinfo, COL_INFO, "Received supported widechars for code plane %u in %u range",
3743 code_plane, number_of_ranges);
3745 if(number_of_ranges > 1)
3747 col_append_str(pinfo->cinfo, COL_INFO, "s");
3751 else if(direction == ecu_to_vt)
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);
3757 break;
3758 case VT_GET_NUMBER_OF_SOFT_KEYS:
3760 if(direction == ecu_to_vt)
3762 col_append_str(pinfo->cinfo, COL_INFO, "Requesting number of soft keys");
3764 else
3766 uint32_t navigation_soft_keys, virtual_soft_keys, physical_soft_keys;
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;
3772 offset += 2; /* 2 reserved bytes */
3774 proto_tree_add_item(tree,
3775 hf_isobus_vt_getnumberofsoftkeys_xdots, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3776 offset += 1;
3778 proto_tree_add_item(tree,
3779 hf_isobus_vt_getnumberofsoftkeys_ydots, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3780 offset += 1;
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;
3786 proto_tree_add_item_ret_uint(tree,
3787 hf_isobus_vt_getnumberofsoftkeys_physicalsoftkeys, tvb, offset, 1, ENC_LITTLE_ENDIAN, &physical_soft_keys);
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);
3793 break;
3794 case VT_GET_TEXT_FONT_DATA:
3796 if(direction == ecu_to_vt)
3798 col_append_str(pinfo->cinfo, COL_INFO, "Requesting text font data");
3800 else if(direction == vt_to_ecu)
3802 proto_tree *ti_smallfonts_subtree, *ti_largefonts_subtree, *ti_typeattribute_subtree;
3803 proto_item *smallfonts_item, *largefonts_item, *typeattributes_item;
3805 offset += 4;
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;
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;
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);
3843 col_append_str(pinfo->cinfo, COL_INFO, "Text font data received");
3846 break;
3847 case VT_GET_WINDOW_MASK_DATA:
3849 if(direction == ecu_to_vt)
3851 col_append_str(pinfo->cinfo, COL_INFO, "Request window mask data");
3853 else
3855 uint32_t background_colour_data_mask, background_colour_soft_key_mask;
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;
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);
3864 col_append_fstr(pinfo->cinfo, COL_INFO, "Background colour of data mask is %s, soft key mask is %s",
3865 rval_to_str_const(background_colour_data_mask, vt_colours, "Unknown"),
3866 rval_to_str_const(background_colour_soft_key_mask, vt_colours, "Unknown"));
3869 break;
3870 case VT_GET_SUPPORTED_OBJECTS:
3872 if(direction == ecu_to_vt)
3874 col_append_str(pinfo->cinfo, COL_INFO, "Request supported objects");
3876 else
3878 uint32_t number_of_bytes, i;
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;
3884 for(i = 0; i < number_of_bytes; i++)
3886 uint8_t object_type;
3888 object_type = tvb_get_uint8(tvb, offset);
3889 if(object_type == 0xFF)
3891 break;
3894 proto_tree_add_item(tree,
3895 hf_isobus_vt_getsupportedobjects_objecttype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3896 offset += 1;
3899 col_append_str(pinfo->cinfo, COL_INFO, "Supported objects received");
3902 break;
3903 case VT_GET_HARDWARE:
3905 if(direction == ecu_to_vt)
3907 col_append_str(pinfo->cinfo, COL_INFO, "Request hardware info");
3909 else
3911 uint32_t graphic_type, x_pixels, y_pixels;
3912 proto_item *hardware_item;
3913 proto_tree *hardware_subtree;
3915 proto_tree_add_item(tree,
3916 hf_isobus_vt_gethardware_boottime, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3917 offset += 1;
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;
3923 hardware_item = proto_tree_add_item(tree,
3924 hf_isobus_vt_gethardware_hardware, tvb, offset, 1, ENC_LITTLE_ENDIAN);
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;
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;
3941 proto_tree_add_item_ret_uint(tree,
3942 hf_isobus_vt_gethardware_ypixels, tvb, offset, 2, ENC_LITTLE_ENDIAN, &y_pixels);
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_const(graphic_type, graphic_types, "unknown"),
3946 x_pixels, y_pixels);
3949 break;
3950 case VT_STORE_VERSION:
3952 if(direction == ecu_to_vt)
3954 const uint8_t *version_label;
3956 proto_tree_add_item_ret_string(tree,
3957 hf_isobus_vt_storeversion_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
3959 col_append_fstr(pinfo->cinfo, COL_INFO, "Store version under label %s", version_label);
3961 else
3963 uint32_t error_codes;
3964 offset += 4;
3966 ti = proto_tree_add_item_ret_uint(tree,
3967 hf_isobus_vt_storeversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
3968 proto_item_append_text(ti, ": ");
3969 if (error_codes & 0x02)
3970 proto_item_append_text(ti, "Version label is not correct ");
3971 if (error_codes & 0x04)
3972 proto_item_append_text(ti, "Insufficient memory available ");
3973 if (error_codes & 0x08)
3974 proto_item_append_text(ti, "Any other error ");
3976 if(error_codes)
3978 col_append_str(pinfo->cinfo, COL_INFO, "Error while storing version");
3980 else
3982 col_append_str(pinfo->cinfo, COL_INFO, "Version successfully stored");
3986 break;
3987 case VT_LOAD_VERSION:
3989 if(direction == ecu_to_vt)
3991 const uint8_t* version_label;
3993 proto_tree_add_item_ret_string(tree,
3994 hf_isobus_vt_loadversion_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
3996 col_append_fstr(pinfo->cinfo, COL_INFO, "Load version stored under label \"%s\"", version_label);
3998 else
4000 uint32_t error_codes;
4001 offset += 4;
4003 ti = proto_tree_add_item_ret_uint(tree,
4004 hf_isobus_vt_loadversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4005 proto_item_append_text(ti, ": ");
4006 if (error_codes & 0x01)
4007 proto_item_append_text(ti, "File system error or pool data corruption ");
4008 if (error_codes & 0x02)
4009 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4010 if (error_codes & 0x04)
4011 proto_item_append_text(ti, "Insufficient memory available ");
4012 if (error_codes & 0x08)
4013 proto_item_append_text(ti, "Any other error ");
4015 if(error_codes)
4017 col_append_str(pinfo->cinfo, COL_INFO, "Error while loading version");
4019 else
4021 col_append_str(pinfo->cinfo, COL_INFO, "Version successfully loaded");
4025 break;
4026 case VT_DELETE_VERSION:
4028 if(direction == ecu_to_vt)
4030 const uint8_t* version_label;
4032 proto_tree_add_item_ret_string(tree,
4033 hf_isobus_vt_deleteversion_versionlabel, tvb, offset, 7, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4035 col_append_fstr(pinfo->cinfo, COL_INFO, "Delete version stored under label \"%s\"", version_label);
4037 else
4039 uint32_t error_codes;
4040 offset += 4;
4042 ti = proto_tree_add_item_ret_uint(tree,
4043 hf_isobus_vt_deleteversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4044 proto_item_append_text(ti, ": ");
4045 if (error_codes & 0x02)
4046 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4047 if (error_codes & 0x08)
4048 proto_item_append_text(ti, "Any other error ");
4050 if(error_codes)
4052 col_append_str(pinfo->cinfo, COL_INFO, "Error while deleting version");
4054 else
4056 col_append_str(pinfo->cinfo, COL_INFO, "Version successfully deleted");
4060 break;
4061 case VT_EXTENDED_GET_VERSIONS:
4063 if(direction == ecu_to_vt)
4065 col_append_str(pinfo->cinfo, COL_INFO, "Request a list of extended versions");
4067 else
4069 uint32_t number_of_versions, i;
4071 proto_tree_add_item_ret_uint(tree,
4072 hf_isobus_vt_extendedgetversions_numberofversions, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_versions);
4073 offset += 1;
4075 for(i = 0; i < number_of_versions; i++)
4077 proto_tree_add_item(tree,
4078 hf_isobus_vt_extendedgetversions_versionlabel, tvb, offset, 32, ENC_ASCII);
4079 offset += 32;
4082 col_append_str(pinfo->cinfo, COL_INFO, "Extended versions received");
4085 break;
4086 case VT_EXTENDED_STORE_VERSION:
4088 if(direction == ecu_to_vt)
4090 const uint8_t* version_label;
4092 proto_tree_add_item_ret_string(tree,
4093 hf_isobus_vt_extendedstoreversion_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4095 col_append_fstr(pinfo->cinfo, COL_INFO, "Store extended version under label \"%s\"", version_label);
4097 else
4099 uint32_t error_codes;
4100 offset += 4;
4102 ti = proto_tree_add_item_ret_uint(tree,
4103 hf_isobus_vt_extendedstoreversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4104 proto_item_append_text(ti, ": ");
4105 if (error_codes & 0x02)
4106 proto_item_append_text(ti, "Version label is not correct ");
4107 if (error_codes & 0x04)
4108 proto_item_append_text(ti, "Insufficient memory available ");
4109 if (error_codes & 0x08)
4110 proto_item_append_text(ti, "Any other error ");
4112 if(error_codes)
4114 col_append_str(pinfo->cinfo, COL_INFO, "Error while storing extended version");
4116 else
4118 col_append_str(pinfo->cinfo, COL_INFO, "Extended version successfully stored");
4122 break;
4123 case VT_EXTENDED_LOAD_VERSION:
4125 if(direction == ecu_to_vt)
4127 const uint8_t* version_label;
4129 proto_tree_add_item_ret_string(tree,
4130 hf_isobus_vt_extendedloadversion_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4132 col_append_fstr(pinfo->cinfo, COL_INFO, "Store extended version under label \"%s\"", version_label);
4134 else
4136 uint32_t error_codes;
4137 offset += 4;
4139 ti = proto_tree_add_item_ret_uint(tree,
4140 hf_isobus_vt_extendedloadversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4141 proto_item_append_text(ti, ": ");
4142 if (error_codes & 0x01)
4143 proto_item_append_text(ti, "File system error or pool data corruption ");
4144 if (error_codes & 0x02)
4145 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4146 if (error_codes & 0x04)
4147 proto_item_append_text(ti, "Insufficient memory available ");
4148 if (error_codes & 0x08)
4149 proto_item_append_text(ti, "Any other error ");
4151 if(error_codes)
4153 col_append_str(pinfo->cinfo, COL_INFO, "Error while loading extended version");
4155 else
4157 col_append_str(pinfo->cinfo, COL_INFO, "Extended version successfully loaded");
4161 break;
4162 case VT_EXTENDED_DELETE_VERSION:
4164 if(direction == ecu_to_vt)
4166 const uint8_t* version_label;
4168 proto_tree_add_item_ret_string(tree,
4169 hf_isobus_vt_extendeddeleteversion_versionlabel, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &version_label);
4171 col_append_fstr(pinfo->cinfo, COL_INFO, "Delete version stored under label %s", version_label);
4173 else
4175 uint32_t error_codes;
4176 offset += 4;
4178 ti = proto_tree_add_item_ret_uint(tree,
4179 hf_isobus_vt_extendeddeleteversion_errorcodes, tvb, offset, 1, ENC_LITTLE_ENDIAN, &error_codes);
4180 proto_item_append_text(ti, ": ");
4181 if (error_codes & 0x02)
4182 proto_item_append_text(ti, "Version label is not correct or Version label unknown ");
4183 if (error_codes & 0x08)
4184 proto_item_append_text(ti, "Any other error ");
4186 if(error_codes)
4188 col_append_str(pinfo->cinfo, COL_INFO, "Error while deleting extended version");
4190 else
4192 col_append_str(pinfo->cinfo, COL_INFO, "Extended version successfully deleted");
4196 break;
4197 case VT_GET_VERSIONS_MESSAGE:
4199 if(direction == ecu_to_vt)
4201 col_append_str(pinfo->cinfo, COL_INFO, "Extended version successfully deleted");
4203 /*no else as this message can only be used from ecu to vt*/
4205 break;
4206 case VT_GET_VERSIONS_RESPONSE:
4208 if(direction == vt_to_ecu)
4210 uint32_t number_of_versions, i;
4212 proto_tree_add_item_ret_uint(tree,
4213 hf_isobus_vt_getversions_numberofversions, tvb, offset, 1, ENC_LITTLE_ENDIAN, &number_of_versions);
4214 offset += 1;
4216 for(i = 0; i < number_of_versions; i++)
4218 proto_tree_add_item(tree,
4219 hf_isobus_vt_getversions_versionlabel, tvb, offset, 7, ENC_ASCII);
4220 offset += 7;
4223 col_append_str(pinfo->cinfo, COL_INFO, "Versions received");
4225 /*no else as this message can only be used from vt to ecu*/
4227 break;
4228 case VT_UNSUPPORTED_VT_FUNCTION:
4230 uint32_t unsupported_vt_function;
4232 proto_tree_add_item_ret_uint(tree,
4233 hf_isobus_vt_unsupportedvtfunction_unsupportedvtfunction, tvb, offset, 1, ENC_LITTLE_ENDIAN, &unsupported_vt_function);
4235 if(direction == ecu_to_vt)
4237 col_append_fstr(pinfo->cinfo, COL_INFO, "VT function %s (%u) is not supported by ECU",
4238 val_to_str_ext_const(unsupported_vt_function, &vt_function_code_ext, "unknown"), unsupported_vt_function);
4240 else
4242 col_append_fstr(pinfo->cinfo, COL_INFO, "VT function %s (%u) is not supported by VT",
4243 val_to_str_ext_const(unsupported_vt_function, &vt_function_code_ext, "unknown"), unsupported_vt_function);
4246 break;
4247 case VT_VT_STATUS:
4249 proto_tree *ti_busycodes_subtree;
4250 proto_item *busycodes_item;
4251 uint32_t working_set_master, object_id_data_mask, object_id_soft_key_mask;
4253 proto_tree_add_item_ret_uint(tree,
4254 hf_isobus_vt_vtstatus_workingsetmaster, tvb, offset, 1, ENC_LITTLE_ENDIAN, &working_set_master);
4255 offset += 1;
4257 proto_tree_add_item_ret_uint(tree,
4258 hf_isobus_vt_vtstatus_objectiddatamask, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id_data_mask);
4259 ti = proto_tree_add_item(tree,
4260 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4261 proto_item_set_hidden(ti);
4262 offset += 2;
4264 proto_tree_add_item_ret_uint(tree,
4265 hf_isobus_vt_vtstatus_objectidsoftkeymask, tvb, offset, 2, ENC_LITTLE_ENDIAN, &object_id_soft_key_mask);
4266 ti = proto_tree_add_item(tree,
4267 hf_isobus_vt_objectid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4268 proto_item_set_hidden(ti);
4269 offset += 2;
4271 busycodes_item = proto_tree_add_item(tree,
4272 hf_isobus_vt_vtstatus_vtbusycodes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4274 ti_busycodes_subtree = proto_item_add_subtree(busycodes_item, ett_isobus_vt_vtstatus_busycodes_subtree);
4275 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_updatingvisiblemask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4276 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_savingdata, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4277 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_executingcommand, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4278 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_executingmacro, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4279 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_parsingobjectpool, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4280 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_auxcontrolsactive, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4281 proto_tree_add_item(ti_busycodes_subtree, hf_isobus_vt_vtstatus_vtbusycodes_outofmemory, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4282 offset += 1;
4284 proto_tree_add_item(tree,
4285 hf_isobus_vt_vtstatus_vtfunctioncodes, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4287 col_append_fstr(pinfo->cinfo, COL_INFO, "Status: Current master is %d data mask is %s soft key mask is %s",
4288 working_set_master, get_object_id_string(object_id_data_mask), get_object_id_string(object_id_soft_key_mask));
4290 break;
4291 case VT_WORKING_SET_MAINTENANCE:
4293 uint8_t bitmask = tvb_get_uint8(tvb, offset);
4294 uint8_t version = tvb_get_uint8(tvb, offset + 1);
4295 if(version == 0xFF)
4297 version = 2;
4299 if(version > 3)
4301 proto_tree_add_item(tree,
4302 hf_isobus_vt_wrksetmain_bitmask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4304 offset += 1;
4306 proto_tree_add_item(tree,
4307 hf_isobus_vt_wrksetmain_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4309 if(version > 3 && bitmask & 0x80)
4311 col_append_str(pinfo->cinfo, COL_INFO, "Initiate ");
4313 col_append_fstr(pinfo->cinfo, COL_INFO, "Working Set Maintenance, VT version is %d",
4314 version);
4316 current_vt_version = version;
4318 break;
4320 return tvb_captured_length(tvb);
4323 static int
4324 dissect_vt_to_ecu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
4326 return dissect_vt(tvb, pinfo, tree, vt_to_ecu);
4329 static int
4330 dissect_ecu_to_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
4332 return dissect_vt(tvb, pinfo, tree, ecu_to_vt);
4336 * Simple "get a line" routine, copied from giop dissector who copied it from somewhere :)
4340 static int vt_getline(FILE *fp, char *line, int maxlen)
4342 if (fgets(line, maxlen, fp) == NULL)
4344 return 0;
4346 else
4348 line[strcspn(line, "\n")] = '\0';
4349 return (int)strlen(line);
4354 static void read_object_id_file(void)
4356 char buf[500];
4357 uint16_t item_count = 0;
4358 FILE *file;
4360 if ((file = ws_fopen(object_id_translation, "r")) == NULL)
4362 object_id_strings[0].value = 0;
4363 object_id_strings[0].strptr = NULL;
4365 return;
4368 while ((vt_getline(file, buf, 500)) > 0)
4370 char **split_string = g_strsplit(buf, ",", 2);
4372 object_id_strings[item_count].value = (uint32_t)g_ascii_strtoll(split_string[0], NULL, 10);
4373 object_id_strings[item_count].strptr = wmem_strdup(wmem_epan_scope(), split_string[1]);
4375 g_strfreev(split_string);
4376 item_count++;
4379 fclose(file);
4381 object_id_strings[item_count].value = 0;
4382 object_id_strings[item_count].strptr = NULL;
4385 static void isobus_vt_init(void)
4387 read_object_id_file();
4390 /* Register the protocol with Wireshark */
4391 void
4392 proto_register_isobus_vt(void)
4394 static hf_register_info hf[] = {
4395 { &hf_isobus_vt,
4396 { "VT", "isobus.vt",
4397 FT_PROTOCOL, BASE_NONE, NULL, 0x0,
4398 NULL, HFILL }
4400 { &hf_isobus_vt_command,
4401 { "Command", "isobus.vt.command",
4402 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &vt_function_code_ext, 0x0,
4403 NULL, HFILL }
4405 { &hf_isobus_vt_objectid,
4406 { "Object ID", "isobus.vt.object_id",
4407 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4408 NULL, HFILL }
4410 { &hf_isobus_vt_softkey_keyactcode,
4411 { "Activation Code", "isobus.vt.soft_key.act_code",
4412 FT_UINT8, BASE_DEC, VALS(key_activation_codes), 0x0,
4413 NULL, HFILL }
4415 { &hf_isobus_vt_softkey_objectid,
4416 { "Object ID", "isobus.vt.soft_key.object_id",
4417 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4418 NULL, HFILL }
4420 { &hf_isobus_vt_softkey_parentobjectid,
4421 { "Parent Object ID", "isobus.vt.soft_key.parent_object_id",
4422 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4423 NULL, HFILL }
4425 { &hf_isobus_vt_softkey_keynumber,
4426 { "Key Number", "isobus.vt.soft_key.key_number",
4427 FT_UINT8, BASE_DEC, NULL, 0x0,
4428 NULL, HFILL }
4430 { &hf_isobus_vt_button_keyactcode,
4431 { "Activation Code", "isobus.vt.button.act_code",
4432 FT_UINT8, BASE_DEC, VALS(button_activation_codes), 0x0,
4433 NULL, HFILL }
4435 { &hf_isobus_vt_button_objectid,
4436 { "Object ID", "isobus.vt.button.object_id",
4437 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4438 NULL, HFILL }
4440 { &hf_isobus_vt_button_parentobjectid,
4441 { "Parent Object ID", "isobus.vt.button.parent_object_id",
4442 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4443 NULL, HFILL }
4445 { &hf_isobus_vt_button_keynumber,
4446 { "Key Number", "isobus.vt.button.key_number",
4447 FT_UINT8, BASE_DEC, NULL, 0x0,
4448 NULL, HFILL }
4450 { &hf_isobus_vt_pointing_xposition,
4451 { "X Position", "isobus.vt.pointing_event.x_position",
4452 FT_UINT16, BASE_DEC, NULL, 0x0,
4453 NULL, HFILL }
4455 { &hf_isobus_vt_pointing_yposition,
4456 { "Y Position", "isobus.vt.pointing_event.y_position",
4457 FT_UINT16, BASE_DEC, NULL, 0x0,
4458 NULL, HFILL }
4460 { &hf_isobus_vt_pointing_touchstate,
4461 { "Touch State", "isobus.vt.pointing_event.touch_state",
4462 FT_UINT8, BASE_DEC, VALS(pointing_touch_state), 0x0,
4463 NULL, HFILL }
4465 { &hf_isobus_vt_vtselectinputobject_objectid,
4466 { "Object ID", "isobus.vt.vt_select_input_object.object_id",
4467 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4468 NULL, HFILL }
4470 { &hf_isobus_vt_vtselectinputobject_selection,
4471 { "Selection", "isobus.vt.vt_select_input_object.selection",
4472 FT_UINT8, BASE_DEC, VALS(selection), 0x0,
4473 NULL, HFILL }
4475 { &hf_isobus_vt_vtselectinputobject_openforinput,
4476 { "Open For Input", "isobus.vt.vt_select_input_object.open_for_input",
4477 FT_UINT8, BASE_DEC, NULL, 0x80,
4478 NULL, HFILL }
4480 { &hf_isobus_vt_vtescmessage_objectid,
4481 { "Object ID", "isobus.vt.vt_esc_message.object_id",
4482 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4483 NULL, HFILL }
4485 { &hf_isobus_vt_vtescmessage_errorcodes,
4486 { "Error Codes", "isobus.vt.vt_esc_message.error_codes",
4487 FT_UINT8, BASE_DEC, NULL, 0x0,
4488 NULL, HFILL }
4490 { &hf_isobus_vt_vtchgnumval_objectid,
4491 { "Object ID", "isobus.vt.vt_chg_num_val.object_id",
4492 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4493 NULL, HFILL }
4495 { &hf_isobus_vt_vtchgnumval_value,
4496 { "Value", "isobus.vt.vt_chg_num_val.val",
4497 FT_UINT32, BASE_DEC, NULL, 0x0,
4498 NULL, HFILL }
4500 { &hf_isobus_vt_vtchgactivemask_maskobjectid,
4501 { "Mask Object ID", "isobus.vt.vt_chg_active_mask.mask_object_id",
4502 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4503 NULL, HFILL }
4505 { &hf_isobus_vt_vtchgactivemask_errorcodes,
4506 { "Error Codes", "isobus.vt.vt_chg_active_mask.error_codes",
4507 FT_UINT8, BASE_HEX, NULL, 0x0,
4508 NULL, HFILL }
4510 { &hf_isobus_vt_vtchgactivemask_errorobjectid,
4511 { "Error Object ID", "isobus.vt.vt_chg_active_mask.error_object_id",
4512 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4513 NULL, HFILL }
4515 { &hf_isobus_vt_vtchgactivemask_errorobjectidparent,
4516 { "Error Object ID Parent", "isobus.vt.vt_chg_active_mask.error_object_id_parent",
4517 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4518 NULL, HFILL }
4520 { &hf_isobus_vt_vtchgstrval_objectid,
4521 { "Object ID", "isobus.vt.vt_chg_str_val.object_id",
4522 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4523 NULL, HFILL }
4525 { &hf_isobus_vt_vtchgstrval_length,
4526 { "Length", "isobus.vt.vt_chg_str_val.length",
4527 FT_UINT8, BASE_DEC, NULL, 0x0,
4528 NULL, HFILL }
4530 { &hf_isobus_vt_vtchgstrval_value,
4531 { "Value", "isobus.vt.vt_chg_str_val.val",
4532 FT_STRING, BASE_NONE, NULL, 0x0,
4533 NULL, HFILL }
4535 { &hf_isobus_vt_vtonuserlayouthideshow_objectid_1,
4536 { "Object ID 1", "isobus.vt.vt_on_user_layout_hide_show.object_id_1",
4537 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4538 NULL, HFILL }
4540 { &hf_isobus_vt_vtonuserlayouthideshow_status_1,
4541 { "Status 1", "isobus.vt.vt_on_user_layout_hide_show.status_1",
4542 FT_UINT8, BASE_DEC, NULL, 0x0,
4543 NULL, HFILL }
4545 { &hf_isobus_vt_vtonuserlayouthideshow_objectid_2,
4546 { "Object ID 2", "isobus.vt.vt_on_user_layout_hide_show.object_id_2",
4547 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4548 NULL, HFILL }
4550 { &hf_isobus_vt_vtonuserlayouthideshow_status_2,
4551 { "Status 2", "isobus.vt.vt_on_user_layout_hide_show.status_2",
4552 FT_UINT8, BASE_DEC, NULL, 0x0,
4553 NULL, HFILL }
4555 { &hf_isobus_vt_vtcontrolaudiosignaltermination_terminationcause,
4556 { "Termination Cause", "isobus.vt.vt_control_audio_signal_termination.termination_cause",
4557 FT_UINT8, BASE_HEX, NULL, 0x0,
4558 NULL, HFILL }
4560 { &hf_isobus_vt_endofobjectpool_errorcodes,
4561 { "Error Codes", "isobus.vt.end_of_object_pool.error_codes",
4562 FT_UINT8, BASE_HEX, NULL, 0x0,
4563 NULL, HFILL }
4565 { &hf_isobus_vt_endofobjectpool_faultyparentobjectid,
4566 { "Faulty Parent Object ID", "isobus.vt.end_of_object_pool.faulty_parent_object_id",
4567 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4568 NULL, HFILL }
4570 { &hf_isobus_vt_endofobjectpool_faultyobjectid,
4571 { "Faulty Object ID", "isobus.vt.end_of_object_pool.faulty_object_id",
4572 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4573 NULL, HFILL }
4575 { &hf_isobus_vt_endofobjectpool_objectpoolerrorcodes,
4576 { "Object Pool Error Codes", "isobus.vt.end_of_object_pool.object_pool_error_codes",
4577 FT_UINT8, BASE_HEX, NULL, 0x0,
4578 NULL, HFILL }
4580 { &hf_isobus_vt_auxiliaryassignmenttype1_sourceaddressauxinputdevice,
4581 { "Source Address Auxiliary Input Device", "isobus.vt.auxiliary_assignment_type_1.source_address_aux_input_device",
4582 FT_UINT8, BASE_DEC, NULL, 0x0,
4583 NULL, HFILL }
4585 { &hf_isobus_vt_auxiliaryassignmenttype1_auxinputnumber,
4586 { "Auxiliary Input Number", "isobus.vt.auxiliary_assignment_type_1.aux_input_number",
4587 FT_UINT8, BASE_DEC, NULL, 0x0,
4588 NULL, HFILL }
4590 { &hf_isobus_vt_auxiliaryassignmenttype1_objectidauxinputdevice,
4591 { "Object ID of Auxiliary Function", "isobus.vt.auxiliary_assignment_type_1.object_id_of_auxiliary_function",
4592 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
4593 NULL, HFILL }
4595 { &hf_isobus_vt_auxiliaryinputtype1status_inputnumber,
4596 { "Input Number", "isobus.vt.auxiliary_input_type_1_status.input_number",
4597 FT_UINT8, BASE_DEC, NULL, 0x0,
4598 NULL, HFILL }
4600 { &hf_isobus_vt_auxiliaryinputtype1status_analyzevalue,
4601 { "Analyze Value", "isobus.vt.auxiliary_input_type_1_status.analyze_value",
4602 FT_UINT16, BASE_DEC, NULL, 0x0,
4603 NULL, HFILL }
4605 { &hf_isobus_vt_auxiliaryinputtype1status_numberoftransitions,
4606 { "Number of transitions", "isobus.vt.auxiliary_input_type_1_status.number_of_transitions",
4607 FT_UINT16, BASE_DEC, NULL, 0x0,
4608 NULL, HFILL }
4610 { &hf_isobus_vt_auxiliaryinputtype1status_booleanvalue,
4611 { "Boolean Value", "isobus.vt.auxiliary_input_type_1_status.boolean_value",
4612 FT_UINT8, BASE_DEC, VALS(auxiliary_boolean_value), 0x0,
4613 NULL, HFILL }
4615 { &hf_isobus_vt_preferredassignment_numberofinputunits,
4616 { "Number of Input Units", "isobus.vt.preferred_assignment.number_of_input_units",
4617 FT_UINT8, BASE_DEC, NULL, 0x0,
4618 NULL, HFILL }
4620 { &hf_isobus_vt_preferredassignment_auxinputunit_name,
4621 { "64-bit NAME of the Auxiliary Input Unit", "isobus.vt.preferred_assignment.auxiliary_input_unit.name",
4622 FT_UINT64, BASE_HEX, NULL, 0x0,
4623 NULL, HFILL }
4625 { &hf_isobus_vt_preferredassignment_auxinputunit_modelidentificationcode,
4626 { "Model Identification Code of the Auxiliary Input Unit", "isobus.vt.preferred_assignment.auxiliary_input_unit.model_identification_code",
4627 FT_UINT16, BASE_HEX, NULL, 0x0,
4628 NULL, HFILL }
4630 { &hf_isobus_vt_preferredassignment_auxinputunit_numberofpreferredfunctions,
4631 { "Number of Preferred Functions for this Auxiliary Input Unit", "isobus.vt.preferred_assignment.auxiliary_input_unit.number_of_preferred_functions",
4632 FT_UINT8, BASE_DEC, NULL, 0x0,
4633 NULL, HFILL }
4635 { &hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxfunctionobjectid,
4636 { "Object ID of Auxiliary Function", "isobus.vt.preferred_assignment.auxiliary_input_unit.preferred_functions.auxiliary_function_object_id",
4637 FT_UINT16, BASE_HEX_DEC, VALS(object_id_strings), 0x0,
4638 NULL, HFILL }
4640 { &hf_isobus_vt_preferredassignment_auxinputunit_preferredfunctions_auxinputobjectid,
4641 { "Object ID of Auxiliary Input", "isobus.vt.preferred_assignment.auxiliary_input_unit.preferred_functions.auxiliary_input_object_id",
4642 FT_UINT16, BASE_HEX_DEC, VALS(object_id_strings), 0x0,
4643 NULL, HFILL }
4645 { &hf_isobus_vt_preferredassignment_errorcodes,
4646 { "Error Codes", "isobus.vt.preferred_assignment.error_codes",
4647 FT_UINT8, BASE_HEX, NULL, 0x0,
4648 NULL, HFILL }
4650 { &hf_isobus_vt_preferredassignment_faultyauxiliaryfunctionobjectid,
4651 { "Faulty Auxiliary Function Object ID", "isobus.vt.preferred_assignment.faulty_auxiliary_function_object_id",
4652 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4653 NULL, HFILL }
4655 { &hf_isobus_vt_auxiliaryinputtype2maintenance_modelidentificationcode,
4656 { "Model Identification Code", "isobus.vt.auxiliary_input_type_2_maintenance.model_identification_code",
4657 FT_UINT16, BASE_DEC, NULL, 0x0,
4658 NULL, HFILL }
4660 { &hf_isobus_vt_auxiliaryinputtype2maintenance_status,
4661 { "Status", "isobus.vt.auxiliary_input_type_2_maintenance.status",
4662 FT_UINT8, BASE_DEC, VALS(auxiliary_maintenance_status), 0x0,
4663 NULL, HFILL }
4665 { &hf_isobus_vt_auxiliaryassignmenttype2_name,
4666 { "64-bit NAME of the Auxiliary Input Unit", "isobus.vt.auxiliary_assignment_type_2.name",
4667 FT_UINT64, BASE_HEX, NULL, 0x0,
4668 NULL, HFILL }
4670 { &hf_isobus_vt_auxiliaryassignmenttype2_flags,
4671 { "Flags", "isobus.vt.auxiliary_assignment_type_2.flags",
4672 FT_UINT8, BASE_HEX, NULL, 0x0,
4673 NULL, HFILL }
4675 { &hf_isobus_vt_auxiliaryassignmenttype2_flags_preferredassignment,
4676 { "Preferred Assignment", "isobus.vt.auxiliary_assignment_type_2.flags.preferred_assignment",
4677 FT_UINT8, BASE_HEX, NULL, 0x80,
4678 NULL, HFILL }
4680 { &hf_isobus_vt_auxiliaryassignmenttype2_flags_auxiliaryfunctiontype,
4681 { "Auxiliary Function Type", "isobus.vt.auxiliary_assignment_type_2.flags.auxiliary_function_type",
4682 FT_UINT8, BASE_DEC, NULL, 0x1F,
4683 NULL, HFILL }
4685 { &hf_isobus_vt_auxiliaryassignmenttype2_auxinputobjectid,
4686 { "Object ID of the Auxiliary Input", "isobus.vt.auxiliary_assignment_type_2.auxiliary_input_object_id",
4687 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4688 NULL, HFILL }
4690 { &hf_isobus_vt_auxiliaryassignmenttype2_auxfunctionobjectid,
4691 { "Object ID of Auxiliary Function", "isobus.vt.auxiliary_assignment_type_2.auxiliary_function_object_id",
4692 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4693 NULL, HFILL }
4695 { &hf_isobus_vt_auxiliaryassignmenttype2_errorcodes,
4696 { "Error Codes", "isobus.vt.auxiliary_assignment_type_2.error_codes",
4697 FT_UINT8, BASE_HEX, NULL, 0x0,
4698 NULL, HFILL }
4700 { &hf_isobus_vt_auxiliaryinputstatustype2enable_auxiliaryinputobjectid,
4701 { "Auxiliary Input Object ID", "isobus.vt.auxiliary_input_status_type_2_enable.auxiliary_input_object_id",
4702 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4703 NULL, HFILL }
4705 { &hf_isobus_vt_auxiliaryinputstatustype2enable_enable,
4706 { "Enable", "isobus.vt.auxiliary_input_status_type_2_enable.enable",
4707 FT_UINT8, BASE_DEC, NULL, 0x0,
4708 NULL, HFILL }
4710 { &hf_isobus_vt_auxiliaryinputstatustype2enable_status,
4711 { "Status", "isobus.vt.auxiliary_input_status_type_2_enable.status",
4712 FT_UINT8, BASE_DEC, NULL, 0x0,
4713 NULL, HFILL }
4715 { &hf_isobus_vt_auxiliaryinputstatustype2enable_errorcodes,
4716 { "Error Codes", "isobus.vt.auxiliary_input_status_type_2_enable.error_codes",
4717 FT_UINT8, BASE_HEX, NULL, 0x0,
4718 NULL, HFILL }
4720 { &hf_isobus_vt_auxiliaryinputtype2status_auxiliaryinputobjectid,
4721 { "Auxiliary Input Object ID", "isobus.vt.auxiliary_input_type_2_status.auxiliary_input_object_id",
4722 FT_UINT16, BASE_HEX, VALS(object_id_strings), 0x0,
4723 NULL, HFILL }
4725 { &hf_isobus_vt_auxiliaryinputtype2status_value1,
4726 { "Value 1", "isobus.vt.auxiliary_input_type_2_status.value_1",
4727 FT_UINT16, BASE_HEX, NULL, 0x0,
4728 NULL, HFILL }
4730 { &hf_isobus_vt_auxiliaryinputtype2status_value2,
4731 { "Value 2", "isobus.vt.auxiliary_input_type_2_status.value_2",
4732 FT_UINT16, BASE_HEX, NULL, 0x0,
4733 NULL, HFILL }
4735 { &hf_isobus_vt_auxiliaryinputtype2status_operatingstate,
4736 { "Operating State", "isobus.vt.auxiliary_input_type_2_status.operating_state",
4737 FT_UINT8, BASE_HEX, NULL, 0x0,
4738 NULL, HFILL }
4740 { &hf_isobus_vt_auxiliaryinputtype2status_operatingstate_learnmodeactive,
4741 { "Operating State", "isobus.vt.auxiliary_input_type_2_status.operating_state.learn_mode_active",
4742 FT_UINT8, BASE_HEX, NULL, 0x01,
4743 NULL, HFILL }
4745 { &hf_isobus_vt_auxiliaryinputtype2status_operatingstate_inputactivatedinlearnmode,
4746 { "Input activated in learn mode", "isobus.vt.auxiliary_input_type_2_status.operating_state.input_activated_in_learn_mode",
4747 FT_UINT8, BASE_HEX, NULL, 0x02,
4748 NULL, HFILL }
4750 { &hf_isobus_vt_auxiliarycapabilities_requesttype,
4751 { "Request Type", "isobus.vt.auxiliary_capabilities.request_type",
4752 FT_UINT8, BASE_DEC, VALS(auxiliary_capabilities_request_type), 0x0,
4753 NULL, HFILL }
4755 { &hf_isobus_vt_auxiliarycapabilities_numberofauxiliaryunits,
4756 { "Number of Auxiliary Unit", "isobus.vt.auxiliary_capabilities.number_of_auxiliary_units",
4757 FT_UINT8, BASE_DEC, NULL, 0x0,
4758 NULL, HFILL }
4760 { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_name,
4761 { "64-bit NAME of the Auxiliary Unit", "isobus.vt.auxiliary_capabilities.auxiliary_unit.name",
4762 FT_UINT64, BASE_HEX, NULL, 0x0,
4763 NULL, HFILL }
4765 { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_numberofdifferentsets,
4766 { "Number of different sets for this Auxiliary Unit", "isobus.vt.auxiliary_capabilities.auxiliary_unit.number_of_different_sets",
4767 FT_UINT8, BASE_DEC, NULL, 0x0,
4768 NULL, HFILL }
4770 { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_numberofinstances,
4771 { "Number of Instances", "isobus.vt.auxiliary_capabilities.auxiliary_unit.set.number_of_instances",
4772 FT_UINT8, BASE_DEC, NULL, 0x0,
4773 NULL, HFILL }
4775 { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_functionattribute,
4776 { "Function attribute", "isobus.vt.auxiliary_capabilities.auxiliary_unit.set.function_attribute",
4777 FT_UINT8, BASE_DEC, NULL, 0x0,
4778 NULL, HFILL }
4780 { &hf_isobus_vt_auxiliarycapabilities_auxiliaryunit_set_assignedattribute,
4781 { "Assigned attribute", "isobus.vt.auxiliary_capabilities.auxiliary_unit.set.assigned_attribute",
4782 FT_UINT8, BASE_HEX, VALS(auxiliary_assigned_attributes), 0x0,
4783 NULL, HFILL }
4785 { &hf_isobus_vt_esc_objectid,
4786 { "Object ID", "isobus.vt.esc.object_id",
4787 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4788 NULL, HFILL }
4790 { &hf_isobus_vt_esc_errorcodes,
4791 { "Error Codes", "isobus.vt.esc.error_codes",
4792 FT_UINT8, BASE_HEX, NULL, 0x0,
4793 NULL, HFILL }
4795 { &hf_isobus_vt_hideshowobj_objectid,
4796 { "Object ID", "isobus.vt.hide_show_object.object_id",
4797 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4798 NULL, HFILL }
4800 { &hf_isobus_vt_hideshowobj_action,
4801 { "Action", "isobus.vt.hide_show_object.action",
4802 FT_UINT8, BASE_DEC, VALS(vt_hide_show_action), 0x0,
4803 NULL, HFILL }
4805 { &hf_isobus_vt_hideshowobj_errorcodes,
4806 { "Error Codes", "isobus.vt.hide_show_object.error_codes",
4807 FT_UINT8, BASE_HEX, NULL, 0x0,
4808 NULL, HFILL }
4810 { &hf_isobus_vt_enabledisableobj_objectid,
4811 { "Object ID", "isobus.vt.enable_disable_object.object_id",
4812 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4813 NULL, HFILL }
4815 { &hf_isobus_vt_enabledisableobj_enabledisable,
4816 { "Action", "isobus.vt.enable_disable_object.enable_disable",
4817 FT_UINT8, BASE_DEC, VALS(vt_enable_disable_action), 0x0,
4818 NULL, HFILL }
4820 { &hf_isobus_vt_enabledisableobj_errorcodes,
4821 { "Error Codes", "isobus.vt.enable_disable_object.error_codes",
4822 FT_UINT8, BASE_HEX, NULL, 0x0,
4823 NULL, HFILL }
4825 { &hf_isobus_vt_selectinputobject_objectid,
4826 { "Object ID", "isobus.vt.select_input_object.object_id",
4827 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4828 NULL, HFILL }
4830 { &hf_isobus_vt_selectinputobject_option,
4831 { "Option", "isobus.vt.select_input_object.option",
4832 FT_UINT8, BASE_HEX, VALS(select_input_object_option), 0x0,
4833 NULL, HFILL }
4835 { &hf_isobus_vt_selectinputobject_response,
4836 { "Response", "isobus.vt.select_input_object.response",
4837 FT_UINT16, BASE_DEC_HEX, VALS(select_input_opject_response), 0x0,
4838 NULL, HFILL }
4840 { &hf_isobus_vt_selectinputobject_errorcodes,
4841 { "Object ID", "isobus.vt.select_input_object.error_codes",
4842 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
4843 NULL, HFILL }
4845 { &hf_isobus_vt_controlaudiosignal_activations,
4846 { "Activations", "isobus.vt.control_audio_signal.activations",
4847 FT_UINT8, BASE_DEC, NULL, 0x0,
4848 NULL, HFILL }
4850 { &hf_isobus_vt_controlaudiosignal_frequency,
4851 { "Frequency", "isobus.vt.control_audio_signal.frequency",
4852 FT_UINT16, BASE_DEC, NULL, 0x0,
4853 NULL, HFILL }
4855 { &hf_isobus_vt_controlaudiosignal_ontime,
4856 { "On-time duration", "isobus.vt.control_audio_signal.on_time",
4857 FT_UINT16, BASE_DEC, NULL, 0x0,
4858 NULL, HFILL }
4860 { &hf_isobus_vt_controlaudiosignal_offtime,
4861 { "Off-time duration", "isobus.vt.control_audio_signal.off_time",
4862 FT_UINT16, BASE_DEC, NULL, 0x0,
4863 NULL, HFILL }
4865 { &hf_isobus_vt_controlaudiosignal_errorcodes,
4866 { "Error Codes", "isobus.vt.control_audio_signal.error_codes",
4867 FT_UINT8, BASE_HEX, NULL, 0x0,
4868 NULL, HFILL }
4870 { &hf_isobus_vt_setaudiovolume_volume,
4871 { "Volume", "isobus.vt.set_audio_volume.volume",
4872 FT_UINT8, BASE_DEC, NULL, 0x0,
4873 NULL, HFILL }
4875 { &hf_isobus_vt_setaudiovolume_errorcodes,
4876 { "Error Codes", "isobus.vt.set_audio_volume.error_codes",
4877 FT_UINT8, BASE_HEX, NULL, 0x0,
4878 NULL, HFILL }
4880 { &hf_isobus_vt_changechildlocation_parentobjectid,
4881 { "Parent Object ID", "isobus.vt.change_child_location.parent_object_id",
4882 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4883 NULL, HFILL }
4885 { &hf_isobus_vt_changechildlocation_objectid,
4886 { "Object ID", "isobus.vt.change_child_location.object_id",
4887 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4888 NULL, HFILL }
4890 { &hf_isobus_vt_changechildlocation_relativexpos,
4891 { "Relative X Position", "isobus.vt.change_child_location.relative_x_position",
4892 FT_UINT8, BASE_DEC, NULL, 0x0,
4893 NULL, HFILL }
4895 { &hf_isobus_vt_changechildlocation_relativeypos,
4896 { "Relative Y Position", "isobus.vt.change_child_location.relative_y_position",
4897 FT_UINT8, BASE_DEC, NULL, 0x0,
4898 NULL, HFILL }
4900 { &hf_isobus_vt_changechildlocation_errorcodes,
4901 { "Errorcode", "isobus.vt.change_child_location.error_codes",
4902 FT_UINT8, BASE_HEX, NULL, 0x0,
4903 NULL, HFILL }
4905 { &hf_isobus_vt_changechildposition_parentobjectid,
4906 { "Parent Object ID", "isobus.vt.chg_child_pos.parent_object_id",
4907 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4908 NULL, HFILL }
4910 { &hf_isobus_vt_changechildposition_objectid,
4911 { "Object ID", "isobus.vt.chg_child_pos.object_id",
4912 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4913 NULL, HFILL }
4915 { &hf_isobus_vt_changechildposition_xpos,
4916 { "Relative X Position", "isobus.vt.chg_child_pos.rel_x_pos",
4917 FT_UINT16, BASE_DEC, NULL, 0x0,
4918 NULL, HFILL }
4920 { &hf_isobus_vt_changechildposition_ypos,
4921 { "Relative Y Position", "isobus.vt.chg_child_pos.rel_y_pos",
4922 FT_UINT16, BASE_DEC, NULL, 0x0,
4923 NULL, HFILL }
4925 { &hf_isobus_vt_changechildposition_errorcodes,
4926 { "Error codes", "isobus.vt.chg_child_pos.error_codes",
4927 FT_UINT8, BASE_HEX, NULL, 0x0,
4928 NULL, HFILL }
4930 { &hf_isobus_vt_changesize_objectid,
4931 { "Object ID", "isobus.vt.change_size.object_id",
4932 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4933 NULL, HFILL }
4935 { &hf_isobus_vt_changesize_newwidth,
4936 { "New Width", "isobus.vt.change_size.new_width",
4937 FT_UINT16, BASE_DEC, NULL, 0x0,
4938 NULL, HFILL }
4940 { &hf_isobus_vt_changesize_newheight,
4941 { "New Height", "isobus.vt.change_size.new_height",
4942 FT_UINT16, BASE_DEC, NULL, 0x0,
4943 NULL, HFILL }
4945 { &hf_isobus_vt_changesize_errorcodes,
4946 { "Errorcode", "isobus.vt.change_size.error_codes",
4947 FT_UINT8, BASE_HEX, NULL, 0x0,
4948 NULL, HFILL }
4950 { &hf_isobus_vt_chgnumval_objectid,
4951 { "Object ID", "isobus.vt.change_numeric_value.object_id",
4952 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4953 NULL, HFILL }
4955 { &hf_isobus_vt_chgnumval_errorcodes,
4956 { "Error Codes", "isobus.vt.change_numeric_value.error_codes",
4957 FT_UINT8, BASE_HEX, NULL, 0x0,
4958 NULL, HFILL }
4960 { &hf_isobus_vt_chgnumval_value,
4961 { "Value", "isobus.vt.change_numeric_value.val",
4962 FT_UINT32, BASE_DEC, NULL, 0x0,
4963 NULL, HFILL }
4965 { &hf_isobus_vt_changeendpoint_objectid,
4966 { "Object ID", "isobus.vt.change_end_point.object_id",
4967 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4968 NULL, HFILL }
4970 { &hf_isobus_vt_changeendpoint_width,
4971 { "Width", "isobus.vt.change_end_point.width",
4972 FT_UINT16, BASE_DEC, NULL, 0x0,
4973 NULL, HFILL }
4975 { &hf_isobus_vt_changeendpoint_height,
4976 { "Height", "isobus.vt.change_end_point.height",
4977 FT_UINT16, BASE_DEC, NULL, 0x0,
4978 NULL, HFILL }
4980 { &hf_isobus_vt_changeendpoint_linedirection,
4981 { "Line Direction", "isobus.vt.change_end_point.line_direction",
4982 FT_UINT8, BASE_DEC, VALS(line_direction), 0x0,
4983 NULL, HFILL }
4985 { &hf_isobus_vt_changefontattributes_objectid,
4986 { "Object ID", "isobus.vt.change_font_attributes.object_id",
4987 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
4988 NULL, HFILL }
4990 { &hf_isobus_vt_changefontattributes_fontcolour,
4991 { "Font Colour", "isobus.vt.change_font_attributes.font_colour",
4992 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
4993 NULL, HFILL }
4995 { &hf_isobus_vt_changefontattributes_fontsize,
4996 { "Font Size", "isobus.vt.change_font_attributes.font_size",
4997 FT_UINT8, BASE_DEC, NULL, 0x0,
4998 NULL, HFILL }
5000 { &hf_isobus_vt_changefontattributes_fonttype,
5001 { "Font Type", "isobus.vt.change_font_attributes.font_type",
5002 FT_UINT8, BASE_DEC, NULL, 0x0,
5003 NULL, HFILL }
5005 { &hf_isobus_vt_changefontattributes_fontstyle,
5006 { "Font Style", "isobus.vt.change_font_attributes.font_style",
5007 FT_UINT8, BASE_DEC, NULL, 0x0,
5008 NULL, HFILL }
5010 { &hf_isobus_vt_changefontattributes_errorcodes,
5011 { "Error Codes", "isobus.vt.change_font_attributes.error_codes",
5012 FT_UINT8, BASE_HEX, NULL, 0x0,
5013 NULL, HFILL }
5015 { &hf_isobus_vt_changelineattributes_objectid,
5016 { "Object ID", "isobus.vt.change_line_attributes.object_id",
5017 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5018 NULL, HFILL }
5020 { &hf_isobus_vt_changelineattributes_linecolour,
5021 { "Line Colour", "isobus.vt.change_line_attributes.line_colour",
5022 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5023 NULL, HFILL }
5025 { &hf_isobus_vt_changelineattributes_linewidth,
5026 { "Line Width", "isobus.vt.change_line_attributes.line_width",
5027 FT_UINT8, BASE_DEC, NULL, 0x0,
5028 NULL, HFILL }
5030 { &hf_isobus_vt_changelineattributes_lineart,
5031 { "Line Art", "isobus.vt.change_line_attributes.line_art",
5032 FT_UINT16, BASE_DEC, NULL, 0x0,
5033 NULL, HFILL }
5035 { &hf_isobus_vt_changelineattributes_errorcodes,
5036 { "Error Codes", "isobus.vt.change_line_attributes.error_codes",
5037 FT_UINT8, BASE_HEX, NULL, 0x0,
5038 NULL, HFILL }
5040 { &hf_isobus_vt_changefillattributes_objectid,
5041 { "Object ID", "isobus.vt.change_fill_attributes.object_id",
5042 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5043 NULL, HFILL }
5045 { &hf_isobus_vt_changefillattributes_filltype,
5046 { "Fill Type", "isobus.vt.change_fill_attributes.fill_type",
5047 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5048 NULL, HFILL }
5050 { &hf_isobus_vt_changefillattributes_fillcolour,
5051 { "Fill Colour", "isobus.vt.change_fill_attributes.fill_colour",
5052 FT_UINT8, BASE_DEC, NULL, 0x0,
5053 NULL, HFILL }
5055 { &hf_isobus_vt_changefillattributes_fillpatternobjectid,
5056 { "Fill Pattern Object ID", "isobus.vt.change_fill_attributes.fill_pattern_object_id",
5057 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5058 NULL, HFILL }
5060 { &hf_isobus_vt_changefillattributes_errorcodes,
5061 { "Error Codes", "isobus.vt.change_fill_attributes.error_codes",
5062 FT_UINT8, BASE_HEX, NULL, 0x0,
5063 NULL, HFILL }
5065 { &hf_isobus_vt_changeactivemask_workingset,
5066 { "Working Set Object ID", "isobus.vt.chg_active_mask.working_set_object_id",
5067 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5068 NULL, HFILL }
5070 { &hf_isobus_vt_changeactivemask_newactivemask,
5071 { "New Active Mask Object ID", "isobus.vt.chg_active_mask.new_active_mask_object_id",
5072 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5073 NULL, HFILL }
5075 { &hf_isobus_vt_changeactivemask_errorcodes,
5076 { "Error Codes", "isobus.vt.chg_active_mask.error_codes",
5077 FT_UINT8, BASE_HEX, NULL, 0x0,
5078 NULL, HFILL }
5080 { &hf_isobus_vt_changesoftkeymask_masktype,
5081 { "Mask Type", "isobus.vt.change_soft_key_mask.mask_type",
5082 FT_UINT8, BASE_HEX, NULL, 0x0,
5083 NULL, HFILL }
5085 { &hf_isobus_vt_changesoftkeymask_datamaskobjectid,
5086 { "Working Set Object ID", "isobus.vt.change_soft_key_mask.data_mask_object_id",
5087 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5088 NULL, HFILL }
5090 { &hf_isobus_vt_changesoftkeymask_newsoftkeymaskobjectid,
5091 { "New Active Mask Object ID", "isobus.vt.change_soft_key_mask.new_soft_key_mask_object_id",
5092 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5093 NULL, HFILL }
5095 { &hf_isobus_vt_changesoftkeymask_errorcodes,
5096 { "Error Codes", "isobus.vt.change_soft_key_mask.error_codes",
5097 FT_UINT8, BASE_HEX, NULL, 0x0,
5098 NULL, HFILL }
5100 { &hf_isobus_vt_changeattributes_objectid,
5101 { "Object ID", "isobus.vt.change_attributes.object_id",
5102 FT_UINT16, BASE_DEC, VALS(object_id_strings), 0x0,
5103 NULL, HFILL }
5105 { &hf_isobus_vt_changeattributes_attributeid,
5106 { "Attribute ID", "isobus.vt.change_attributes.attribute_id",
5107 FT_UINT16, BASE_DEC, NULL, 0x0,
5108 NULL, HFILL }
5110 { &hf_isobus_vt_changeattributes_newvalue,
5111 { "New Value For Attribute", "isobus.vt.change_attributes.new_active_mask",
5112 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
5113 NULL, HFILL }
5115 { &hf_isobus_vt_changeattributes_errorcodes,
5116 { "Error Codes", "isobus.vt.change_attributes.error_codes",
5117 FT_UINT8, BASE_HEX, NULL, 0x0,
5118 NULL, HFILL }
5120 { &hf_isobus_vt_changepriority_objectid,
5121 { "Object ID", "isobus.vt.change_priority.object_id",
5122 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5123 NULL, HFILL }
5125 { &hf_isobus_vt_changepriority_newpriority,
5126 { "New Priority", "isobus.vt.change_priority.new_priority",
5127 FT_UINT8, BASE_DEC, NULL, 0x0,
5128 NULL, HFILL }
5130 { &hf_isobus_vt_changepriority_errorcodes,
5131 { "Error Codes", "isobus.vt.change_priority.error_codes",
5132 FT_UINT8, BASE_HEX, NULL, 0x0,
5133 NULL, HFILL }
5135 { &hf_isobus_vt_changelistitem_listobjectid,
5136 { "List Object ID", "isobus.vt.change_list_item.list_object_id",
5137 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5138 NULL, HFILL }
5140 { &hf_isobus_vt_changelistitem_listindex,
5141 { "List Index", "isobus.vt.change_list_item.list_index",
5142 FT_UINT8, BASE_DEC, NULL, 0x0,
5143 NULL, HFILL }
5145 { &hf_isobus_vt_changelistitem_newobjectid,
5146 { "New Object ID", "isobus.vt.change_list_item.new_object_id",
5147 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5148 NULL, HFILL }
5150 { &hf_isobus_vt_changelistitem_errorcodes,
5151 { "Error Codes", "isobus.vt.change_list_item.error_codes",
5152 FT_UINT8, BASE_HEX, NULL, 0x0,
5153 NULL, HFILL }
5155 { &hf_isobus_vt_deleteobjectpool_errorcodes,
5156 { "Error Codes", "isobus.vt.delete_object_pool.error_codes",
5157 FT_UINT8, BASE_HEX, NULL, 0x0,
5158 NULL, HFILL }
5160 { &hf_isobus_vt_chgstrval_objectid,
5161 { "Object ID", "isobus.vt.change_string_value.object_id",
5162 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5163 NULL, HFILL }
5165 { &hf_isobus_vt_chgstrval_length,
5166 { "Length", "isobus.vt.change_string_value.length",
5167 FT_UINT16, BASE_DEC, NULL, 0x0,
5168 NULL, HFILL }
5170 { &hf_isobus_vt_chgstrval_errorcodes,
5171 { "Error Codes", "isobus.vt.change_string_value.error_codes",
5172 FT_UINT8, BASE_HEX, NULL, 0x0,
5173 NULL, HFILL }
5175 { &hf_isobus_vt_chgstrval_value,
5176 { "Value", "isobus.vt.change_string_value.value",
5177 FT_STRING, BASE_NONE, NULL, 0x0,
5178 NULL, HFILL }
5180 { &hf_isobus_vt_changebackgroundcolour_objectid,
5181 { "Object ID", "isobus.vt.change_background_colour.object_id",
5182 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5183 NULL, HFILL }
5185 { &hf_isobus_vt_changebackgroundcolour_errorcodes,
5186 { "Error Codes", "isobus.vt.change_background_colour.error_codes",
5187 FT_UINT8, BASE_HEX, NULL, 0x0,
5188 NULL, HFILL }
5190 { &hf_isobus_vt_changebackgroundcolour_colour,
5191 { "Colour", "isobus.vt.change_background_colour.colour",
5192 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5193 NULL, HFILL }
5195 { &hf_isobus_vt_changeobjectlabel_objectid,
5196 { "Object ID", "isobus.vt.change_object_label.object_id",
5197 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5198 NULL, HFILL }
5200 { &hf_isobus_vt_changeobjectlabel_stringobjectid,
5201 { "String Object ID", "isobus.vt.change_object_label.string_object_id",
5202 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5203 NULL, HFILL }
5205 { &hf_isobus_vt_changeobjectlabel_fonttype,
5206 { "Colour", "isobus.vt.change_object_label.colour",
5207 FT_UINT8, BASE_DEC, NULL, 0x0,
5208 NULL, HFILL }
5210 { &hf_isobus_vt_changeobjectlabel_graphicobjectid,
5211 { "Graphics Representation Object ID", "isobus.vt.change_object_label.graphic_representation_object_id",
5212 FT_UINT16, BASE_DEC, VALS(object_id_strings), 0x0,
5213 NULL, HFILL }
5215 { &hf_isobus_vt_changeobjectlabel_errorcodes,
5216 { "Error Codes", "isobus.vt.change_object_label.error_codes",
5217 FT_UINT8, BASE_HEX, NULL, 0x0,
5218 NULL, HFILL }
5220 { &hf_isobus_vt_changepolygonpoint_objectid,
5221 { "Object ID", "isobus.vt.change_polygon_point.object_id",
5222 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5223 NULL, HFILL }
5225 { &hf_isobus_vt_changepolygonpoint_pointindex,
5226 { "Point Index", "isobus.vt.change_polygon_point.point_index",
5227 FT_UINT8, BASE_DEC, NULL, 0x0,
5228 NULL, HFILL }
5230 { &hf_isobus_vt_changepolygonpoint_xvalue,
5231 { "X Value", "isobus.vt.change_polygon_point.x_value",
5232 FT_UINT16, BASE_DEC, NULL, 0x0,
5233 NULL, HFILL }
5235 { &hf_isobus_vt_changepolygonpoint_yvalue,
5236 { "Y Value", "isobus.vt.change_polygon_point.y_value",
5237 FT_UINT16, BASE_DEC, NULL, 0x0,
5238 NULL, HFILL }
5240 { &hf_isobus_vt_changepolygonpoint_errorcodes,
5241 { "Error Codes", "isobus.vt.change_polygon_point.error_codes",
5242 FT_UINT8, BASE_HEX, NULL, 0x0,
5243 NULL, HFILL }
5245 { &hf_isobus_vt_changepolygonscale_objectid,
5246 { "Object ID", "isobus.vt.change_polygon_scale.object_id",
5247 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5248 NULL, HFILL }
5250 { &hf_isobus_vt_changepolygonscale_newwidth,
5251 { "New Width", "isobus.vt.change_polygon_scale.new_width",
5252 FT_UINT16, BASE_DEC, NULL, 0x0,
5253 NULL, HFILL }
5255 { &hf_isobus_vt_changepolygonscale_newheight,
5256 { "New Height", "isobus.vt.change_polygon_scale.new_height",
5257 FT_UINT16, BASE_DEC, NULL, 0x0,
5258 NULL, HFILL }
5260 { &hf_isobus_vt_changepolygonscale_errorcodes,
5261 { "Error Codes", "isobus.vt.change_polygon_scale.error_codes",
5262 FT_UINT8, BASE_HEX, NULL, 0x0,
5263 NULL, HFILL }
5265 { &hf_isobus_vt_graphicscontext_objectid,
5266 { "Object ID", "isobus.vt.graphics_context.object_id",
5267 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5268 NULL, HFILL }
5270 { &hf_isobus_vt_graphicscontext_subcommandid,
5271 { "Sub Command ID", "isobus.vt.graphics_context.sub_command_id",
5272 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &graphics_context_sub_command_id_ext, 0x0,
5273 NULL, HFILL }
5275 { &hf_isobus_vt_graphicscontext_setgraphicscursor_xposition,
5276 { "X Position", "isobus.vt.graphics_context.set_graphics_cursor.x_position",
5277 FT_INT16, BASE_DEC, NULL, 0x0,
5278 NULL, HFILL }
5280 { &hf_isobus_vt_graphicscontext_setgraphicscursor_yposition,
5281 { "Y Position", "isobus.vt.graphics_context.set_graphics_cursor.y_position",
5282 FT_INT16, BASE_DEC, NULL, 0x0,
5283 NULL, HFILL }
5285 { &hf_isobus_vt_graphicscontext_movegraphicscursor_xoffset,
5286 { "X Offset", "isobus.vt.graphics_context.move_graphics_cursor.x_offset",
5287 FT_INT16, BASE_DEC, NULL, 0x0,
5288 NULL, HFILL }
5290 { &hf_isobus_vt_graphicscontext_movegraphicscursor_yoffset,
5291 { "Y Offset", "isobus.vt.graphics_context.move_graphics_cursor.y_offset",
5292 FT_INT16, BASE_DEC, NULL, 0x0,
5293 NULL, HFILL }
5295 { &hf_isobus_vt_graphicscontext_setforegroundcolour_colour,
5296 { "Colour", "isobus.vt.graphics_context.set_foreground_colour.colour",
5297 FT_UINT8, BASE_DEC, NULL, 0x0,
5298 NULL, HFILL }
5300 { &hf_isobus_vt_graphicscontext_setbackgroundcolour_colour,
5301 { "Colour", "isobus.vt.graphics_context.set_background_colour.colour",
5302 FT_UINT8, BASE_DEC, NULL, 0x0,
5303 NULL, HFILL }
5305 { &hf_isobus_vt_graphicscontext_setlineattributesobjectid_objectid,
5306 { "Object ID", "isobus.vt.graphics_context.set_line_attributes_object_id.object_id",
5307 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5308 NULL, HFILL }
5310 { &hf_isobus_vt_graphicscontext_setfillattributesobjectid_objectid,
5311 { "Object ID", "isobus.vt.graphics_context.set_fill_attributes_object_id.object_id",
5312 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5313 NULL, HFILL }
5315 { &hf_isobus_vt_graphicscontext_setfontattributesobjectid_objectid,
5316 { "Object ID", "isobus.vt.graphics_context.set_font_attributes_object_id.object_id",
5317 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5318 NULL, HFILL }
5320 { &hf_isobus_vt_graphicscontext_eraserectangle_width,
5321 { "Width", "isobus.vt.graphics_context.erase_rectangle.width",
5322 FT_UINT16, BASE_DEC, NULL, 0x0,
5323 NULL, HFILL }
5325 { &hf_isobus_vt_graphicscontext_eraserectangle_height,
5326 { "Height", "isobus.vt.graphics_context.erase_rectangle.height",
5327 FT_UINT16, BASE_DEC, NULL, 0x0,
5328 NULL, HFILL }
5330 { &hf_isobus_vt_graphicscontext_drawpoint_xoffset,
5331 { "X Offset", "isobus.vt.graphics_context.draw_point.x_offset",
5332 FT_INT16, BASE_DEC, NULL, 0x0,
5333 NULL, HFILL }
5335 { &hf_isobus_vt_graphicscontext_drawpoint_yoffset,
5336 { "Y Offset", "isobus.vt.graphics_context.draw_point.y_offset",
5337 FT_INT16, BASE_DEC, NULL, 0x0,
5338 NULL, HFILL }
5340 { &hf_isobus_vt_graphicscontext_drawline_xoffset,
5341 { "X Offset", "isobus.vt.graphics_context.draw_line.x_offset",
5342 FT_INT16, BASE_DEC, NULL, 0x0,
5343 NULL, HFILL }
5345 { &hf_isobus_vt_graphicscontext_drawline_yoffset,
5346 { "Y Offset", "isobus.vt.graphics_context.draw_line.y_offset",
5347 FT_INT16, BASE_DEC, NULL, 0x0,
5348 NULL, HFILL }
5350 { &hf_isobus_vt_graphicscontext_drawrectangle_width,
5351 { "Width", "isobus.vt.graphics_context.draw_rectangle.width",
5352 FT_UINT16, BASE_DEC, NULL, 0x0,
5353 NULL, HFILL }
5355 { &hf_isobus_vt_graphicscontext_drawrectangle_height,
5356 { "Height", "isobus.vt.graphics_context.draw_rectangle.height",
5357 FT_UINT16, BASE_DEC, NULL, 0x0,
5358 NULL, HFILL }
5360 { &hf_isobus_vt_graphicscontext_drawclosedellipse_width,
5361 { "Width", "isobus.vt.graphics_context.draw_closed_rectangle.width",
5362 FT_UINT16, BASE_DEC, NULL, 0x0,
5363 NULL, HFILL }
5365 { &hf_isobus_vt_graphicscontext_drawclosedellipse_height,
5366 { "Height", "isobus.vt.graphics_context.draw_closed_rectangle.height",
5367 FT_UINT16, BASE_DEC, NULL, 0x0,
5368 NULL, HFILL }
5370 { &hf_isobus_vt_graphicscontext_drawpolygon_numberofpoints,
5371 { "Number of polygon points", "isobus.vt.graphics_context.draw_polygon.number_of_points",
5372 FT_UINT8, BASE_DEC, NULL, 0x0,
5373 NULL, HFILL }
5375 { &hf_isobus_vt_graphicscontext_drawpolygon_point_xoffset,
5376 { "X Offset", "isobus.vt.graphics_context.draw_polygon.point.x_offset",
5377 FT_INT16, BASE_DEC, NULL, 0x0,
5378 NULL, HFILL }
5380 { &hf_isobus_vt_graphicscontext_drawpolygon_point_yoffset,
5381 { "Y Offset", "isobus.vt.graphics_context.draw_polygon.point.y_offset",
5382 FT_INT16, BASE_DEC, NULL, 0x0,
5383 NULL, HFILL }
5385 { &hf_isobus_vt_graphicscontext_drawtext_background,
5386 { "Background", "isobus.vt.graphics_context.draw_text.point.background",
5387 FT_UINT8, BASE_DEC, VALS(draw_text_background), 0x0,
5388 NULL, HFILL }
5390 { &hf_isobus_vt_graphicscontext_drawtext_numberofbytes,
5391 { "Number of Bytes", "isobus.vt.graphics_context.draw_text.point.number_of_bytes",
5392 FT_UINT8, BASE_DEC, NULL, 0x0,
5393 NULL, HFILL }
5395 { &hf_isobus_vt_graphicscontext_drawtext_textstring,
5396 { "Text string", "isobus.vt.graphics_context.draw_text.point.text_string",
5397 FT_STRING, BASE_NONE, NULL, 0x0,
5398 NULL, HFILL }
5400 { &hf_isobus_vt_graphicscontext_panviewport_viewportx,
5401 { "Viewport X", "isobus.vt.graphics_context.pan_viewport.viewport_x",
5402 FT_INT16, BASE_DEC, NULL, 0x0,
5403 NULL, HFILL }
5405 { &hf_isobus_vt_graphicscontext_panviewport_viewporty,
5406 { "Viewport Y", "isobus.vt.graphics_context.pan_viewport.viewport_y",
5407 FT_INT16, BASE_DEC, NULL, 0x0,
5408 NULL, HFILL }
5410 { &hf_isobus_vt_graphicscontext_zoomviewport_zoomvalue,
5411 { "Zoom Value", "isobus.vt.graphics_context.zoom_viewport.zoom_value",
5412 FT_FLOAT, BASE_NONE, NULL, 0x0,
5413 NULL, HFILL }
5415 { &hf_isobus_vt_graphicscontext_panandzoomviewport_viewportx,
5416 { "Viewport X", "isobus.vt.graphics_context.pan_and_zoom_viewport.viewport_x",
5417 FT_INT16, BASE_DEC, NULL, 0x0,
5418 NULL, HFILL }
5420 { &hf_isobus_vt_graphicscontext_panandzoomviewport_viewporty,
5421 { "Viewport Y", "isobus.vt.graphics_context.pan_and_zoom_viewport.viewport_y",
5422 FT_INT16, BASE_DEC, NULL, 0x0,
5423 NULL, HFILL }
5425 { &hf_isobus_vt_graphicscontext_panandzoomviewport_zoomvalue,
5426 { "Zoom Value", "isobus.vt.graphics_context.pan_and_zoom_viewport.zoom_value",
5427 FT_FLOAT, BASE_NONE, NULL, 0x0,
5428 NULL, HFILL }
5430 { &hf_isobus_vt_graphicscontext_changeviewportsize_newwidth,
5431 { "New Width", "isobus.vt.graphics_context.change_viewport_size.new_width",
5432 FT_UINT16, BASE_DEC, NULL, 0x0,
5433 NULL, HFILL }
5435 { &hf_isobus_vt_graphicscontext_changeviewportsize_newheight,
5436 { "New Height", "isobus.vt.graphics_context.change_viewport_size.new_height",
5437 FT_UINT16, BASE_DEC, NULL, 0x0,
5438 NULL, HFILL }
5440 { &hf_isobus_vt_graphicscontext_drawvtobject_objectid,
5441 { "Object ID", "isobus.vt.graphics_context.draw_vt_object.object_id",
5442 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5443 NULL, HFILL }
5445 { &hf_isobus_vt_graphicscontext_copycanvastopicturegraphic_objectidpicturegraphic,
5446 { "Object ID of Picture Graphic", "isobus.vt.graphics_context.copy_canvas_to_picture_graphic.object_id_picture_graphic",
5447 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5448 NULL, HFILL }
5450 { &hf_isobus_vt_graphicscontext_copyviewporttopicturegraphic_objectidpicturegraphic,
5451 { "Object ID of Picture Graphic", "isobus.vt.graphics_context.copy_viewport_to_picture_graphic.object_id_picture_graphic",
5452 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5453 NULL, HFILL }
5455 { &hf_isobus_vt_getattributevalue_objectid,
5456 { "Object ID", "isobus.vt.get_attribute_value.object_id",
5457 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5458 NULL, HFILL }
5460 { &hf_isobus_vt_getattributevalue_attributeid,
5461 { "Attribute ID", "isobus.vt.get_attribute_value.attribute_id",
5462 FT_UINT8, BASE_DEC, NULL, 0x0,
5463 NULL, HFILL }
5465 { &hf_isobus_vt_getattributevalue_value,
5466 { "Value", "isobus.vt.get_attribute_value.value",
5467 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
5468 NULL, HFILL }
5470 { &hf_isobus_vt_getattributevalue_errorcodes,
5471 { "Error Codes", "isobus.vt.get_attribute_value.error_codes",
5472 FT_UINT8, BASE_HEX, NULL, 0x0,
5473 NULL, HFILL }
5475 { &hf_isobus_vt_selectcolourmap_objectid,
5476 { "Object ID", "isobus.vt.select_colour_map.object_id",
5477 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5478 NULL, HFILL }
5480 { &hf_isobus_vt_selectcolourmap_errorcodes,
5481 { "Error Codes", "isobus.vt.select_colour_map.error_codes",
5482 FT_UINT8, BASE_HEX, NULL, 0x0,
5483 NULL, HFILL }
5485 { &hf_isobus_vt_executeextendedmacro_objectid,
5486 { "Object ID", "isobus.vt.execute_extended_macro.object_id",
5487 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5488 NULL, HFILL }
5490 { &hf_isobus_vt_executeextendedmacro_errorcodes,
5491 { "Error Codes", "isobus.vt.execute_extended_macro.error_codes",
5492 FT_UINT8, BASE_HEX, NULL, 0x0,
5493 NULL, HFILL }
5495 { &hf_isobus_vt_lockunlockmask_command,
5496 { "Command", "isobus.vt.lock_unlock_mask.command",
5497 FT_UINT8, BASE_DEC, VALS(lock_unlock), 0x0,
5498 NULL, HFILL }
5500 { &hf_isobus_vt_lockunlockmask_objectid,
5501 { "Object ID", "isobus.vt.lock_unlock_mask.object_id",
5502 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5503 NULL, HFILL }
5505 { &hf_isobus_vt_lockunlockmask_locktimeout,
5506 { "Lock Timeout", "isobus.vt.lock_unlock_mask.lock_timeout",
5507 FT_UINT16, BASE_DEC, NULL, 0x0,
5508 NULL, HFILL }
5510 { &hf_isobus_vt_lockunlockmask_errorcodes,
5511 { "Error Codes", "isobus.vt.lock_unlock_mask.error_codes",
5512 FT_UINT8, BASE_HEX, NULL, 0x0,
5513 NULL, HFILL }
5515 { &hf_isobus_vt_executemacro_objectid,
5516 { "Object ID", "isobus.vt.execute_macro.object_id",
5517 FT_UINT8, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5518 NULL, HFILL }
5520 { &hf_isobus_vt_executemacro_errorcodes,
5521 { "Error Codes", "isobus.vt.execute_macro.error_codes",
5522 FT_UINT8, BASE_HEX, NULL, 0x0,
5523 NULL, HFILL }
5525 { &hf_isobus_vt_getmemory_memoryrequired,
5526 { "Memory Required", "isobus.vt.get_memory.memory_required",
5527 FT_UINT32, BASE_DEC, NULL, 0x0,
5528 NULL, HFILL }
5530 { &hf_isobus_vt_getmemory_vtversion,
5531 { "VT Version", "isobus.vt.get_memory.vt_version",
5532 FT_UINT8, BASE_DEC, VALS(vt_versions_extended), 0x0,
5533 NULL, HFILL }
5535 { &hf_isobus_vt_getmemory_status,
5536 { "Status", "isobus.vt.get_memory.status",
5537 FT_UINT8, BASE_DEC, VALS(memory_status), 0x0,
5538 NULL, HFILL }
5540 { &hf_isobus_vt_getsupportedwidechars_codeplane,
5541 { "Code Plane", "isobus.vt.get_supported_widechars.code_plane",
5542 FT_UINT8, BASE_DEC, NULL, 0x0,
5543 NULL, HFILL }
5545 { &hf_isobus_vt_getsupportedwidechars_firstwidechar,
5546 { "First Widechar", "isobus.vt.get_supported_widechars.first_widechar",
5547 FT_UINT16, BASE_DEC, NULL, 0x0,
5548 NULL, HFILL }
5550 { &hf_isobus_vt_getsupportedwidechars_lastwidechar,
5551 { "Last Widechar", "isobus.vt.get_supported_widechars.last_widechar",
5552 FT_UINT16, BASE_DEC, NULL, 0x0,
5553 NULL, HFILL }
5555 { &hf_isobus_vt_getsupportedwidechars_errorcodes,
5556 { "Error Codes", "isobus.vt.get_supported_widechars.error_codes",
5557 FT_UINT8, BASE_HEX, NULL, 0x0,
5558 NULL, HFILL }
5560 { &hf_isobus_vt_getsupportedwidechars_numberofranges,
5561 { "Number of Ranges", "isobus.vt.get_supported_widechars.number_of_ranges",
5562 FT_UINT8, BASE_DEC, NULL, 0x0,
5563 NULL, HFILL }
5565 { &hf_isobus_vt_getsupportedwidechars_firstavailablewidechar,
5566 { "First Available Widechar", "isobus.vt.get_supported_widechars.first_available_widechar",
5567 FT_UINT16, BASE_DEC, NULL, 0x0,
5568 NULL, HFILL }
5570 { &hf_isobus_vt_getsupportedwidechars_lastavailablewidechar,
5571 { "Last Available Widechar", "isobus.vt.get_supported_widechars.last_available_widechar",
5572 FT_UINT16, BASE_DEC, NULL, 0x0,
5573 NULL, HFILL }
5575 { &hf_isobus_vt_getnumberofsoftkeys_navigationsoftkeys,
5576 { "Navigation Soft Keys", "isobus.vt.get_number_of_soft_keys.navigation_soft_keys",
5577 FT_UINT8, BASE_DEC, NULL, 0x0,
5578 NULL, HFILL }
5580 { &hf_isobus_vt_getnumberofsoftkeys_xdots,
5581 { "X Dots", "isobus.vt.get_number_of_soft_keys.x_dots",
5582 FT_UINT8, BASE_DEC, NULL, 0x0,
5583 NULL, HFILL }
5585 { &hf_isobus_vt_getnumberofsoftkeys_ydots,
5586 { "Y Dots", "isobus.vt.get_number_of_soft_keys.y_dots",
5587 FT_UINT8, BASE_DEC, NULL, 0x0,
5588 NULL, HFILL }
5590 { &hf_isobus_vt_getnumberofsoftkeys_virtualsoftkeys,
5591 { "Virtual Soft Keys", "isobus.vt.get_number_of_soft_keys.virtual_soft_keys",
5592 FT_UINT8, BASE_DEC, NULL, 0x0,
5593 NULL, HFILL }
5595 { &hf_isobus_vt_getnumberofsoftkeys_physicalsoftkeys,
5596 { "Physical Soft Keys", "isobus.vt.get_number_of_soft_keys.physical_soft_keys",
5597 FT_UINT8, BASE_DEC, NULL, 0x0,
5598 NULL, HFILL }
5600 { &hf_isobus_vt_gettextfontdata_smallfontsizes,
5601 { "Small Font Sizes", "isobus.vt.get_text_font_data.small_font_sizes",
5602 FT_UINT8, BASE_HEX, NULL, 0x00,
5603 NULL, HFILL }
5605 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font8x8,
5606 { "Font 8 x 8", "isobus.vt.get_text_font_data.small_font_sizes.font_8x8",
5607 FT_UINT8, BASE_HEX, NULL, 0x01,
5608 NULL, HFILL }
5610 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font8x12,
5611 { "Font 8 x 12", "isobus.vt.get_text_font_data.small_font_sizes.font_8x12",
5612 FT_UINT8, BASE_HEX, NULL, 0x02,
5613 NULL, HFILL }
5615 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font12x16,
5616 { "Font 12 x 16", "isobus.vt.get_text_font_data.small_font_sizes.font_12x16",
5617 FT_UINT8, BASE_HEX, NULL, 0x04,
5618 NULL, HFILL }
5620 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font16x16,
5621 { "Font 12 x 16", "isobus.vt.get_text_font_data.small_font_sizes.font_12x16",
5622 FT_UINT8, BASE_HEX, NULL, 0x08,
5623 NULL, HFILL }
5625 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font16x24,
5626 { "Font 16 x 24", "isobus.vt.get_text_font_data.small_font_sizes.font_16x24",
5627 FT_UINT8, BASE_HEX, NULL, 0x10,
5628 NULL, HFILL }
5630 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font24x32,
5631 { "Font 24 x 32", "isobus.vt.get_text_font_data.small_font_sizes.font_24x32",
5632 FT_UINT8, BASE_HEX, NULL, 0x20,
5633 NULL, HFILL }
5635 { &hf_isobus_vt_gettextfontdata_smallfontsizes_font32x32,
5636 { "Font 32 x 32", "isobus.vt.get_text_font_data.small_font_sizes.font_32x32",
5637 FT_UINT8, BASE_HEX, NULL, 0x40,
5638 NULL, HFILL }
5640 { &hf_isobus_vt_gettextfontdata_largefontsizes,
5641 { "Large Font Sizes", "isobus.vt.get_text_font_data.large_font_sizes",
5642 FT_UINT8, BASE_HEX, NULL, 0x00,
5643 NULL, HFILL }
5645 { &hf_isobus_vt_gettextfontdata_largefontsizes_font32x48,
5646 { "Font 32 x 48", "isobus.vt.get_text_font_data.large_font_sizes.font_32x48",
5647 FT_UINT8, BASE_HEX, NULL, 0x01,
5648 NULL, HFILL }
5650 { &hf_isobus_vt_gettextfontdata_largefontsizes_font48x64,
5651 { "Font 48 x 64", "isobus.vt.get_text_font_data.large_font_sizes.font_48x64",
5652 FT_UINT8, BASE_HEX, NULL, 0x02,
5653 NULL, HFILL }
5655 { &hf_isobus_vt_gettextfontdata_largefontsizes_font64x64,
5656 { "Font 64 x 64", "isobus.vt.get_text_font_data.large_font_sizes.font_64x64",
5657 FT_UINT8, BASE_HEX, NULL, 0x04,
5658 NULL, HFILL }
5660 { &hf_isobus_vt_gettextfontdata_largefontsizes_font64x96,
5661 { "Font 64 x 96", "isobus.vt.get_text_font_data.large_font_sizes.font_64x96",
5662 FT_UINT8, BASE_HEX, NULL, 0x08,
5663 NULL, HFILL }
5665 { &hf_isobus_vt_gettextfontdata_largefontsizes_font96x128,
5666 { "Font 96 x 128", "isobus.vt.get_text_font_data.large_font_sizes.font_96x128",
5667 FT_UINT8, BASE_HEX, NULL, 0x10,
5668 NULL, HFILL }
5670 { &hf_isobus_vt_gettextfontdata_largefontsizes_font128x128,
5671 { "Font 128 x 128", "isobus.vt.get_text_font_data.large_font_sizes.font_128x128",
5672 FT_UINT8, BASE_HEX, NULL, 0x20,
5673 NULL, HFILL }
5675 { &hf_isobus_vt_gettextfontdata_largefontsizes_font128x192,
5676 { "Font 128 x 192", "isobus.vt.get_text_font_data.large_font_sizes.font_128x192",
5677 FT_UINT8, BASE_HEX, NULL, 0x40,
5678 NULL, HFILL }
5680 { &hf_isobus_vt_gettextfontdata_typeattributes,
5681 { "Type Attributes", "isobus.vt.get_text_font_data.type_attributes",
5682 FT_UINT8, BASE_HEX, NULL, 0x00,
5683 NULL, HFILL }
5685 { &hf_isobus_vt_gettextfontdata_typeattributes_boldtext,
5686 { "Bold text", "isobus.vt.get_text_font_data.type_attributes.bold_text",
5687 FT_UINT8, BASE_HEX, NULL, 0x01,
5688 NULL, HFILL }
5690 { &hf_isobus_vt_gettextfontdata_typeattributes_crossedouttext,
5691 { "Crossed out text", "isobus.vt.get_text_font_data.type_attributes.crossed_out_text",
5692 FT_UINT8, BASE_HEX, NULL, 0x02,
5693 NULL, HFILL }
5695 { &hf_isobus_vt_gettextfontdata_typeattributes_underlinedtext,
5696 { "Underlined text", "isobus.vt.get_text_font_data.type_attributes.underlined_text",
5697 FT_UINT8, BASE_HEX, NULL, 0x04,
5698 NULL, HFILL }
5700 { &hf_isobus_vt_gettextfontdata_typeattributes_italicstext,
5701 { "Italics text", "isobus.vt.get_text_font_data.type_attributes.italics_text",
5702 FT_UINT8, BASE_HEX, NULL, 0x08,
5703 NULL, HFILL }
5705 { &hf_isobus_vt_gettextfontdata_typeattributes_invertedtext,
5706 { "Inverted text", "isobus.vt.get_text_font_data.type_attributes.inverted_text",
5707 FT_UINT8, BASE_HEX, NULL, 0x10,
5708 NULL, HFILL }
5710 { &hf_isobus_vt_gettextfontdata_typeattributes_flashinverted,
5711 { "Flash inverted", "isobus.vt.get_text_font_data.type_attributes.flash_inverted",
5712 FT_UINT8, BASE_HEX, NULL, 0x20,
5713 NULL, HFILL }
5715 { &hf_isobus_vt_gettextfontdata_typeattributes_flashhidden,
5716 { "Flash hidden", "isobus.vt.get_text_font_data.type_attributes.flash_hidden",
5717 FT_UINT8, BASE_HEX, NULL, 0x40,
5718 NULL, HFILL }
5720 { &hf_isobus_vt_gettextfontdata_typeattributes_proportionalfontrendering,
5721 { "Proportional font rendering", "isobus.vt.get_text_font_data.type_attributes.proportional_font_rendering",
5722 FT_UINT8, BASE_DEC, NULL, 0x40,
5723 NULL, HFILL }
5725 { &hf_isobus_vt_getwindowmaskdata_backgroundcolourdatamask,
5726 { "Background Colour Data Mask", "isobus.vt.get_window_mask_data.background_colour_data_mask",
5727 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5728 NULL, HFILL }
5730 { &hf_isobus_vt_getwindowmaskdata_backgroundcoloursoftkeymask,
5731 { "Background Colour Soft Key Mask", "isobus.vt.get_window_mask_data.background_colour_soft_key_mask",
5732 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_colours), 0x0,
5733 NULL, HFILL }
5735 { &hf_isobus_vt_getsupportedobjects_numberofbytes,
5736 { "Number of bytes", "isobus.vt.get_supported_objects.number_of_bytes",
5737 FT_UINT8, BASE_DEC, NULL, 0x0,
5738 NULL, HFILL }
5740 { &hf_isobus_vt_getsupportedobjects_objecttype,
5741 { "Object Type", "isobus.vt.get_supported_objects.object_type",
5742 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_object_types), 0x0,
5743 NULL, HFILL }
5745 { &hf_isobus_vt_gethardware_boottime,
5746 { "Boot time", "isobus.vt.get_hardware.boot_time",
5747 FT_UINT8, BASE_DEC, NULL, 0x0,
5748 NULL, HFILL }
5750 { &hf_isobus_vt_gethardware_graphictype,
5751 { "Graphic type", "isobus.vt.get_hardware.graphic_type",
5752 FT_UINT8, BASE_DEC, VALS(graphic_types), 0x0,
5753 NULL, HFILL }
5755 { &hf_isobus_vt_gethardware_hardware,
5756 { "Hardware", "isobus.vt.get_hardware.hardware",
5757 FT_UINT8, BASE_HEX, NULL, 0x0,
5758 NULL, HFILL }
5760 { &hf_isobus_vt_gethardware_hardware_touchscreen,
5761 { "Touch Screen", "isobus.vt.get_hardware.hardware.touch_screen",
5762 FT_UINT8, BASE_HEX, NULL, 0x01,
5763 NULL, HFILL }
5765 { &hf_isobus_vt_gethardware_hardware_pointingdevice,
5766 { "Pointing Device", "isobus.vt.get_hardware.hardware.pointing_device",
5767 FT_UINT8, BASE_HEX, NULL, 0x02,
5768 NULL, HFILL }
5770 { &hf_isobus_vt_gethardware_hardware_multifreqaudiooutput,
5771 { "Multiple frequency audio output", "isobus.vt.get_hardware.hardware.multiple_frequency_audio_output",
5772 FT_UINT8, BASE_HEX, NULL, 0x04,
5773 NULL, HFILL }
5775 { &hf_isobus_vt_gethardware_hardware_adjustvolumeaudiooutput,
5776 { "Adjustable volume audio output", "isobus.vt.get_hardware.hardware.adjustable_volume_audio_output",
5777 FT_UINT8, BASE_HEX, NULL, 0x08,
5778 NULL, HFILL }
5780 { &hf_isobus_vt_gethardware_hardware_simultaneousactivationphysicalsoftkeys,
5781 { "Simultaneous activation of physical soft keys", "isobus.vt.get_hardware.hardware.simultaneous_activation_physical_soft_keys",
5782 FT_UINT8, BASE_HEX, NULL, 0x10,
5783 NULL, HFILL }
5785 { &hf_isobus_vt_gethardware_hardware_simultaneousactivationbuttons,
5786 { "Simultaneous activation of buttons", "isobus.vt.get_hardware.hardware.simultaneous_activation_buttons",
5787 FT_UINT8, BASE_HEX, NULL, 0x20,
5788 NULL, HFILL }
5790 { &hf_isobus_vt_gethardware_hardware_dragoperation,
5791 { "Reports drag operation", "isobus.vt.get_hardware.hardware.drag_operation",
5792 FT_UINT8, BASE_HEX, NULL, 0x40,
5793 NULL, HFILL }
5795 { &hf_isobus_vt_gethardware_hardware_intermediatecoordinatesdrag,
5796 { "Intermediate coordinates during drag", "isobus.vt.get_hardware.hardware.intermediate_coordinates_drag",
5797 FT_UINT8, BASE_HEX, NULL, 0x80,
5798 NULL, HFILL }
5800 { &hf_isobus_vt_gethardware_xpixels,
5801 { "X - Pixels", "isobus.vt.get_hardware.x_pixels",
5802 FT_UINT16, BASE_DEC, NULL, 0x0,
5803 NULL, HFILL }
5805 { &hf_isobus_vt_gethardware_ypixels,
5806 { "Y - Pixels", "isobus.vt.get_hardware.y_pixels",
5807 FT_UINT16, BASE_DEC, NULL, 0x0,
5808 NULL, HFILL }
5810 { &hf_isobus_vt_storeversion_versionlabel,
5811 { "Version Label", "isobus.vt.store_version.version_label",
5812 FT_STRING, BASE_NONE, NULL, 0x0,
5813 NULL, HFILL }
5815 { &hf_isobus_vt_storeversion_errorcodes,
5816 { "Error Codes", "isobus.vt.store_version.error_codes",
5817 FT_UINT8, BASE_HEX, NULL, 0x0,
5818 NULL, HFILL }
5820 { &hf_isobus_vt_loadversion_versionlabel,
5821 { "Version Label", "isobus.vt.load_version.version_label",
5822 FT_STRING, BASE_NONE, NULL, 0x0,
5823 NULL, HFILL }
5825 { &hf_isobus_vt_loadversion_errorcodes,
5826 { "Error Codes", "isobus.vt.load_version.error_codes",
5827 FT_UINT8, BASE_HEX, NULL, 0x0,
5828 NULL, HFILL }
5830 { &hf_isobus_vt_deleteversion_versionlabel,
5831 { "Version Label", "isobus.vt.delete_version.version_label",
5832 FT_STRING, BASE_NONE, NULL, 0x0,
5833 NULL, HFILL }
5835 { &hf_isobus_vt_deleteversion_errorcodes,
5836 { "Error Codes", "isobus.vt.delete_version.error_codes",
5837 FT_UINT8, BASE_HEX, NULL, 0x0,
5838 NULL, HFILL }
5840 { &hf_isobus_vt_extendedgetversions_numberofversions,
5841 { "Number of versions", "isobus.vt.extended_get_versions.number_of_versions",
5842 FT_UINT8, BASE_DEC, NULL, 0x0,
5843 NULL, HFILL }
5845 { &hf_isobus_vt_extendedgetversions_versionlabel,
5846 { "Version label", "isobus.vt.extended_get_versions.version_label",
5847 FT_STRING, BASE_NONE, NULL, 0x0,
5848 NULL, HFILL }
5850 { &hf_isobus_vt_extendedstoreversion_versionlabel,
5851 { "Version Label", "isobus.vt.extended_store_version.version_label",
5852 FT_STRING, BASE_NONE, NULL, 0x0,
5853 NULL, HFILL }
5855 { &hf_isobus_vt_extendedstoreversion_errorcodes,
5856 { "Error Codes", "isobus.vt.extended_store_version.error_codes",
5857 FT_UINT8, BASE_HEX, NULL, 0x0,
5858 NULL, HFILL }
5860 { &hf_isobus_vt_extendedloadversion_versionlabel,
5861 { "Version Label", "isobus.vt.extended_load_version.version_label",
5862 FT_STRING, BASE_NONE, NULL, 0x0,
5863 NULL, HFILL }
5865 { &hf_isobus_vt_extendedloadversion_errorcodes,
5866 { "Error Codes", "isobus.vt.extended_load_version.error_codes",
5867 FT_UINT8, BASE_HEX, NULL, 0x0,
5868 NULL, HFILL }
5870 { &hf_isobus_vt_extendeddeleteversion_versionlabel,
5871 { "Version Label", "isobus.vt.extended_delete_version.version_label",
5872 FT_STRING, BASE_NONE, NULL, 0x0,
5873 NULL, HFILL }
5875 { &hf_isobus_vt_extendeddeleteversion_errorcodes,
5876 { "Error Codes", "isobus.vt.extended_delete_version.error_codes",
5877 FT_UINT8, BASE_HEX, NULL, 0x0,
5878 NULL, HFILL }
5880 { &hf_isobus_vt_getversions_numberofversions,
5881 { "Number of versions", "isobus.vt.get_versions.number_of_versions",
5882 FT_UINT8, BASE_DEC, NULL, 0x0,
5883 NULL, HFILL }
5885 { &hf_isobus_vt_getversions_versionlabel,
5886 { "Version label", "isobus.vt.get_versions.version_label",
5887 FT_STRING, BASE_NONE, NULL, 0x0,
5888 NULL, HFILL }
5890 { &hf_isobus_vt_unsupportedvtfunction_unsupportedvtfunction,
5891 { "Unsupported VT function", "isobus.vt.unsupported_vt_function.unsupported_vt_function",
5892 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &vt_function_code_ext, 0x0,
5893 NULL, HFILL }
5895 { &hf_isobus_vt_vtstatus_workingsetmaster,
5896 { "Working Set Master", "isobus.vt.vtstatus.working_set_master",
5897 FT_UINT8, BASE_DEC, NULL, 0x0,
5898 NULL, HFILL }
5900 { &hf_isobus_vt_vtstatus_objectiddatamask,
5901 { "Object ID Data Mask", "isobus.vt.vtstatus.object_id_data_mask",
5902 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5903 NULL, HFILL }
5905 { &hf_isobus_vt_vtstatus_objectidsoftkeymask,
5906 { "Object ID Soft Key Mask", "isobus.vt.vtstatus.object_id_soft_key_mask",
5907 FT_UINT16, BASE_DEC_HEX, VALS(object_id_strings), 0x0,
5908 NULL, HFILL }
5910 { &hf_isobus_vt_vtstatus_vtbusycodes,
5911 { "VT Busy Codes", "isobus.vt.vtstatus.vt_busy_codes",
5912 FT_UINT8, BASE_HEX, NULL, 0x0,
5913 NULL, HFILL }
5915 { &hf_isobus_vt_vtstatus_vtbusycodes_updatingvisiblemask,
5916 { "VT is busy updating visible mask", "isobus.vt.vtstatus.vt_busy_codes.updating_visible_mask",
5917 FT_UINT8, BASE_HEX, NULL, 0x80,
5918 NULL, HFILL }
5920 { &hf_isobus_vt_vtstatus_vtbusycodes_savingdata,
5921 { "VT is busy saving data to non-volatile memory","isobus.vt.vtstatus.vt_busy_codes.saving_data",
5922 FT_UINT8, BASE_HEX, NULL, 0x40,
5923 NULL, HFILL }
5925 { &hf_isobus_vt_vtstatus_vtbusycodes_executingcommand,
5926 { "VT is busy executing a command", "isobus.vt.vtstatus.vt_busy_codes.executing_commands",
5927 FT_UINT8, BASE_HEX, NULL, 0x20,
5928 NULL, HFILL }
5930 { &hf_isobus_vt_vtstatus_vtbusycodes_executingmacro,
5931 { "VT is busy executing a Macro", "isobus.vt.vtstatus.vt_busy_codes.executing_macro",
5932 FT_UINT8, BASE_HEX, NULL, 0x10,
5933 NULL, HFILL }
5935 { &hf_isobus_vt_vtstatus_vtbusycodes_parsingobjectpool,
5936 { "VT is busy parsing an object pool", "isobus.vt.vtstatus.vt_busy_codes.parsing_object_pool",
5937 FT_UINT8, BASE_HEX, NULL, 0x8,
5938 NULL, HFILL }
5940 { &hf_isobus_vt_vtstatus_vtbusycodes_auxcontrolsactive,
5941 { "Auxiliary controls learn mode active", "isobus.vt.vtstatus.vt_function_codes.aux_controls_active",
5942 FT_UINT8, BASE_HEX, NULL, 0x2,
5943 NULL, HFILL }
5945 { &hf_isobus_vt_vtstatus_vtbusycodes_outofmemory,
5946 { "VT is out of memory", "isobus.vt.vtstatus.vt_function_codes.out_of_memory",
5947 FT_UINT8, BASE_HEX, NULL, 0x1,
5948 NULL, HFILL }
5950 { &hf_isobus_vt_vtstatus_vtfunctioncodes,
5951 { "VT Function Codes", "isobus.vt.vtstatus.vt_function_codes",
5952 FT_UINT8, BASE_HEX, NULL, 0x0,
5953 NULL, HFILL }
5955 { &hf_isobus_vt_wrksetmain_bitmask,
5956 { "Bitmask", "isobus.vt.working_set_maintenance.bitmask",
5957 FT_UINT8, BASE_DEC, NULL, 0x80,
5958 NULL, HFILL }
5960 { &hf_isobus_vt_wrksetmain_version,
5961 { "Version", "isobus.vt.working_set_maintenance.version",
5962 FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(vt_versions), 0x0,
5963 NULL, HFILL }
5967 static int *ett[] = {
5968 &ett_isobus_vt,
5969 &ett_isobus_vt_vtstatus_busycodes_subtree,
5970 &ett_isobus_vt_getsupportedwidechars_range,
5971 &ett_isobus_vt_gettextfontdata_smallfontsizes,
5972 &ett_isobus_vt_gettextfontdata_largefontsizes,
5973 &ett_isobus_vt_gettextfontdata_typeattributes,
5974 &ett_isobus_vt_gethardware_hardware,
5975 &ett_isobus_vt_preferredassignment_inputunit,
5976 &ett_isobus_vt_preferredassignment_inputunit_preferredfunction,
5977 &ett_isobus_vt_auxiliarycapabilities_inputunit,
5978 &ett_isobus_vt_auxiliarycapabilities_inputunit_set,
5979 &ett_isobus_vt_auxiliaryassignmenttype2_flags,
5980 &ett_isobus_vt_auxiliaryinputtype2status_operatingstate
5983 module_t *vt_module;
5985 register_init_routine(&isobus_vt_init);
5987 proto_vt = proto_register_protocol("ISObus Virtual Terminal",
5988 "ISObus VT",
5989 "isobus.vt");
5991 proto_register_field_array(proto_vt, hf, array_length(hf));
5992 proto_register_subtree_array(ett, array_length(ett));
5994 /* register preferences */
5995 vt_module = prefs_register_protocol(proto_vt, NULL);
5997 /* file to translate object ids to names, format should be separate line for each object.
5998 * objects should be specified in the following way: <object ID number>,<object ID name>
6000 prefs_register_filename_preference(vt_module, "object_ids", "Object ID Translation",
6001 "File containing a translation from object ID to string", &object_id_translation,
6002 false);
6005 void
6006 proto_reg_handoff_isobus_vt(void)
6008 dissector_handle_t vt_handle_vt_to_ecu;
6009 dissector_handle_t vt_handle_ecu_to_vt;
6011 vt_handle_vt_to_ecu = create_dissector_handle( dissect_vt_to_ecu, proto_vt );
6012 vt_handle_ecu_to_vt = create_dissector_handle( dissect_ecu_to_vt, proto_vt );
6014 dissector_add_uint("isobus.pdu_format", 230, vt_handle_vt_to_ecu);
6015 dissector_add_uint("isobus.pdu_format", 231, vt_handle_ecu_to_vt);
6019 * Editor modelines - https://www.wireshark.org/tools/modelines.html
6021 * Local variables:
6022 * c-basic-offset: 4
6023 * tab-width: 8
6024 * indent-tabs-mode: nil
6025 * End:
6027 * vi: set shiftwidth=4 tabstop=8 expandtab:
6028 * :indentSize=4:tabSize=8:noTabs=true: