forked from peschuster/wireshark-atem-dissector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atem_dissector.lua
2503 lines (2304 loc) · 208 KB
/
atem_dissector.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- do not modify this table
local debug_level = {
DISABLED = 0,
LEVEL_1 = 1,
LEVEL_2 = 2
}
-- set this DEBUG to debug_level.LEVEL_1 to enable printing debug_level info
-- set it to debug_level.LEVEL_2 to enable really verbose printing
-- note: this will be overridden by user's preference settings
local DEBUG = debug_level.LEVEL_2
local default_settings =
{
debug_level = DEBUG,
port = 9910,
}
local dprint = function() end
local dprint2 = function() end
local function reset_debug_level()
if default_settings.debug_level > debug_level.DISABLED then
dprint = function(...)
print(table.concat({"Lua:", ...}," "))
end
if default_settings.debug_level > debug_level.LEVEL_1 then
dprint2 = dprint
end
end
end
-- call it now
reset_debug_level()
dprint2("Wireshark version = ", get_version())
dprint2("Lua version = ", _VERSION)
----------------------------------------
-- Unfortunately, the older Wireshark/Tshark versions have bugs, and part of the point
-- of this script is to test those bugs are now fixed. So we need to check the version
-- end error out if it's too old.
local major, minor, micro = get_version():match("(%d+)%.(%d+)%.(%d+)")
if major and tonumber(major) <= 1 and ((tonumber(minor) <= 10) or (tonumber(minor) == 11 and tonumber(micro) < 3)) then
error( "Sorry, but your Wireshark/Tshark version ("..get_version()..") is too old for this script!\n"..
"This script needs Wireshark/Tshark version 1.11.3 or higher.\n" )
end
-- more sanity checking
-- verify we have the ProtoExpert class in wireshark, as that's the newest thing this file uses
assert(ProtoExpert.new, "Wireshark does not have the ProtoExpert class, so it's too old - get the latest 1.11.3 or higher")
----------------------------------------
----------------------------------------
-- creates a Proto object, but doesn't register it yet
local atem_proto = Proto("atem","BMD ATEM Protocol")
----------------------------------------
-- multiple ways to do the same thing: create a protocol field (but not register it yet)
-- the abbreviation should always have "<myproto>." before the specific abbreviation, to avoid collisions
local pf_packet_length = ProtoField.new ("Packet length", "atem.packet_length", ftypes.UINT16, nil, base.DEC, 0x07FF)
local pf_flags = ProtoField.new ("Command flags", "atem.flags", ftypes.UINT8, nil, base.HEX, 0xF8)
local pf_session_id = ProtoField.new ("Session id", "atem.session_id", ftypes.UINT16, nil, base.HEX)
local pf_switcher_pkt_id = ProtoField.new ("Switcher pkt id", "atem.switcher_pkt_id", ftypes.UINT16, nil, base.HEX)
local pf_client_pkt_id = ProtoField.new ("Client pkt id", "atem.client_pkt_id", ftypes.UINT16, nil, base.HEX)
local pf_ack_pkt_id = ProtoField.new ("ACKed pkt id", "atem.ack_pkt_id", ftypes.UINT16, nil, base.HEX)
local pf_unknown1 = ProtoField.new ("Unknown", "atem.unknown1", ftypes.UINT16, nil, base.HEX)
local pf_cmd_length = ProtoField.new ("Command length", "atem.cmd.length", ftypes.UINT16, nil, base.DEC)
local pf_cmd_name = ProtoField.new ("Command name", "atem.cmd.name", ftypes.STRING)
-- within the flags field, we want to parse/show the bits separately
-- note the "base" argument becomes the size of the bitmask'ed field when ftypes.BOOLEAN is used
-- the "mask" argument is which bits we want to use for this field (e.g., base=16 and mask=0x8000 means we want the top bit of a 16-bit field)
-- again the following shows different ways of doing the same thing basically
local pf_flag_ack = ProtoField.new ("ACK", "atem.flags.ack", ftypes.BOOLEAN, {"1","0"}, 8, 0x08)
local pf_flag_init = ProtoField.new ("INIT", "atem.flags.init", ftypes.BOOLEAN, {"1","0"}, 8, 0x10)
local pf_flag_retransmission = ProtoField.new ("RETRANSMISSION", "atem.flags.retransmission", ftypes.BOOLEAN, {"1","0"}, 8, 0x20)
local pf_flag_hello = ProtoField.new ("HELLO", "atem.flags.hello", ftypes.BOOLEAN, {"1","0"}, 8, 0x40)
local pf_flag_response = ProtoField.new ("RESPONSE", "atem.flags.response", ftypes.BOOLEAN, {"1","0"}, 8, 0x80)
local pf_fields = {}
local VALS = {}
pf_fields["pf_cmd__ver_major"] = ProtoField.new ("Major", "atem.cmd._ver.major", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd__ver_minor"] = ProtoField.new ("Minor", "atem.cmd._ver.minor", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd__pin_name0"] = ProtoField.new ("Name", "atem.cmd._pin.name0", ftypes.STRING, nil, base.NONE)
pf_fields["pf_cmd_warn_text"] = ProtoField.new ("Text", "atem.cmd.warn.text", ftypes.STRING, nil, base.NONE)
pf_fields["pf_cmd__top_mes"] = ProtoField.new ("MEs", "atem.cmd._top.mes", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_sources0"] = ProtoField.new ("Sources", "atem.cmd._top.sources0", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_colorgenerators"] = ProtoField.new ("Color Generators", "atem.cmd._top.colorgenerators", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_auxbusses"] = ProtoField.new ("AUX busses", "atem.cmd._top.auxbusses", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_downstreamkeyes"] = ProtoField.new ("Downstream Keyes", "atem.cmd._top.downstreamkeyes", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_stingers"] = ProtoField.new ("Stingers", "atem.cmd._top.stingers", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_dves"] = ProtoField.new ("DVEs", "atem.cmd._top.dves", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__top_supersources"] = ProtoField.new ("SuperSources", "atem.cmd._top.supersources", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_unknown0"] = ProtoField.new ("Unknown", "atem.field.unknown0", ftypes.UINT8, nil, base.DEC)
VALS["VALS__TOP_HASSDOUTPUT"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd__top_hassdoutput"] = ProtoField.new ("Has SD Output", "atem.cmd._top.hassdoutput", ftypes.UINT8, VALS["VALS__TOP_HASSDOUTPUT"], base.DEC)
pf_fields["pf_field_unknown1"] = ProtoField.new ("Unknown", "atem.field.unknown1", ftypes.NONE, nil, base.NONE)
VALS["VALS_ME"] = {[0] = "ME1", [1] = "ME2"}
pf_fields["pf_field_me"] = ProtoField.new ("M/E", "atem.field.me", ftypes.UINT8, VALS["VALS_ME"], base.DEC)
pf_fields["pf_cmd__mec_keyersonme"] = ProtoField.new ("Keyers On ME", "atem.cmd._mec.keyersonme", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__mpl_stillbanks"] = ProtoField.new ("Still Banks", "atem.cmd._mpl.stillbanks", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__mpl_clipbanks"] = ProtoField.new ("Clip Banks", "atem.cmd._mpl.clipbanks", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__mvc_multiviewers"] = ProtoField.new ("Multi Viewers", "atem.cmd._mvc.multiviewers", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_unknown2"] = ProtoField.new ("Unknown", "atem.field.unknown2", ftypes.NONE, nil, base.NONE)
pf_fields["pf_cmd__ssc_boxes"] = ProtoField.new ("Boxes", "atem.cmd._ssc.boxes", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_unknown3"] = ProtoField.new ("Unknown", "atem.field.unknown3", ftypes.NONE, nil, base.NONE)
pf_fields["pf_cmd__tlc_tallychannels"] = ProtoField.new ("Tally Channels", "atem.cmd._tlc.tallychannels", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd__amc_audiochannels"] = ProtoField.new ("Audio Channels", "atem.cmd._amc.audiochannels", ftypes.UINT8, nil, base.DEC)
VALS["VALS__AMC_HASMONITOR"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd__amc_hasmonitor"] = ProtoField.new ("Has Monitor", "atem.cmd._amc.hasmonitor", ftypes.UINT8, VALS["VALS__AMC_HASMONITOR"], base.DEC)
pf_fields["pf_cmd__vmc_modes"] = ProtoField.new ("Modes", "atem.cmd._vmc.modes", ftypes.UINT24, nil, base.DEC, 0x3FFFF)
pf_fields["pf_flag_cmd__vmc_modes_525i5994ntsc"] = ProtoField.new ("525i59.94 NTSC", "atem.cmd._vmc.modes.flags.525i5994ntsc", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x1)
pf_fields["pf_flag_cmd__vmc_modes_625i50pal"] = ProtoField.new ("625i 50 PAL", "atem.cmd._vmc.modes.flags.625i50pal", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x2)
pf_fields["pf_flag_cmd__vmc_modes_525i5994ntsc169"] = ProtoField.new ("525i59.94 NTSC 16:9", "atem.cmd._vmc.modes.flags.525i5994ntsc169", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x4)
pf_fields["pf_flag_cmd__vmc_modes_625i50pal169"] = ProtoField.new ("625i 50 PAL 16:9", "atem.cmd._vmc.modes.flags.625i50pal169", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x8)
pf_fields["pf_flag_cmd__vmc_modes_720p50"] = ProtoField.new ("720p50", "atem.cmd._vmc.modes.flags.720p50", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x10)
pf_fields["pf_flag_cmd__vmc_modes_720p5994"] = ProtoField.new ("720p59.94", "atem.cmd._vmc.modes.flags.720p5994", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x20)
pf_fields["pf_flag_cmd__vmc_modes_1080i50"] = ProtoField.new ("1080i50", "atem.cmd._vmc.modes.flags.1080i50", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x40)
pf_fields["pf_flag_cmd__vmc_modes_1080i5994"] = ProtoField.new ("1080i59.94", "atem.cmd._vmc.modes.flags.1080i5994", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x80)
pf_fields["pf_flag_cmd__vmc_modes_1080p2398"] = ProtoField.new ("1080p23.98", "atem.cmd._vmc.modes.flags.1080p2398", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x100)
pf_fields["pf_flag_cmd__vmc_modes_1080p24"] = ProtoField.new ("1080p24", "atem.cmd._vmc.modes.flags.1080p24", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x200)
pf_fields["pf_flag_cmd__vmc_modes_1080p25"] = ProtoField.new ("1080p25", "atem.cmd._vmc.modes.flags.1080p25", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x400)
pf_fields["pf_flag_cmd__vmc_modes_1080p2997"] = ProtoField.new ("1080p29.97", "atem.cmd._vmc.modes.flags.1080p2997", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x800)
pf_fields["pf_flag_cmd__vmc_modes_1080p50"] = ProtoField.new ("1080p50", "atem.cmd._vmc.modes.flags.1080p50", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x1000)
pf_fields["pf_flag_cmd__vmc_modes_1080p5994"] = ProtoField.new ("1080p59.94", "atem.cmd._vmc.modes.flags.1080p5994", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x2000)
pf_fields["pf_flag_cmd__vmc_modes_2160p2398"] = ProtoField.new ("2160p23.98", "atem.cmd._vmc.modes.flags.2160p2398", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x4000)
pf_fields["pf_flag_cmd__vmc_modes_2160p24"] = ProtoField.new ("2160p24", "atem.cmd._vmc.modes.flags.2160p24", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x8000)
pf_fields["pf_flag_cmd__vmc_modes_2160p25"] = ProtoField.new ("2160p25", "atem.cmd._vmc.modes.flags.2160p25", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x10000)
pf_fields["pf_flag_cmd__vmc_modes_2160p2997"] = ProtoField.new ("2160p29.97", "atem.cmd._vmc.modes.flags.2160p2997", ftypes.BOOLEAN, {"Yes","No"}, 18, 0x20000)
pf_fields["pf_cmd__mac_banks"] = ProtoField.new ("Banks", "atem.cmd._mac.banks", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_powr_status"] = ProtoField.new ("Status", "atem.cmd.powr.status", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_powr_status_mainpower"] = ProtoField.new ("Main Power", "atem.cmd.powr.status.flags.mainpower", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_powr_status_backuppower"] = ProtoField.new ("Backup Power", "atem.cmd.powr.status.flags.backuppower", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
VALS["VALS_MODE"] = {[0] = "Center Cut", [1] = "Letterbox", [2] = "Anamorphic"}
pf_fields["pf_field_mode"] = ProtoField.new ("Mode", "atem.field.mode", ftypes.UINT8, VALS["VALS_MODE"], base.DEC)
VALS["VALS_FORMAT"] = {[0] = "525i59.94 NTSC", [1] = "625i 50 PAL", [2] = "525i59.94 NTSC 16:9", [3] = "625i 50 PAL 16:9", [4] = "720p50", [5] = "720p59.94", [6] = "1080i50", [7] = "1080i59.94", [8] = "1080p23.98", [9] = "1080p24", [10] = "1080p25", [11] = "1080p29.97", [12] = "1080p50", [13] = "1080p59.94", [14] = "2160p23.98", [15] = "2160p24", [16] = "2160p25", [17] = "2160p29.97"}
pf_fields["pf_field_format"] = ProtoField.new ("Format", "atem.field.format", ftypes.UINT8, VALS["VALS_FORMAT"], base.DEC)
VALS["VALS_VIDEOSOURCE"] = {[0] = "Black", [1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1000] = "Color Bars", [2001] = "Color 1", [2002] = "Color 2", [3010] = "Media Player 1", [3011] = "Media Player 1 Key", [3020] = "Media Player 2", [3021] = "Media Player 2 Key", [4010] = "Key 1 Mask", [4020] = "Key 2 Mask", [4030] = "Key 3 Mask", [4040] = "Key 4 Mask", [5010] = "DSK 1 Mask", [5020] = "DSK 2 Mask", [6000] = "Super Source", [7001] = "Clean Feed 1", [7002] = "Clean Feed 2", [8001] = "Auxilary 1", [8002] = "Auxilary 2", [8003] = "Auxilary 3", [8004] = "Auxilary 4", [8005] = "Auxilary 5", [8006] = "Auxilary 6", [10010] = "ME 1 Prog", [10011] = "ME 1 Prev", [10020] = "ME 2 Prog", [10021] = "ME 2 Prev"}
pf_fields["pf_field_videosource"] = ProtoField.new ("Video Source", "atem.field.videosource", ftypes.UINT16, VALS["VALS_VIDEOSOURCE"], base.DEC)
pf_fields["pf_field_longname"] = ProtoField.new ("Long Name", "atem.field.longname", ftypes.STRING, nil, base.NONE)
pf_fields["pf_field_shortname"] = ProtoField.new ("Short Name", "atem.field.shortname", ftypes.STRING, nil, base.NONE)
pf_fields["pf_cmd_inpr_availableexternalporttypes"] = ProtoField.new ("Available External Port Types", "atem.cmd.inpr.availableexternalporttypes", ftypes.UINT8, nil, base.DEC, 0x1F)
pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_sdi"] = ProtoField.new ("SDI", "atem.cmd.inpr.availableexternalporttypes.flags.sdi", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x1)
pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_hdmi"] = ProtoField.new ("HDMI", "atem.cmd.inpr.availableexternalporttypes.flags.hdmi", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x2)
pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_component"] = ProtoField.new ("Component", "atem.cmd.inpr.availableexternalporttypes.flags.component", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x4)
pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_composite"] = ProtoField.new ("Composite", "atem.cmd.inpr.availableexternalporttypes.flags.composite", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x8)
pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_svideo"] = ProtoField.new ("SVideo", "atem.cmd.inpr.availableexternalporttypes.flags.svideo", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x10)
VALS["VALS_INPR_EXTERNALPORTTYPE0"] = {[0] = "Internal", [1] = "SDI", [2] = "HDMI", [3] = "Composite", [4] = "Component", [5] = "SVideo"}
pf_fields["pf_cmd_inpr_externalporttype0"] = ProtoField.new ("External Port Type", "atem.cmd.inpr.externalporttype0", ftypes.UINT8, VALS["VALS_INPR_EXTERNALPORTTYPE0"], base.DEC)
VALS["VALS_INPR_PORTTYPE"] = {[0] = "External", [1] = "Black", [2] = "Color Bars", [3] = "Color Generator", [4] = "Media Player Fill", [5] = "Media Player Key", [6] = "SuperSource", [128] = "ME Output", [129] = "Auxilary", [130] = "Mask"}
pf_fields["pf_cmd_inpr_porttype"] = ProtoField.new ("Port Type", "atem.cmd.inpr.porttype", ftypes.UINT8, VALS["VALS_INPR_PORTTYPE"], base.DEC)
pf_fields["pf_cmd_inpr_availability"] = ProtoField.new ("Availability", "atem.cmd.inpr.availability", ftypes.UINT8, nil, base.DEC, 0x1F)
pf_fields["pf_flag_cmd_inpr_availability_auxilary"] = ProtoField.new ("Auxilary", "atem.cmd.inpr.availability.flags.auxilary", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x1)
pf_fields["pf_flag_cmd_inpr_availability_multiviewer"] = ProtoField.new ("Multiviewer", "atem.cmd.inpr.availability.flags.multiviewer", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x2)
pf_fields["pf_flag_cmd_inpr_availability_supersourceart"] = ProtoField.new ("Super Source Art", "atem.cmd.inpr.availability.flags.supersourceart", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x4)
pf_fields["pf_flag_cmd_inpr_availability_supersourcebox"] = ProtoField.new ("Super Source Box", "atem.cmd.inpr.availability.flags.supersourcebox", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x8)
pf_fields["pf_flag_cmd_inpr_availability_keysourceseverywhere"] = ProtoField.new ("Key Sources (everywhere)", "atem.cmd.inpr.availability.flags.keysourceseverywhere", ftypes.BOOLEAN, {"Yes","No"}, 5, 0x10)
pf_fields["pf_cmd_inpr_meavailability"] = ProtoField.new ("ME Availability", "atem.cmd.inpr.meavailability", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_inpr_meavailability_me1fillsources"] = ProtoField.new ("ME1 + Fill Sources", "atem.cmd.inpr.meavailability.flags.me1fillsources", ftypes.BOOLEAN, {"Yes","No"}, 2, 0x1)
pf_fields["pf_flag_cmd_inpr_meavailability_me2fillsources"] = ProtoField.new ("ME2 + Fill Sources", "atem.cmd.inpr.meavailability.flags.me2fillsources", ftypes.BOOLEAN, {"Yes","No"}, 2, 0x2)
VALS["VALS_INPR_AVAILABLE3"] = {[0] = "Off", [1] = "?"}
pf_fields["pf_cmd_inpr_available3"] = ProtoField.new ("Available 3", "atem.cmd.inpr.available3", ftypes.UINT8, VALS["VALS_INPR_AVAILABLE3"], base.DEC)
pf_fields["pf_cmd_cinl_setmask0"] = ProtoField.new ("Set Mask", "atem.cmd.cinl.setmask0", ftypes.UINT8, nil, base.DEC, 0x7)
pf_fields["pf_flag_cmd_cinl_setmask0_longname"] = ProtoField.new ("Long Name", "atem.cmd.cinl.setmask0.flags.longname", ftypes.BOOLEAN, {"On","Off"}, 3, 0x1)
pf_fields["pf_flag_cmd_cinl_setmask0_shortname"] = ProtoField.new ("Short Name", "atem.cmd.cinl.setmask0.flags.shortname", ftypes.BOOLEAN, {"On","Off"}, 3, 0x2)
pf_fields["pf_flag_cmd_cinl_setmask0_externalporttype"] = ProtoField.new ("External Port Type", "atem.cmd.cinl.setmask0.flags.externalporttype", ftypes.BOOLEAN, {"On","Off"}, 3, 0x4)
pf_fields["pf_cmd_cinl_externalporttype1"] = ProtoField.new ("External Port Type", "atem.cmd.cinl.externalporttype1", ftypes.UINT16, nil, base.DEC)
VALS["VALS_MULTIVIEWER"] = {[0] = "1", [1] = "2"}
pf_fields["pf_field_multiviewer"] = ProtoField.new ("Multi Viewer", "atem.field.multiviewer", ftypes.UINT8, VALS["VALS_MULTIVIEWER"], base.DEC)
VALS["VALS_LAYOUT"] = {[0] = "Top", [1] = "Bottom", [2] = "Left", [3] = "Right"}
pf_fields["pf_field_layout"] = ProtoField.new ("Layout", "atem.field.layout", ftypes.UINT8, VALS["VALS_LAYOUT"], base.DEC)
VALS["VALS_CMVP_SETMASK1"] = {[0] = "Layout"}
pf_fields["pf_cmd_cmvp_setmask1"] = ProtoField.new ("Set Mask", "atem.cmd.cmvp.setmask1", ftypes.UINT8, VALS["VALS_CMVP_SETMASK1"], base.DEC)
pf_fields["pf_field_windowindex"] = ProtoField.new ("Window Index", "atem.field.windowindex", ftypes.UINT8, nil, base.DEC)
VALS["VALS_STYLE0"] = {[0] = "Mix", [1] = "Dip", [2] = "Wipe", [3] = "DVE", [4] = "Sting"}
pf_fields["pf_field_style0"] = ProtoField.new ("Style", "atem.field.style0", ftypes.UINT8, VALS["VALS_STYLE0"], base.DEC)
pf_fields["pf_field_nexttransition"] = ProtoField.new ("Next Transition", "atem.field.nexttransition", ftypes.UINT8, nil, base.DEC, 0x1F)
pf_fields["pf_flag_field_nexttransition_background"] = ProtoField.new ("Background", "atem.field.nexttransition.flags.background", ftypes.BOOLEAN, {"On","Off"}, 5, 0x1)
pf_fields["pf_flag_field_nexttransition_key1"] = ProtoField.new ("Key 1", "atem.field.nexttransition.flags.key1", ftypes.BOOLEAN, {"On","Off"}, 5, 0x2)
pf_fields["pf_flag_field_nexttransition_key2"] = ProtoField.new ("Key 2", "atem.field.nexttransition.flags.key2", ftypes.BOOLEAN, {"On","Off"}, 5, 0x4)
pf_fields["pf_flag_field_nexttransition_key3"] = ProtoField.new ("Key 3", "atem.field.nexttransition.flags.key3", ftypes.BOOLEAN, {"On","Off"}, 5, 0x8)
pf_fields["pf_flag_field_nexttransition_key4"] = ProtoField.new ("Key 4", "atem.field.nexttransition.flags.key4", ftypes.BOOLEAN, {"On","Off"}, 5, 0x10)
VALS["VALS_TRSS_STYLENEXT"] = {[0] = "Mix", [1] = "Dip", [2] = "Wipe", [3] = "DVE", [4] = "Sting"}
pf_fields["pf_cmd_trss_stylenext"] = ProtoField.new ("Style Next", "atem.cmd.trss.stylenext", ftypes.UINT8, VALS["VALS_TRSS_STYLENEXT"], base.DEC)
pf_fields["pf_cmd_trss_nexttransitionnext"] = ProtoField.new ("Next Transition Next", "atem.cmd.trss.nexttransitionnext", ftypes.UINT8, nil, base.DEC, 0x1F)
pf_fields["pf_flag_cmd_trss_nexttransitionnext_background"] = ProtoField.new ("Background", "atem.cmd.trss.nexttransitionnext.flags.background", ftypes.BOOLEAN, {"On","Off"}, 5, 0x1)
pf_fields["pf_flag_cmd_trss_nexttransitionnext_key1"] = ProtoField.new ("Key 1", "atem.cmd.trss.nexttransitionnext.flags.key1", ftypes.BOOLEAN, {"On","Off"}, 5, 0x2)
pf_fields["pf_flag_cmd_trss_nexttransitionnext_key2"] = ProtoField.new ("Key 2", "atem.cmd.trss.nexttransitionnext.flags.key2", ftypes.BOOLEAN, {"On","Off"}, 5, 0x4)
pf_fields["pf_flag_cmd_trss_nexttransitionnext_key3"] = ProtoField.new ("Key 3", "atem.cmd.trss.nexttransitionnext.flags.key3", ftypes.BOOLEAN, {"On","Off"}, 5, 0x8)
pf_fields["pf_flag_cmd_trss_nexttransitionnext_key4"] = ProtoField.new ("Key 4", "atem.cmd.trss.nexttransitionnext.flags.key4", ftypes.BOOLEAN, {"On","Off"}, 5, 0x10)
pf_fields["pf_cmd_cttp_setmask2"] = ProtoField.new ("Set Mask", "atem.cmd.cttp.setmask2", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_cttp_setmask2_transitionstyle"] = ProtoField.new ("Transition Style", "atem.cmd.cttp.setmask2.flags.transitionstyle", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_cttp_setmask2_nexttransition"] = ProtoField.new ("Next Transition", "atem.cmd.cttp.setmask2.flags.nexttransition", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
VALS["VALS_ENABLED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_enabled"] = ProtoField.new ("Enabled", "atem.field.enabled", ftypes.UINT8, VALS["VALS_ENABLED"], base.DEC)
VALS["VALS_TRPS_INTRANSITION0"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd_trps_intransition0"] = ProtoField.new ("In Transition", "atem.cmd.trps.intransition0", ftypes.UINT8, VALS["VALS_TRPS_INTRANSITION0"], base.DEC)
pf_fields["pf_field_framesremaining"] = ProtoField.new ("Frames Remaining", "atem.field.framesremaining", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_position"] = ProtoField.new ("Position", "atem.field.position", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_rate"] = ProtoField.new ("Rate", "atem.field.rate", ftypes.UINT8, nil, base.DEC)
VALS["VALS_INPUT0"] = {[0] = "Black", [1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1000] = "Color Bars", [2001] = "Color 1", [2002] = "Color 2", [3010] = "Media Player 1", [3011] = "Media Player 1 Key", [3020] = "Media Player 2", [3021] = "Media Player 2 Key", [4010] = "Key 1 Mask", [4020] = "Key 2 Mask", [4030] = "Key 3 Mask", [4040] = "Key 4 Mask", [5010] = "DSK 1 Mask", [5020] = "DSK 2 Mask", [6000] = "Super Source", [7001] = "Clean Feed 1", [7002] = "Clean Feed 2", [8001] = "Auxilary 1", [8002] = "Auxilary 2", [8003] = "Auxilary 3", [8004] = "Auxilary 4", [8005] = "Auxilary 5", [8006] = "Auxilary 6", [10010] = "ME 1 Prog", [10011] = "ME 1 Prev", [10020] = "ME 2 Prog", [10021] = "ME 2 Prev"}
pf_fields["pf_field_input0"] = ProtoField.new ("Input", "atem.field.input0", ftypes.UINT16, VALS["VALS_INPUT0"], base.DEC)
pf_fields["pf_cmd_ctdp_setmask3"] = ProtoField.new ("Set Mask", "atem.cmd.ctdp.setmask3", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_ctdp_setmask3_rate"] = ProtoField.new ("Rate", "atem.cmd.ctdp.setmask3.flags.rate", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_ctdp_setmask3_input"] = ProtoField.new ("Input", "atem.cmd.ctdp.setmask3.flags.input", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
pf_fields["pf_field_pattern"] = ProtoField.new ("Pattern", "atem.field.pattern", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_width"] = ProtoField.new ("Width", "atem.field.width", ftypes.UINT16, nil, base.DEC)
VALS["VALS_FILLSOURCE"] = {[0] = "Black", [1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1000] = "Color Bars", [2001] = "Color 1", [2002] = "Color 2", [3010] = "Media Player 1", [3011] = "Media Player 1 Key", [3020] = "Media Player 2", [3021] = "Media Player 2 Key", [4010] = "Key 1 Mask", [4020] = "Key 2 Mask", [4030] = "Key 3 Mask", [4040] = "Key 4 Mask", [5010] = "DSK 1 Mask", [5020] = "DSK 2 Mask", [6000] = "Super Source", [7001] = "Clean Feed 1", [7002] = "Clean Feed 2", [8001] = "Auxilary 1", [8002] = "Auxilary 2", [8003] = "Auxilary 3", [8004] = "Auxilary 4", [8005] = "Auxilary 5", [8006] = "Auxilary 6", [10010] = "ME 1 Prog", [10011] = "ME 1 Prev", [10020] = "ME 2 Prog", [10021] = "ME 2 Prev"}
pf_fields["pf_field_fillsource"] = ProtoField.new ("Fill Source", "atem.field.fillsource", ftypes.UINT16, VALS["VALS_FILLSOURCE"], base.DEC)
pf_fields["pf_field_symmetry"] = ProtoField.new ("Symmetry", "atem.field.symmetry", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_softness"] = ProtoField.new ("Softness", "atem.field.softness", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_positionx0"] = ProtoField.new ("Position X", "atem.field.positionx0", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_positiony0"] = ProtoField.new ("Position Y", "atem.field.positiony0", ftypes.UINT16, nil, base.DEC)
VALS["VALS_REVERSE"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_reverse"] = ProtoField.new ("Reverse", "atem.field.reverse", ftypes.UINT8, VALS["VALS_REVERSE"], base.DEC)
VALS["VALS_FLIPFLOP"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_flipflop"] = ProtoField.new ("FlipFlop", "atem.field.flipflop", ftypes.UINT8, VALS["VALS_FLIPFLOP"], base.DEC)
pf_fields["pf_cmd_ctwp_setmask4"] = ProtoField.new ("Set Mask", "atem.cmd.ctwp.setmask4", ftypes.UINT16, nil, base.DEC, 0x3FF)
pf_fields["pf_flag_cmd_ctwp_setmask4_rate"] = ProtoField.new ("Rate", "atem.cmd.ctwp.setmask4.flags.rate", ftypes.BOOLEAN, {"On","Off"}, 10, 0x1)
pf_fields["pf_flag_cmd_ctwp_setmask4_pattern"] = ProtoField.new ("Pattern", "atem.cmd.ctwp.setmask4.flags.pattern", ftypes.BOOLEAN, {"On","Off"}, 10, 0x2)
pf_fields["pf_flag_cmd_ctwp_setmask4_width"] = ProtoField.new ("Width", "atem.cmd.ctwp.setmask4.flags.width", ftypes.BOOLEAN, {"On","Off"}, 10, 0x4)
pf_fields["pf_flag_cmd_ctwp_setmask4_fillsource"] = ProtoField.new ("Fill Source", "atem.cmd.ctwp.setmask4.flags.fillsource", ftypes.BOOLEAN, {"On","Off"}, 10, 0x8)
pf_fields["pf_flag_cmd_ctwp_setmask4_symmetry"] = ProtoField.new ("Symmetry", "atem.cmd.ctwp.setmask4.flags.symmetry", ftypes.BOOLEAN, {"On","Off"}, 10, 0x10)
pf_fields["pf_flag_cmd_ctwp_setmask4_softness"] = ProtoField.new ("Softness", "atem.cmd.ctwp.setmask4.flags.softness", ftypes.BOOLEAN, {"On","Off"}, 10, 0x20)
pf_fields["pf_flag_cmd_ctwp_setmask4_positionx"] = ProtoField.new ("Position X", "atem.cmd.ctwp.setmask4.flags.positionx", ftypes.BOOLEAN, {"On","Off"}, 10, 0x40)
pf_fields["pf_flag_cmd_ctwp_setmask4_positiony"] = ProtoField.new ("Position Y", "atem.cmd.ctwp.setmask4.flags.positiony", ftypes.BOOLEAN, {"On","Off"}, 10, 0x80)
pf_fields["pf_flag_cmd_ctwp_setmask4_reverse"] = ProtoField.new ("Reverse", "atem.cmd.ctwp.setmask4.flags.reverse", ftypes.BOOLEAN, {"On","Off"}, 10, 0x100)
pf_fields["pf_flag_cmd_ctwp_setmask4_flipflop"] = ProtoField.new ("FlipFlop", "atem.cmd.ctwp.setmask4.flags.flipflop", ftypes.BOOLEAN, {"On","Off"}, 10, 0x200)
pf_fields["pf_field_style1"] = ProtoField.new ("Style", "atem.field.style1", ftypes.UINT8, nil, base.DEC)
VALS["VALS_KEYSOURCE"] = {[0] = "Black", [1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1000] = "Color Bars", [2001] = "Color 1", [2002] = "Color 2", [3010] = "Media Player 1", [3011] = "Media Player 1 Key", [3020] = "Media Player 2", [3021] = "Media Player 2 Key", [4010] = "Key 1 Mask", [4020] = "Key 2 Mask", [4030] = "Key 3 Mask", [4040] = "Key 4 Mask", [5010] = "DSK 1 Mask", [5020] = "DSK 2 Mask", [6000] = "Super Source", [7001] = "Clean Feed 1", [7002] = "Clean Feed 2", [8001] = "Auxilary 1", [8002] = "Auxilary 2", [8003] = "Auxilary 3", [8004] = "Auxilary 4", [8005] = "Auxilary 5", [8006] = "Auxilary 6", [10010] = "ME 1 Prog", [10011] = "ME 1 Prev", [10020] = "ME 2 Prog", [10021] = "ME 2 Prev"}
pf_fields["pf_field_keysource"] = ProtoField.new ("Key Source", "atem.field.keysource", ftypes.UINT16, VALS["VALS_KEYSOURCE"], base.DEC)
VALS["VALS_ENABLEKEY"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_enablekey"] = ProtoField.new ("Enable Key", "atem.field.enablekey", ftypes.UINT8, VALS["VALS_ENABLEKEY"], base.DEC)
VALS["VALS_PREMULTIPLIED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_premultiplied"] = ProtoField.new ("Pre Multiplied", "atem.field.premultiplied", ftypes.UINT8, VALS["VALS_PREMULTIPLIED"], base.DEC)
pf_fields["pf_field_clip"] = ProtoField.new ("Clip", "atem.field.clip", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_gain0"] = ProtoField.new ("Gain", "atem.field.gain0", ftypes.UINT16, nil, base.DEC)
VALS["VALS_INVERTKEY0"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_invertkey0"] = ProtoField.new ("Invert Key", "atem.field.invertkey0", ftypes.UINT8, VALS["VALS_INVERTKEY0"], base.DEC)
pf_fields["pf_cmd_ctdv_setmask5"] = ProtoField.new ("Set Mask", "atem.cmd.ctdv.setmask5", ftypes.UINT16, nil, base.DEC, 0xFFF)
pf_fields["pf_flag_cmd_ctdv_setmask5_rate"] = ProtoField.new ("Rate", "atem.cmd.ctdv.setmask5.flags.rate", ftypes.BOOLEAN, {"On","Off"}, 12, 0x1)
-- pf_fields["pf_flag_cmd_ctdv_setmask5_"] = ProtoField.new ("?", "atem.cmd.ctdv.setmask5.flags.", ftypes.BOOLEAN, {"On","Off"}, 12, 0x2)
pf_fields["pf_flag_cmd_ctdv_setmask5_style"] = ProtoField.new ("Style", "atem.cmd.ctdv.setmask5.flags.style", ftypes.BOOLEAN, {"On","Off"}, 12, 0x4)
pf_fields["pf_flag_cmd_ctdv_setmask5_fillsource"] = ProtoField.new ("Fill Source", "atem.cmd.ctdv.setmask5.flags.fillsource", ftypes.BOOLEAN, {"On","Off"}, 12, 0x8)
pf_fields["pf_flag_cmd_ctdv_setmask5_keysource"] = ProtoField.new ("Key Source", "atem.cmd.ctdv.setmask5.flags.keysource", ftypes.BOOLEAN, {"On","Off"}, 12, 0x10)
pf_fields["pf_flag_cmd_ctdv_setmask5_enablekey"] = ProtoField.new ("Enable Key", "atem.cmd.ctdv.setmask5.flags.enablekey", ftypes.BOOLEAN, {"On","Off"}, 12, 0x20)
pf_fields["pf_flag_cmd_ctdv_setmask5_premultiplied"] = ProtoField.new ("Pre Multiplied", "atem.cmd.ctdv.setmask5.flags.premultiplied", ftypes.BOOLEAN, {"On","Off"}, 12, 0x40)
pf_fields["pf_flag_cmd_ctdv_setmask5_clip"] = ProtoField.new ("Clip", "atem.cmd.ctdv.setmask5.flags.clip", ftypes.BOOLEAN, {"On","Off"}, 12, 0x80)
pf_fields["pf_flag_cmd_ctdv_setmask5_gain"] = ProtoField.new ("Gain", "atem.cmd.ctdv.setmask5.flags.gain", ftypes.BOOLEAN, {"On","Off"}, 12, 0x100)
pf_fields["pf_flag_cmd_ctdv_setmask5_invertkey"] = ProtoField.new ("Invert Key", "atem.cmd.ctdv.setmask5.flags.invertkey", ftypes.BOOLEAN, {"On","Off"}, 12, 0x200)
pf_fields["pf_flag_cmd_ctdv_setmask5_reverse"] = ProtoField.new ("Reverse", "atem.cmd.ctdv.setmask5.flags.reverse", ftypes.BOOLEAN, {"On","Off"}, 12, 0x400)
pf_fields["pf_flag_cmd_ctdv_setmask5_flipflop"] = ProtoField.new ("FlipFlop", "atem.cmd.ctdv.setmask5.flags.flipflop", ftypes.BOOLEAN, {"On","Off"}, 12, 0x800)
VALS["VALS_SOURCE"] = {[1] = "Media Player 1", [2] = "Media Player 2"}
pf_fields["pf_field_source"] = ProtoField.new ("Source", "atem.field.source", ftypes.UINT8, VALS["VALS_SOURCE"], base.DEC)
pf_fields["pf_field_preroll"] = ProtoField.new ("Pre Roll", "atem.field.preroll", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_clipduration"] = ProtoField.new ("Clip Duration", "atem.field.clipduration", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_triggerpoint"] = ProtoField.new ("Trigger Point", "atem.field.triggerpoint", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_mixrate"] = ProtoField.new ("Mix Rate", "atem.field.mixrate", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ctst_setmask6"] = ProtoField.new ("Set Mask", "atem.cmd.ctst.setmask6", ftypes.UINT16, nil, base.DEC, 0x1FF)
pf_fields["pf_flag_cmd_ctst_setmask6_source"] = ProtoField.new ("Source", "atem.cmd.ctst.setmask6.flags.source", ftypes.BOOLEAN, {"On","Off"}, 9, 0x1)
pf_fields["pf_flag_cmd_ctst_setmask6_premultiplied"] = ProtoField.new ("Pre Multiplied", "atem.cmd.ctst.setmask6.flags.premultiplied", ftypes.BOOLEAN, {"On","Off"}, 9, 0x2)
pf_fields["pf_flag_cmd_ctst_setmask6_clip"] = ProtoField.new ("Clip", "atem.cmd.ctst.setmask6.flags.clip", ftypes.BOOLEAN, {"On","Off"}, 9, 0x4)
pf_fields["pf_flag_cmd_ctst_setmask6_gain"] = ProtoField.new ("Gain", "atem.cmd.ctst.setmask6.flags.gain", ftypes.BOOLEAN, {"On","Off"}, 9, 0x8)
pf_fields["pf_flag_cmd_ctst_setmask6_invertkey"] = ProtoField.new ("Invert Key", "atem.cmd.ctst.setmask6.flags.invertkey", ftypes.BOOLEAN, {"On","Off"}, 9, 0x10)
pf_fields["pf_flag_cmd_ctst_setmask6_preroll"] = ProtoField.new ("Pre Roll", "atem.cmd.ctst.setmask6.flags.preroll", ftypes.BOOLEAN, {"On","Off"}, 9, 0x20)
pf_fields["pf_flag_cmd_ctst_setmask6_clipduration"] = ProtoField.new ("Clip Duration", "atem.cmd.ctst.setmask6.flags.clipduration", ftypes.BOOLEAN, {"On","Off"}, 9, 0x40)
pf_fields["pf_flag_cmd_ctst_setmask6_triggerpoint"] = ProtoField.new ("Trigger Point", "atem.cmd.ctst.setmask6.flags.triggerpoint", ftypes.BOOLEAN, {"On","Off"}, 9, 0x80)
pf_fields["pf_flag_cmd_ctst_setmask6_mixrate"] = ProtoField.new ("Mix Rate", "atem.cmd.ctst.setmask6.flags.mixrate", ftypes.BOOLEAN, {"On","Off"}, 9, 0x100)
pf_fields["pf_field_keyer0"] = ProtoField.new ("Keyer", "atem.field.keyer0", ftypes.UINT8, nil, base.DEC)
VALS["VALS_TYPE0"] = {[0] = "Luma", [1] = "Chroma", [2] = "Pattern", [3] = "DVE"}
pf_fields["pf_field_type0"] = ProtoField.new ("Type", "atem.field.type0", ftypes.UINT8, VALS["VALS_TYPE0"], base.DEC)
VALS["VALS_KEBP_KEYENABLED"] = {[0] = "Off", [1] = "?"}
pf_fields["pf_cmd_kebp_keyenabled"] = ProtoField.new ("Key Enabled", "atem.cmd.kebp.keyenabled", ftypes.UINT8, VALS["VALS_KEBP_KEYENABLED"], base.DEC)
VALS["VALS_KEBP_KEYENABLEDAGAIN"] = {[0] = "Off", [1] = "?"}
pf_fields["pf_cmd_kebp_keyenabledagain"] = ProtoField.new ("Key Enabled (again?)", "atem.cmd.kebp.keyenabledagain", ftypes.UINT8, VALS["VALS_KEBP_KEYENABLEDAGAIN"], base.DEC)
VALS["VALS_FLYENABLED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_flyenabled"] = ProtoField.new ("Fly Enabled", "atem.field.flyenabled", ftypes.UINT8, VALS["VALS_FLYENABLED"], base.DEC)
VALS["VALS_MASKED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_masked"] = ProtoField.new ("Masked", "atem.field.masked", ftypes.UINT8, VALS["VALS_MASKED"], base.DEC)
pf_fields["pf_field_top"] = ProtoField.new ("Top", "atem.field.top", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_bottom"] = ProtoField.new ("Bottom", "atem.field.bottom", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_left"] = ProtoField.new ("Left", "atem.field.left", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_right"] = ProtoField.new ("Right", "atem.field.right", ftypes.INT16, nil, base.DEC)
pf_fields["pf_cmd_cktp_setmask7"] = ProtoField.new ("Set Mask", "atem.cmd.cktp.setmask7", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_cktp_setmask7_type"] = ProtoField.new ("Type", "atem.cmd.cktp.setmask7.flags.type", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_cktp_setmask7_enabled"] = ProtoField.new ("Enabled", "atem.cmd.cktp.setmask7.flags.enabled", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
pf_fields["pf_field_setmask8"] = ProtoField.new ("Set Mask", "atem.field.setmask8", ftypes.UINT8, nil, base.DEC, 0x1F)
pf_fields["pf_flag_field_setmask8_masked"] = ProtoField.new ("Masked", "atem.field.setmask8.flags.masked", ftypes.BOOLEAN, {"On","Off"}, 5, 0x1)
pf_fields["pf_flag_field_setmask8_top"] = ProtoField.new ("Top", "atem.field.setmask8.flags.top", ftypes.BOOLEAN, {"On","Off"}, 5, 0x2)
pf_fields["pf_flag_field_setmask8_bottom"] = ProtoField.new ("Bottom", "atem.field.setmask8.flags.bottom", ftypes.BOOLEAN, {"On","Off"}, 5, 0x4)
pf_fields["pf_flag_field_setmask8_left"] = ProtoField.new ("Left", "atem.field.setmask8.flags.left", ftypes.BOOLEAN, {"On","Off"}, 5, 0x8)
pf_fields["pf_flag_field_setmask8_right"] = ProtoField.new ("Right", "atem.field.setmask8.flags.right", ftypes.BOOLEAN, {"On","Off"}, 5, 0x10)
pf_fields["pf_cmd_cklm_setmask9"] = ProtoField.new ("Set Mask", "atem.cmd.cklm.setmask9", ftypes.UINT8, nil, base.DEC, 0xF)
pf_fields["pf_flag_cmd_cklm_setmask9_premultiplied"] = ProtoField.new ("Pre Multiplied", "atem.cmd.cklm.setmask9.flags.premultiplied", ftypes.BOOLEAN, {"On","Off"}, 4, 0x1)
pf_fields["pf_flag_cmd_cklm_setmask9_clip"] = ProtoField.new ("Clip", "atem.cmd.cklm.setmask9.flags.clip", ftypes.BOOLEAN, {"On","Off"}, 4, 0x2)
pf_fields["pf_flag_cmd_cklm_setmask9_gain"] = ProtoField.new ("Gain", "atem.cmd.cklm.setmask9.flags.gain", ftypes.BOOLEAN, {"On","Off"}, 4, 0x4)
pf_fields["pf_flag_cmd_cklm_setmask9_invertkey"] = ProtoField.new ("Invert Key", "atem.cmd.cklm.setmask9.flags.invertkey", ftypes.BOOLEAN, {"On","Off"}, 4, 0x8)
pf_fields["pf_field_hue0"] = ProtoField.new ("Hue", "atem.field.hue0", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_ysuppress"] = ProtoField.new ("Y Suppress", "atem.field.ysuppress", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_lift"] = ProtoField.new ("Lift", "atem.field.lift", ftypes.UINT16, nil, base.DEC)
VALS["VALS_NARROW"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_narrow"] = ProtoField.new ("Narrow", "atem.field.narrow", ftypes.UINT8, VALS["VALS_NARROW"], base.DEC)
pf_fields["pf_cmd_ckck_setmask10"] = ProtoField.new ("Set Mask", "atem.cmd.ckck.setmask10", ftypes.UINT8, nil, base.DEC, 0x1F)
pf_fields["pf_flag_cmd_ckck_setmask10_hue"] = ProtoField.new ("Hue", "atem.cmd.ckck.setmask10.flags.hue", ftypes.BOOLEAN, {"On","Off"}, 5, 0x1)
pf_fields["pf_flag_cmd_ckck_setmask10_gain"] = ProtoField.new ("Gain", "atem.cmd.ckck.setmask10.flags.gain", ftypes.BOOLEAN, {"On","Off"}, 5, 0x2)
pf_fields["pf_flag_cmd_ckck_setmask10_ysuppress"] = ProtoField.new ("Y Suppress", "atem.cmd.ckck.setmask10.flags.ysuppress", ftypes.BOOLEAN, {"On","Off"}, 5, 0x4)
pf_fields["pf_flag_cmd_ckck_setmask10_lift"] = ProtoField.new ("Lift", "atem.cmd.ckck.setmask10.flags.lift", ftypes.BOOLEAN, {"On","Off"}, 5, 0x8)
pf_fields["pf_flag_cmd_ckck_setmask10_narrow"] = ProtoField.new ("Narrow", "atem.cmd.ckck.setmask10.flags.narrow", ftypes.BOOLEAN, {"On","Off"}, 5, 0x10)
pf_fields["pf_field_size"] = ProtoField.new ("Size", "atem.field.size", ftypes.UINT16, nil, base.DEC)
VALS["VALS_INVERTPATTERN"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_invertpattern"] = ProtoField.new ("Invert Pattern", "atem.field.invertpattern", ftypes.UINT8, VALS["VALS_INVERTPATTERN"], base.DEC)
pf_fields["pf_cmd_ckpt_setmask11"] = ProtoField.new ("Set Mask", "atem.cmd.ckpt.setmask11", ftypes.UINT8, nil, base.DEC, 0x7F)
pf_fields["pf_flag_cmd_ckpt_setmask11_pattern"] = ProtoField.new ("Pattern", "atem.cmd.ckpt.setmask11.flags.pattern", ftypes.BOOLEAN, {"On","Off"}, 7, 0x1)
pf_fields["pf_flag_cmd_ckpt_setmask11_size"] = ProtoField.new ("Size", "atem.cmd.ckpt.setmask11.flags.size", ftypes.BOOLEAN, {"On","Off"}, 7, 0x2)
pf_fields["pf_flag_cmd_ckpt_setmask11_symmetry"] = ProtoField.new ("Symmetry", "atem.cmd.ckpt.setmask11.flags.symmetry", ftypes.BOOLEAN, {"On","Off"}, 7, 0x4)
pf_fields["pf_flag_cmd_ckpt_setmask11_softness"] = ProtoField.new ("Softness", "atem.cmd.ckpt.setmask11.flags.softness", ftypes.BOOLEAN, {"On","Off"}, 7, 0x8)
pf_fields["pf_flag_cmd_ckpt_setmask11_positionx"] = ProtoField.new ("Position X", "atem.cmd.ckpt.setmask11.flags.positionx", ftypes.BOOLEAN, {"On","Off"}, 7, 0x10)
pf_fields["pf_flag_cmd_ckpt_setmask11_positiony"] = ProtoField.new ("Position Y", "atem.cmd.ckpt.setmask11.flags.positiony", ftypes.BOOLEAN, {"On","Off"}, 7, 0x20)
pf_fields["pf_flag_cmd_ckpt_setmask11_invertpattern"] = ProtoField.new ("Invert Pattern", "atem.cmd.ckpt.setmask11.flags.invertpattern", ftypes.BOOLEAN, {"On","Off"}, 7, 0x40)
pf_fields["pf_field_sizex"] = ProtoField.new ("Size X", "atem.field.sizex", ftypes.INT32, nil, base.DEC)
pf_fields["pf_field_sizey"] = ProtoField.new ("Size Y", "atem.field.sizey", ftypes.INT32, nil, base.DEC)
pf_fields["pf_field_positionx1"] = ProtoField.new ("Position X", "atem.field.positionx1", ftypes.INT32, nil, base.DEC)
pf_fields["pf_field_positiony1"] = ProtoField.new ("Position Y", "atem.field.positiony1", ftypes.INT32, nil, base.DEC)
pf_fields["pf_field_rotation"] = ProtoField.new ("Rotation", "atem.field.rotation", ftypes.INT32, nil, base.DEC)
VALS["VALS_BORDERENABLED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_borderenabled"] = ProtoField.new ("Border Enabled", "atem.field.borderenabled", ftypes.UINT8, VALS["VALS_BORDERENABLED"], base.DEC)
VALS["VALS_SHADOW"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_shadow"] = ProtoField.new ("Shadow", "atem.field.shadow", ftypes.UINT8, VALS["VALS_SHADOW"], base.DEC)
VALS["VALS_BORDERBEVEL"] = {[0] = "No", [1] = "In/Out", [2] = "In", [3] = "Out"}
pf_fields["pf_field_borderbevel"] = ProtoField.new ("Border Bevel", "atem.field.borderbevel", ftypes.UINT8, VALS["VALS_BORDERBEVEL"], base.DEC)
pf_fields["pf_field_borderouterwidth"] = ProtoField.new ("Border Outer Width", "atem.field.borderouterwidth", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_borderinnerwidth"] = ProtoField.new ("Border Inner Width", "atem.field.borderinnerwidth", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_borderoutersoftness"] = ProtoField.new ("Border Outer Softness", "atem.field.borderoutersoftness", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_borderinnersoftness"] = ProtoField.new ("Border Inner Softness", "atem.field.borderinnersoftness", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_borderbevelsoftness"] = ProtoField.new ("Border Bevel Softness", "atem.field.borderbevelsoftness", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_borderbevelposition"] = ProtoField.new ("Border Bevel Position", "atem.field.borderbevelposition", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_borderopacity"] = ProtoField.new ("Border Opacity", "atem.field.borderopacity", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_borderhue"] = ProtoField.new ("Border Hue", "atem.field.borderhue", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_bordersaturation"] = ProtoField.new ("Border Saturation", "atem.field.bordersaturation", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_borderluma"] = ProtoField.new ("Border Luma", "atem.field.borderluma", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_lightsourcedirection"] = ProtoField.new ("Light Source Direction", "atem.field.lightsourcedirection", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_lightsourcealtitude"] = ProtoField.new ("Light Source Altitude", "atem.field.lightsourcealtitude", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_ckdv_setmask12"] = ProtoField.new ("Set Mask", "atem.cmd.ckdv.setmask12", ftypes.UINT32, nil, base.DEC, 0xFFFFFFFF)
pf_fields["pf_flag_cmd_ckdv_setmask12_sizex"] = ProtoField.new ("Size X", "atem.cmd.ckdv.setmask12.flags.sizex", ftypes.BOOLEAN, {"On","Off"}, 26, 0x1)
pf_fields["pf_flag_cmd_ckdv_setmask12_sizey"] = ProtoField.new ("Size Y", "atem.cmd.ckdv.setmask12.flags.sizey", ftypes.BOOLEAN, {"On","Off"}, 26, 0x2)
pf_fields["pf_flag_cmd_ckdv_setmask12_positionx"] = ProtoField.new ("Position X", "atem.cmd.ckdv.setmask12.flags.positionx", ftypes.BOOLEAN, {"On","Off"}, 26, 0x4)
pf_fields["pf_flag_cmd_ckdv_setmask12_positiony"] = ProtoField.new ("Position Y", "atem.cmd.ckdv.setmask12.flags.positiony", ftypes.BOOLEAN, {"On","Off"}, 26, 0x8)
pf_fields["pf_flag_cmd_ckdv_setmask12_rotation"] = ProtoField.new ("Rotation", "atem.cmd.ckdv.setmask12.flags.rotation", ftypes.BOOLEAN, {"On","Off"}, 26, 0x10)
pf_fields["pf_flag_cmd_ckdv_setmask12_borderenabled"] = ProtoField.new ("Border Enabled", "atem.cmd.ckdv.setmask12.flags.borderenabled", ftypes.BOOLEAN, {"On","Off"}, 26, 0x20)
pf_fields["pf_flag_cmd_ckdv_setmask12_shadow"] = ProtoField.new ("Shadow", "atem.cmd.ckdv.setmask12.flags.shadow", ftypes.BOOLEAN, {"On","Off"}, 26, 0x40)
pf_fields["pf_flag_cmd_ckdv_setmask12_borderbevel"] = ProtoField.new ("Border Bevel", "atem.cmd.ckdv.setmask12.flags.borderbevel", ftypes.BOOLEAN, {"On","Off"}, 26, 0x80)
pf_fields["pf_flag_cmd_ckdv_setmask12_outerwidth"] = ProtoField.new ("Outer Width", "atem.cmd.ckdv.setmask12.flags.outerwidth", ftypes.BOOLEAN, {"On","Off"}, 26, 0x100)
pf_fields["pf_flag_cmd_ckdv_setmask12_innerwidth"] = ProtoField.new ("Inner Width", "atem.cmd.ckdv.setmask12.flags.innerwidth", ftypes.BOOLEAN, {"On","Off"}, 26, 0x200)
pf_fields["pf_flag_cmd_ckdv_setmask12_outersoftness"] = ProtoField.new ("Outer Softness", "atem.cmd.ckdv.setmask12.flags.outersoftness", ftypes.BOOLEAN, {"On","Off"}, 26, 0x400)
pf_fields["pf_flag_cmd_ckdv_setmask12_innersoftness"] = ProtoField.new ("Inner Softness", "atem.cmd.ckdv.setmask12.flags.innersoftness", ftypes.BOOLEAN, {"On","Off"}, 26, 0x800)
pf_fields["pf_flag_cmd_ckdv_setmask12_bevelsoftness"] = ProtoField.new ("Bevel Softness", "atem.cmd.ckdv.setmask12.flags.bevelsoftness", ftypes.BOOLEAN, {"On","Off"}, 26, 0x1000)
pf_fields["pf_flag_cmd_ckdv_setmask12_bevelposition"] = ProtoField.new ("Bevel Position", "atem.cmd.ckdv.setmask12.flags.bevelposition", ftypes.BOOLEAN, {"On","Off"}, 26, 0x2000)
pf_fields["pf_flag_cmd_ckdv_setmask12_borderopacity"] = ProtoField.new ("Border Opacity", "atem.cmd.ckdv.setmask12.flags.borderopacity", ftypes.BOOLEAN, {"On","Off"}, 26, 0x4000)
pf_fields["pf_flag_cmd_ckdv_setmask12_borderhue"] = ProtoField.new ("Border Hue", "atem.cmd.ckdv.setmask12.flags.borderhue", ftypes.BOOLEAN, {"On","Off"}, 26, 0x8000)
pf_fields["pf_flag_cmd_ckdv_setmask12_bordersaturation"] = ProtoField.new ("Border Saturation", "atem.cmd.ckdv.setmask12.flags.bordersaturation", ftypes.BOOLEAN, {"On","Off"}, 26, 0x10000)
pf_fields["pf_flag_cmd_ckdv_setmask12_borderluma"] = ProtoField.new ("Border Luma", "atem.cmd.ckdv.setmask12.flags.borderluma", ftypes.BOOLEAN, {"On","Off"}, 26, 0x20000)
pf_fields["pf_flag_cmd_ckdv_setmask12_direction"] = ProtoField.new ("Direction", "atem.cmd.ckdv.setmask12.flags.direction", ftypes.BOOLEAN, {"On","Off"}, 26, 0x40000)
pf_fields["pf_flag_cmd_ckdv_setmask12_altitude"] = ProtoField.new ("Altitude", "atem.cmd.ckdv.setmask12.flags.altitude", ftypes.BOOLEAN, {"On","Off"}, 26, 0x80000)
pf_fields["pf_flag_cmd_ckdv_setmask12_masked"] = ProtoField.new ("Masked", "atem.cmd.ckdv.setmask12.flags.masked", ftypes.BOOLEAN, {"On","Off"}, 26, 0x100000)
pf_fields["pf_flag_cmd_ckdv_setmask12_top"] = ProtoField.new ("Top", "atem.cmd.ckdv.setmask12.flags.top", ftypes.BOOLEAN, {"On","Off"}, 26, 0x200000)
pf_fields["pf_flag_cmd_ckdv_setmask12_bottom"] = ProtoField.new ("Bottom", "atem.cmd.ckdv.setmask12.flags.bottom", ftypes.BOOLEAN, {"On","Off"}, 26, 0x400000)
pf_fields["pf_flag_cmd_ckdv_setmask12_left"] = ProtoField.new ("Left", "atem.cmd.ckdv.setmask12.flags.left", ftypes.BOOLEAN, {"On","Off"}, 26, 0x800000)
pf_fields["pf_flag_cmd_ckdv_setmask12_right"] = ProtoField.new ("Right", "atem.cmd.ckdv.setmask12.flags.right", ftypes.BOOLEAN, {"On","Off"}, 26, 0x1000000)
pf_fields["pf_flag_cmd_ckdv_setmask12_rate"] = ProtoField.new ("Rate", "atem.cmd.ckdv.setmask12.flags.rate", ftypes.BOOLEAN, {"On","Off"}, 26, 0x2000000)
VALS["VALS_KEFS_ISASET"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd_kefs_isaset"] = ProtoField.new ("IsASet", "atem.cmd.kefs.isaset", ftypes.UINT8, VALS["VALS_KEFS_ISASET"], base.DEC)
VALS["VALS_KEFS_ISBSET"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd_kefs_isbset"] = ProtoField.new ("IsBSet", "atem.cmd.kefs.isbset", ftypes.UINT8, VALS["VALS_KEFS_ISBSET"], base.DEC)
pf_fields["pf_cmd_kefs_isatkeyframe"] = ProtoField.new ("Is At Key Frame", "atem.cmd.kefs.isatkeyframe", ftypes.UINT8, nil, base.DEC, 0xF)
pf_fields["pf_flag_cmd_kefs_isatkeyframe_a"] = ProtoField.new ("A", "atem.cmd.kefs.isatkeyframe.flags.a", ftypes.BOOLEAN, {"Yes","No"}, 4, 0x1)
pf_fields["pf_flag_cmd_kefs_isatkeyframe_b"] = ProtoField.new ("B", "atem.cmd.kefs.isatkeyframe.flags.b", ftypes.BOOLEAN, {"Yes","No"}, 4, 0x2)
pf_fields["pf_flag_cmd_kefs_isatkeyframe_full"] = ProtoField.new ("Full", "atem.cmd.kefs.isatkeyframe.flags.full", ftypes.BOOLEAN, {"Yes","No"}, 4, 0x4)
pf_fields["pf_flag_cmd_kefs_isatkeyframe_runtoinfinite"] = ProtoField.new ("Run-to-infinite", "atem.cmd.kefs.isatkeyframe.flags.runtoinfinite", ftypes.BOOLEAN, {"Yes","No"}, 4, 0x8)
pf_fields["pf_field_runtoinfiniteindex"] = ProtoField.new ("Run-to-Infinite-index", "atem.field.runtoinfiniteindex", ftypes.UINT8, nil, base.DEC)
VALS["VALS_KEYFRAME0"] = {[1] = "A", [2] = "B"}
pf_fields["pf_field_keyframe0"] = ProtoField.new ("Key Frame", "atem.field.keyframe0", ftypes.UINT8, VALS["VALS_KEYFRAME0"], base.DEC)
pf_fields["pf_cmd_rflk_setmask13"] = ProtoField.new ("Set Mask", "atem.cmd.rflk.setmask13", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_rflk_setmask13_onoff"] = ProtoField.new ("On/Off", "atem.cmd.rflk.setmask13.flags.onoff", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_rflk_setmask13_runtoinfinite"] = ProtoField.new ("Run-To-Infinite", "atem.cmd.rflk.setmask13.flags.runtoinfinite", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
VALS["VALS_RFLK_KEYFRAME1"] = {[1] = "A", [2] = "B", [3] = "Full", [4] = "Run-To-Infinite"}
pf_fields["pf_cmd_rflk_keyframe1"] = ProtoField.new ("Key Frame", "atem.cmd.rflk.keyframe1", ftypes.UINT8, VALS["VALS_RFLK_KEYFRAME1"], base.DEC)
VALS["VALS_KEYER1"] = {[0] = "DSK1", [1] = "DSK2"}
pf_fields["pf_field_keyer1"] = ProtoField.new ("Keyer", "atem.field.keyer1", ftypes.UINT8, VALS["VALS_KEYER1"], base.DEC)
VALS["VALS_TIE"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_tie"] = ProtoField.new ("Tie", "atem.field.tie", ftypes.UINT8, VALS["VALS_TIE"], base.DEC)
pf_fields["pf_cmd_cdsg_setmask14"] = ProtoField.new ("Set Mask", "atem.cmd.cdsg.setmask14", ftypes.UINT8, nil, base.DEC, 0x7)
pf_fields["pf_flag_cmd_cdsg_setmask14_premultiplied"] = ProtoField.new ("Pre Multiplied", "atem.cmd.cdsg.setmask14.flags.premultiplied", ftypes.BOOLEAN, {"On","Off"}, 3, 0x1)
pf_fields["pf_flag_cmd_cdsg_setmask14_clip"] = ProtoField.new ("Clip", "atem.cmd.cdsg.setmask14.flags.clip", ftypes.BOOLEAN, {"On","Off"}, 3, 0x2)
pf_fields["pf_flag_cmd_cdsg_setmask14_gain"] = ProtoField.new ("Gain", "atem.cmd.cdsg.setmask14.flags.gain", ftypes.BOOLEAN, {"On","Off"}, 3, 0x4)
VALS["VALS_CDSG_INVERTKEY1"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_cdsg_invertkey1"] = ProtoField.new ("Invert Key(??)", "atem.cmd.cdsg.invertkey1", ftypes.UINT8, VALS["VALS_CDSG_INVERTKEY1"], base.DEC)
VALS["VALS_ONAIR"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_onair"] = ProtoField.new ("On Air", "atem.field.onair", ftypes.UINT8, VALS["VALS_ONAIR"], base.DEC)
VALS["VALS_INTRANSITION1"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_intransition1"] = ProtoField.new ("In Transition", "atem.field.intransition1", ftypes.UINT8, VALS["VALS_INTRANSITION1"], base.DEC)
VALS["VALS_DSKS_ISAUTOTRANSITIONING"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_dsks_isautotransitioning"] = ProtoField.new ("Is Auto Transitioning", "atem.cmd.dsks.isautotransitioning", ftypes.UINT8, VALS["VALS_DSKS_ISAUTOTRANSITIONING"], base.DEC)
VALS["VALS_FTBC_SETMASK15"] = {[0] = "Rate"}
pf_fields["pf_cmd_ftbc_setmask15"] = ProtoField.new ("Set Mask", "atem.cmd.ftbc.setmask15", ftypes.UINT8, VALS["VALS_FTBC_SETMASK15"], base.DEC)
VALS["VALS_FTBS_FULLYBLACK"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_ftbs_fullyblack"] = ProtoField.new ("Fully Black", "atem.cmd.ftbs.fullyblack", ftypes.UINT8, VALS["VALS_FTBS_FULLYBLACK"], base.DEC)
VALS["VALS_COLORGENERATOR"] = {[0] = "Color Generator 1", [1] = "Color Generator 2"}
pf_fields["pf_field_colorgenerator"] = ProtoField.new ("Color Generator", "atem.field.colorgenerator", ftypes.UINT8, VALS["VALS_COLORGENERATOR"], base.DEC)
pf_fields["pf_field_saturation0"] = ProtoField.new ("Saturation", "atem.field.saturation0", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_luma"] = ProtoField.new ("Luma", "atem.field.luma", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_cclv_setmask16"] = ProtoField.new ("Set Mask", "atem.cmd.cclv.setmask16", ftypes.UINT8, nil, base.DEC, 0x7)
pf_fields["pf_flag_cmd_cclv_setmask16_hue"] = ProtoField.new ("Hue", "atem.cmd.cclv.setmask16.flags.hue", ftypes.BOOLEAN, {"On","Off"}, 3, 0x1)
pf_fields["pf_flag_cmd_cclv_setmask16_saturation"] = ProtoField.new ("Saturation", "atem.cmd.cclv.setmask16.flags.saturation", ftypes.BOOLEAN, {"On","Off"}, 3, 0x2)
pf_fields["pf_flag_cmd_cclv_setmask16_luma"] = ProtoField.new ("Luma", "atem.cmd.cclv.setmask16.flags.luma", ftypes.BOOLEAN, {"On","Off"}, 3, 0x4)
VALS["VALS_AUXCHANNEL"] = {[0] = "AUX 1", [1] = "AUX 2", [2] = "AUX 3", [3] = "AUX 4", [4] = "AUX 5", [5] = "AUX 6"}
pf_fields["pf_field_auxchannel"] = ProtoField.new ("AUX Channel", "atem.field.auxchannel", ftypes.UINT8, VALS["VALS_AUXCHANNEL"], base.DEC)
VALS["VALS_SETMASK17"] = {[0] = "Source"}
pf_fields["pf_field_setmask17"] = ProtoField.new ("Set Mask", "atem.field.setmask17", ftypes.UINT8, VALS["VALS_SETMASK17"], base.DEC)
pf_fields["pf_field_input1"] = ProtoField.new ("Input", "atem.field.input1", ftypes.UINT8, nil, base.DEC)
VALS["VALS_ADJUSTMENTDOMAIN"] = {[0] = "Lens", [1] = "Camera", [8] = "Chip"}
pf_fields["pf_field_adjustmentdomain"] = ProtoField.new ("Adjustment Domain", "atem.field.adjustmentdomain", ftypes.UINT8, VALS["VALS_ADJUSTMENTDOMAIN"], base.DEC)
VALS["VALS_CCDO_LENSFEATURE0"] = {[0] = "Focus", [1] = "Auto Focused", [3] = "Iris"}
pf_fields["pf_cmd_ccdo_lensfeature0"] = ProtoField.new ("Lens feature", "atem.cmd.ccdo.lensfeature0", ftypes.UINT8, VALS["VALS_CCDO_LENSFEATURE0"], base.DEC)
VALS["VALS_CCDO_CAMERAFEATURE0"] = {[1] = "Gain", [5] = "Shutter"}
pf_fields["pf_cmd_ccdo_camerafeature0"] = ProtoField.new ("Camera feature", "atem.cmd.ccdo.camerafeature0", ftypes.UINT8, VALS["VALS_CCDO_CAMERAFEATURE0"], base.DEC)
VALS["VALS_CHIPFEATURE"] = {[0] = "Lift", [1] = "Gamma", [2] = "Gain", [3] = "Aperture", [4] = "Contrast", [5] = "Lum", [6] = "Hue-Saturation"}
pf_fields["pf_field_chipfeature"] = ProtoField.new ("Chip feature", "atem.field.chipfeature", ftypes.UINT8, VALS["VALS_CHIPFEATURE"], base.DEC)
VALS["VALS_CCDO_AVAILABLE"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_ccdo_available"] = ProtoField.new ("Available", "atem.cmd.ccdo.available", ftypes.UINT8, VALS["VALS_CCDO_AVAILABLE"], base.DEC)
VALS["VALS_LENSFEATURE1"] = {[0] = "Focus", [1] = "Auto Focused", [3] = "Iris", [9] = "Zoom"}
pf_fields["pf_field_lensfeature1"] = ProtoField.new ("Lens feature", "atem.field.lensfeature1", ftypes.UINT8, VALS["VALS_LENSFEATURE1"], base.DEC)
VALS["VALS_CAMERAFEATURE1"] = {[1] = "Gain", [2] = "White Balance", [5] = "Shutter"}
pf_fields["pf_field_camerafeature1"] = ProtoField.new ("Camera feature", "atem.field.camerafeature1", ftypes.UINT8, VALS["VALS_CAMERAFEATURE1"], base.DEC)
pf_fields["pf_cmd_ccdp_unknown4"] = ProtoField.new ("Unknown", "atem.cmd.ccdp.unknown4", ftypes.NONE, nil, base.NONE)
pf_fields["pf_field_iris"] = ProtoField.new ("Iris", "atem.field.iris", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_focus"] = ProtoField.new ("Focus", "atem.field.focus", ftypes.INT16, nil, base.DEC)
VALS["VALS_GAIN1"] = {[512] = "0db", [1024] = "6db", [2048] = "12db", [4096] = "18db"}
pf_fields["pf_field_gain1"] = ProtoField.new ("Gain", "atem.field.gain1", ftypes.INT16, VALS["VALS_GAIN1"], base.DEC)
VALS["VALS_WHITEBALANCE"] = {[3200] = "3200K", [4500] = "4500K", [5000] = "5000K", [5600] = "5600K", [6500] = "6500K", [7500] = "7500K"}
pf_fields["pf_field_whitebalance"] = ProtoField.new ("White Balance", "atem.field.whitebalance", ftypes.INT16, VALS["VALS_WHITEBALANCE"], base.DEC)
pf_fields["pf_field_zoomspeed"] = ProtoField.new ("Zoom Speed", "atem.field.zoomspeed", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_liftr"] = ProtoField.new ("Lift R", "atem.field.liftr", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gammar"] = ProtoField.new ("Gamma R", "atem.field.gammar", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gainr"] = ProtoField.new ("Gain R", "atem.field.gainr", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_lummix"] = ProtoField.new ("Lum Mix", "atem.field.lummix", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_hue1"] = ProtoField.new ("Hue", "atem.field.hue1", ftypes.INT16, nil, base.DEC)
VALS["VALS_SHUTTER"] = {[20000] = "1/50", [16667] = "1/60", [13333] = "1/75", [11111] = "1/90", [10000] = "1/100", [8333] = "1/120", [6667] = "1/150", [5556] = "1/180", [4000] = "1/250", [2778] = "1/360", [2000] = "1/500", [1379] = "1/725", [1000] = "1/1000", [690] = "1/1450", [500] = "1/2000"}
pf_fields["pf_field_shutter"] = ProtoField.new ("Shutter", "atem.field.shutter", ftypes.INT16, VALS["VALS_SHUTTER"], base.DEC)
pf_fields["pf_field_liftg"] = ProtoField.new ("Lift G", "atem.field.liftg", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gammag"] = ProtoField.new ("Gamma G", "atem.field.gammag", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gaing"] = ProtoField.new ("Gain G", "atem.field.gaing", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_contrast"] = ProtoField.new ("Contrast", "atem.field.contrast", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_saturation1"] = ProtoField.new ("Saturation", "atem.field.saturation1", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_liftb"] = ProtoField.new ("Lift B", "atem.field.liftb", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gammab"] = ProtoField.new ("Gamma B", "atem.field.gammab", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gainb"] = ProtoField.new ("Gain B", "atem.field.gainb", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_lifty"] = ProtoField.new ("Lift Y", "atem.field.lifty", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gammay"] = ProtoField.new ("Gamma Y", "atem.field.gammay", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_gainy"] = ProtoField.new ("Gain Y", "atem.field.gainy", ftypes.INT16, nil, base.DEC)
VALS["VALS_CCMD_RELATIVE"] = {[0] = "Off", [1] = "?"}
pf_fields["pf_cmd_ccmd_relative"] = ProtoField.new ("Relative", "atem.cmd.ccmd.relative", ftypes.UINT8, VALS["VALS_CCMD_RELATIVE"], base.DEC)
pf_fields["pf_field_unknown5"] = ProtoField.new ("Unknown", "atem.field.unknown5", ftypes.NONE, nil, base.NONE)
VALS["VALS_MEDIAPLAYER"] = {[0] = "Media Player 1", [1] = "Media Player 2"}
pf_fields["pf_field_mediaplayer"] = ProtoField.new ("Media Player", "atem.field.mediaplayer", ftypes.UINT8, VALS["VALS_MEDIAPLAYER"], base.DEC)
VALS["VALS_PLAYING"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_playing"] = ProtoField.new ("Playing", "atem.field.playing", ftypes.UINT8, VALS["VALS_PLAYING"], base.DEC)
VALS["VALS_LOOP"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_loop"] = ProtoField.new ("Loop", "atem.field.loop", ftypes.UINT8, VALS["VALS_LOOP"], base.DEC)
VALS["VALS_ATBEGINNING"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_atbeginning"] = ProtoField.new ("At Beginning", "atem.field.atbeginning", ftypes.UINT8, VALS["VALS_ATBEGINNING"], base.DEC)
pf_fields["pf_field_clipframe"] = ProtoField.new ("Clip Frame", "atem.field.clipframe", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_scps_setmask18"] = ProtoField.new ("Set Mask", "atem.cmd.scps.setmask18", ftypes.UINT8, nil, base.DEC, 0xF)
pf_fields["pf_flag_cmd_scps_setmask18_playing"] = ProtoField.new ("Playing", "atem.cmd.scps.setmask18.flags.playing", ftypes.BOOLEAN, {"On","Off"}, 4, 0x1)
pf_fields["pf_flag_cmd_scps_setmask18_loop"] = ProtoField.new ("Loop", "atem.cmd.scps.setmask18.flags.loop", ftypes.BOOLEAN, {"On","Off"}, 4, 0x2)
pf_fields["pf_flag_cmd_scps_setmask18_beginning"] = ProtoField.new ("Beginning", "atem.cmd.scps.setmask18.flags.beginning", ftypes.BOOLEAN, {"On","Off"}, 4, 0x4)
pf_fields["pf_flag_cmd_scps_setmask18_frame"] = ProtoField.new ("Frame", "atem.cmd.scps.setmask18.flags.frame", ftypes.BOOLEAN, {"On","Off"}, 4, 0x8)
VALS["VALS_TYPE1"] = {[1] = "Still", [2] = "Clip"}
pf_fields["pf_field_type1"] = ProtoField.new ("Type", "atem.field.type1", ftypes.UINT8, VALS["VALS_TYPE1"], base.DEC)
pf_fields["pf_field_stillindex"] = ProtoField.new ("Still Index", "atem.field.stillindex", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_clipindex"] = ProtoField.new ("Clip Index", "atem.field.clipindex", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_mpss_setmask19"] = ProtoField.new ("Set Mask", "atem.cmd.mpss.setmask19", ftypes.UINT8, nil, base.DEC, 0x7)
pf_fields["pf_flag_cmd_mpss_setmask19_type"] = ProtoField.new ("Type", "atem.cmd.mpss.setmask19.flags.type", ftypes.BOOLEAN, {"On","Off"}, 3, 0x1)
pf_fields["pf_flag_cmd_mpss_setmask19_still"] = ProtoField.new ("Still", "atem.cmd.mpss.setmask19.flags.still", ftypes.BOOLEAN, {"On","Off"}, 3, 0x2)
pf_fields["pf_flag_cmd_mpss_setmask19_clip"] = ProtoField.new ("Clip", "atem.cmd.mpss.setmask19.flags.clip", ftypes.BOOLEAN, {"On","Off"}, 3, 0x4)
pf_fields["pf_field_clip1maxlength"] = ProtoField.new ("Clip 1 Max Length", "atem.field.clip1maxlength", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_mpsp_clip2maxlength"] = ProtoField.new ("Clip 2 Max Length", "atem.cmd.mpsp.clip2maxlength", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_clipbank"] = ProtoField.new ("Clip Bank", "atem.field.clipbank", ftypes.UINT8, nil, base.DEC)
VALS["VALS_ISUSED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_isused"] = ProtoField.new ("Is Used", "atem.field.isused", ftypes.UINT8, VALS["VALS_ISUSED"], base.DEC)
VALS["VALS_TRANSFER_TYPE"] = {[0] = "Still", [1] = "Clip 1", [2] = "Clip 2", [3] = "MV labels", [255] = "Macro"}
pf_fields["pf_field_filename"] = ProtoField.new ("File Name", "atem.field.filename", ftypes.STRING, nil, base.NONE)
pf_fields["pf_field_frames"] = ProtoField.new ("Frames", "atem.field.frames", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_mpas_hash"] = ProtoField.new ("Hash (of audio)", "atem.cmd.mpas.hash", ftypes.BYTES)
pf_fields["pf_cmd_mpfe_type"] = ProtoField.new ("Type", "atem.cmd.mpfe.type", ftypes.UINT8, VALS["VALS_TRANSFER_TYPE"], base.DEC)
pf_fields["pf_cmd_mpfe_index"] = ProtoField.new ("Index", "atem.cmd.mpfe.index", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_mpfe_hash"] = ProtoField.new ("Hash (of still)", "atem.cmd.mpfe.hash", ftypes.BYTES)
pf_fields["pf_cmd_mpfe_filenamestringlength"] = ProtoField.new ("(File Name String Length)", "atem.cmd.mpfe.filenamestringlength", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_mrpr_state"] = ProtoField.new ("State", "atem.cmd.mrpr.state", ftypes.UINT8, nil, base.DEC, 0x3)
pf_fields["pf_flag_cmd_mrpr_state_running"] = ProtoField.new ("Running", "atem.cmd.mrpr.state.flags.running", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_mrpr_state_waiting"] = ProtoField.new ("Waiting", "atem.cmd.mrpr.state.flags.waiting", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
VALS["VALS_MRPR_ISLOOPING"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_mrpr_islooping"] = ProtoField.new ("Is Looping", "atem.cmd.mrpr.islooping", ftypes.UINT8, VALS["VALS_MRPR_ISLOOPING"], base.DEC)
pf_fields["pf_field_index0"] = ProtoField.new ("Index", "atem.field.index0", ftypes.UINT16, nil, base.DEC)
VALS["VALS_MACT_ACTION"] = {[0] = "Run Macro", [1] = "Stop (w/Index 0xFFFF)", [2] = "Stop Recording (w/Index 0xFFFF)", [3] = "Insert Wait for User (w/Index 0xFFFF)", [4] = "Continue (w/Index 0xFFFF)", [5] = "Delete Macro"}
pf_fields["pf_cmd_mact_action"] = ProtoField.new ("Action", "atem.cmd.mact.action", ftypes.UINT8, VALS["VALS_MACT_ACTION"], base.DEC)
VALS["VALS_MRCP_SETMASK20"] = {[0] = "Looping"}
pf_fields["pf_cmd_mrcp_setmask20"] = ProtoField.new ("Set Mask", "atem.cmd.mrcp.setmask20", ftypes.UINT8, VALS["VALS_MRCP_SETMASK20"], base.DEC)
VALS["VALS_MRCP_LOOPING"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_mrcp_looping"] = ProtoField.new ("Looping", "atem.cmd.mrcp.looping", ftypes.UINT8, VALS["VALS_MRCP_LOOPING"], base.DEC)
pf_fields["pf_cmd_mprp_macroindex"] = ProtoField.new ("Macro Index", "atem.cmd.mprp.macroindex", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_field_namestringlength"] = ProtoField.new ("(Name String Length)", "atem.field.namestringlength", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_descriptionstringlength"] = ProtoField.new ("(Description String Length)", "atem.field.descriptionstringlength", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_mprp_name1"] = ProtoField.new ("Name", "atem.cmd.mprp.name1", ftypes.STRING, nil, base.NONE)
pf_fields["pf_field_description"] = ProtoField.new ("Description", "atem.field.description", ftypes.STRING, nil, base.NONE)
pf_fields["pf_cmd_cmpr_setmask21"] = ProtoField.new ("Set Mask", "atem.cmd.cmpr.setmask21", ftypes.UINT8, nil, base.DEC, 0xFF)
pf_fields["pf_flag_cmd_cmpr_setmask21_name"] = ProtoField.new ("Name", "atem.cmd.cmpr.setmask21.flags.name", ftypes.BOOLEAN, {"On","Off"}, 2, 0x1)
pf_fields["pf_flag_cmd_cmpr_setmask21_description"] = ProtoField.new ("Description", "atem.cmd.cmpr.setmask21.flags.description", ftypes.BOOLEAN, {"On","Off"}, 2, 0x2)
pf_fields["pf_field_name2"] = ProtoField.new ("Name", "atem.field.name2", ftypes.STRING, nil, base.NONE)
pf_fields["pf_cmd_msrc_index1"] = ProtoField.new ("Index", "atem.cmd.msrc.index1", ftypes.UINT8, nil, base.DEC)
VALS["VALS_MRCS_ISRECORDING"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_mrcs_isrecording"] = ProtoField.new ("Is Recording", "atem.cmd.mrcs.isrecording", ftypes.UINT8, VALS["VALS_MRCS_ISRECORDING"], base.DEC)
VALS["VALS_FOREGROUND"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_foreground"] = ProtoField.new ("Foreground", "atem.field.foreground", ftypes.UINT8, VALS["VALS_FOREGROUND"], base.DEC)
pf_fields["pf_cmd_cssc_setmask22"] = ProtoField.new ("Set Mask", "atem.cmd.cssc.setmask22", ftypes.UINT32, nil, base.DEC, 0xFFFFFFFF)
pf_fields["pf_flag_cmd_cssc_setmask22_fillsource"] = ProtoField.new ("Fill Source", "atem.cmd.cssc.setmask22.flags.fillsource", ftypes.BOOLEAN, {"On","Off"}, 20, 0x1)
pf_fields["pf_flag_cmd_cssc_setmask22_keysource"] = ProtoField.new ("Key Source", "atem.cmd.cssc.setmask22.flags.keysource", ftypes.BOOLEAN, {"On","Off"}, 20, 0x2)
pf_fields["pf_flag_cmd_cssc_setmask22_foreground"] = ProtoField.new ("Foreground", "atem.cmd.cssc.setmask22.flags.foreground", ftypes.BOOLEAN, {"On","Off"}, 20, 0x4)
pf_fields["pf_flag_cmd_cssc_setmask22_premultiplied"] = ProtoField.new ("Pre Multiplied", "atem.cmd.cssc.setmask22.flags.premultiplied", ftypes.BOOLEAN, {"On","Off"}, 20, 0x8)
pf_fields["pf_flag_cmd_cssc_setmask22_clip"] = ProtoField.new ("Clip", "atem.cmd.cssc.setmask22.flags.clip", ftypes.BOOLEAN, {"On","Off"}, 20, 0x10)
pf_fields["pf_flag_cmd_cssc_setmask22_gain"] = ProtoField.new ("Gain", "atem.cmd.cssc.setmask22.flags.gain", ftypes.BOOLEAN, {"On","Off"}, 20, 0x20)
pf_fields["pf_flag_cmd_cssc_setmask22_invert"] = ProtoField.new ("Invert", "atem.cmd.cssc.setmask22.flags.invert", ftypes.BOOLEAN, {"On","Off"}, 20, 0x40)
pf_fields["pf_flag_cmd_cssc_setmask22_enabled"] = ProtoField.new ("Enabled", "atem.cmd.cssc.setmask22.flags.enabled", ftypes.BOOLEAN, {"On","Off"}, 20, 0x80)
pf_fields["pf_flag_cmd_cssc_setmask22_bevel"] = ProtoField.new ("Bevel", "atem.cmd.cssc.setmask22.flags.bevel", ftypes.BOOLEAN, {"On","Off"}, 20, 0x100)
pf_fields["pf_flag_cmd_cssc_setmask22_outerwidth"] = ProtoField.new ("Outer Width", "atem.cmd.cssc.setmask22.flags.outerwidth", ftypes.BOOLEAN, {"On","Off"}, 20, 0x200)
pf_fields["pf_flag_cmd_cssc_setmask22_innerwidth"] = ProtoField.new ("Inner Width", "atem.cmd.cssc.setmask22.flags.innerwidth", ftypes.BOOLEAN, {"On","Off"}, 20, 0x400)
pf_fields["pf_flag_cmd_cssc_setmask22_outersoftness"] = ProtoField.new ("Outer Softness", "atem.cmd.cssc.setmask22.flags.outersoftness", ftypes.BOOLEAN, {"On","Off"}, 20, 0x800)
pf_fields["pf_flag_cmd_cssc_setmask22_innersoftness"] = ProtoField.new ("Inner Softness", "atem.cmd.cssc.setmask22.flags.innersoftness", ftypes.BOOLEAN, {"On","Off"}, 20, 0x1000)
pf_fields["pf_flag_cmd_cssc_setmask22_bevelsoftness"] = ProtoField.new ("Bevel Softness", "atem.cmd.cssc.setmask22.flags.bevelsoftness", ftypes.BOOLEAN, {"On","Off"}, 20, 0x2000)
pf_fields["pf_flag_cmd_cssc_setmask22_bevelpos"] = ProtoField.new ("Bevel Pos", "atem.cmd.cssc.setmask22.flags.bevelpos", ftypes.BOOLEAN, {"On","Off"}, 20, 0x4000)
pf_fields["pf_flag_cmd_cssc_setmask22_hue"] = ProtoField.new ("Hue", "atem.cmd.cssc.setmask22.flags.hue", ftypes.BOOLEAN, {"On","Off"}, 20, 0x8000)
pf_fields["pf_flag_cmd_cssc_setmask22_saturation"] = ProtoField.new ("Saturation", "atem.cmd.cssc.setmask22.flags.saturation", ftypes.BOOLEAN, {"On","Off"}, 20, 0x10000)
pf_fields["pf_flag_cmd_cssc_setmask22_luma"] = ProtoField.new ("Luma", "atem.cmd.cssc.setmask22.flags.luma", ftypes.BOOLEAN, {"On","Off"}, 20, 0x20000)
pf_fields["pf_flag_cmd_cssc_setmask22_direction"] = ProtoField.new ("Direction", "atem.cmd.cssc.setmask22.flags.direction", ftypes.BOOLEAN, {"On","Off"}, 20, 0x40000)
pf_fields["pf_flag_cmd_cssc_setmask22_altitude"] = ProtoField.new ("Altitude", "atem.cmd.cssc.setmask22.flags.altitude", ftypes.BOOLEAN, {"On","Off"}, 20, 0x80000)
VALS["VALS_BOX"] = {[0] = "Box 1", [1] = "Box 2", [2] = "Box 3", [3] = "Box 4"}
pf_fields["pf_field_box"] = ProtoField.new ("Box", "atem.field.box", ftypes.UINT8, VALS["VALS_BOX"], base.DEC)
VALS["VALS_INPUTSOURCE0"] = {[0] = "Black", [1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1000] = "Color Bars", [2001] = "Color 1", [2002] = "Color 2", [3010] = "Media Player 1", [3011] = "Media Player 1 Key", [3020] = "Media Player 2", [3021] = "Media Player 2 Key", [4010] = "Key 1 Mask", [4020] = "Key 2 Mask", [4030] = "Key 3 Mask", [4040] = "Key 4 Mask", [5010] = "DSK 1 Mask", [5020] = "DSK 2 Mask", [6000] = "Super Source", [7001] = "Clean Feed 1", [7002] = "Clean Feed 2", [8001] = "Auxilary 1", [8002] = "Auxilary 2", [8003] = "Auxilary 3", [8004] = "Auxilary 4", [8005] = "Auxilary 5", [8006] = "Auxilary 6", [10010] = "ME 1 Prog", [10011] = "ME 1 Prev", [10020] = "ME 2 Prog", [10021] = "ME 2 Prev"}
pf_fields["pf_field_inputsource0"] = ProtoField.new ("Input Source", "atem.field.inputsource0", ftypes.UINT16, VALS["VALS_INPUTSOURCE0"], base.DEC)
pf_fields["pf_field_positionx2"] = ProtoField.new ("Position X", "atem.field.positionx2", ftypes.INT16, nil, base.DEC)
pf_fields["pf_field_positiony2"] = ProtoField.new ("Position Y", "atem.field.positiony2", ftypes.INT16, nil, base.DEC)
VALS["VALS_CROPPED"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_cropped"] = ProtoField.new ("Cropped", "atem.field.cropped", ftypes.UINT8, VALS["VALS_CROPPED"], base.DEC)
pf_fields["pf_field_croptop"] = ProtoField.new ("Crop Top", "atem.field.croptop", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_cropbottom"] = ProtoField.new ("Crop Bottom", "atem.field.cropbottom", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_cropleft"] = ProtoField.new ("Crop Left", "atem.field.cropleft", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_cropright"] = ProtoField.new ("Crop Right", "atem.field.cropright", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_csbp_setmask23"] = ProtoField.new ("Set Mask", "atem.cmd.csbp.setmask23", ftypes.UINT16, nil, base.DEC, 0x3FF)
pf_fields["pf_flag_cmd_csbp_setmask23_enabled"] = ProtoField.new ("Enabled", "atem.cmd.csbp.setmask23.flags.enabled", ftypes.BOOLEAN, {"On","Off"}, 10, 0x1)
pf_fields["pf_flag_cmd_csbp_setmask23_inputsource"] = ProtoField.new ("Input Source", "atem.cmd.csbp.setmask23.flags.inputsource", ftypes.BOOLEAN, {"On","Off"}, 10, 0x2)
pf_fields["pf_flag_cmd_csbp_setmask23_positionx"] = ProtoField.new ("Position X", "atem.cmd.csbp.setmask23.flags.positionx", ftypes.BOOLEAN, {"On","Off"}, 10, 0x4)
pf_fields["pf_flag_cmd_csbp_setmask23_positiony"] = ProtoField.new ("Position Y", "atem.cmd.csbp.setmask23.flags.positiony", ftypes.BOOLEAN, {"On","Off"}, 10, 0x8)
pf_fields["pf_flag_cmd_csbp_setmask23_size"] = ProtoField.new ("Size", "atem.cmd.csbp.setmask23.flags.size", ftypes.BOOLEAN, {"On","Off"}, 10, 0x10)
pf_fields["pf_flag_cmd_csbp_setmask23_cropped"] = ProtoField.new ("Cropped", "atem.cmd.csbp.setmask23.flags.cropped", ftypes.BOOLEAN, {"On","Off"}, 10, 0x20)
pf_fields["pf_flag_cmd_csbp_setmask23_croptop"] = ProtoField.new ("Crop Top", "atem.cmd.csbp.setmask23.flags.croptop", ftypes.BOOLEAN, {"On","Off"}, 10, 0x40)
pf_fields["pf_flag_cmd_csbp_setmask23_cropbottom"] = ProtoField.new ("Crop Bottom", "atem.cmd.csbp.setmask23.flags.cropbottom", ftypes.BOOLEAN, {"On","Off"}, 10, 0x80)
pf_fields["pf_flag_cmd_csbp_setmask23_cropleft"] = ProtoField.new ("Crop Left", "atem.cmd.csbp.setmask23.flags.cropleft", ftypes.BOOLEAN, {"On","Off"}, 10, 0x100)
pf_fields["pf_flag_cmd_csbp_setmask23_cropright"] = ProtoField.new ("Crop Right", "atem.cmd.csbp.setmask23.flags.cropright", ftypes.BOOLEAN, {"On","Off"}, 10, 0x200)
VALS["VALS_AUDIOSOURCE"] = {[1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1001] = "XLR", [1101] = "AES/EBU", [1201] = "RCA", [2001] = "MP1", [2002] = "MP2"}
pf_fields["pf_field_audiosource"] = ProtoField.new ("Audio Source", "atem.field.audiosource", ftypes.UINT16, VALS["VALS_AUDIOSOURCE"], base.DEC)
VALS["VALS_AMIP_TYPE2"] = {[0] = "External Video", [1] = "Media Player", [2] = "External Audio"}
pf_fields["pf_cmd_amip_type2"] = ProtoField.new ("Type", "atem.cmd.amip.type2", ftypes.UINT8, VALS["VALS_AMIP_TYPE2"], base.DEC)
VALS["VALS_AMIP_FROMMEDIAPLAYER"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd_amip_frommediaplayer"] = ProtoField.new ("From Media Player", "atem.cmd.amip.frommediaplayer", ftypes.UINT8, VALS["VALS_AMIP_FROMMEDIAPLAYER"], base.DEC)
VALS["VALS_AMIP_PLUGTYPE"] = {[0] = "Internal", [1] = "SDI", [2] = "HDMI", [3] = "Component", [4] = "Composite", [5] = "SVideo", [32] = "XLR", [64] = "AES/EBU", [128] = "RCA"}
pf_fields["pf_cmd_amip_plugtype"] = ProtoField.new ("Plug type", "atem.cmd.amip.plugtype", ftypes.UINT8, VALS["VALS_AMIP_PLUGTYPE"], base.DEC)
VALS["VALS_MIXOPTION"] = {[0] = "Off", [1] = "On", [2] = "AFV"}
pf_fields["pf_field_mixoption"] = ProtoField.new ("Mix Option", "atem.field.mixoption", ftypes.UINT8, VALS["VALS_MIXOPTION"], base.DEC)
pf_fields["pf_field_volume"] = ProtoField.new ("Volume", "atem.field.volume", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_field_balance"] = ProtoField.new ("Balance", "atem.field.balance", ftypes.INT16, nil, base.DEC)
pf_fields["pf_cmd_cami_setmask24"] = ProtoField.new ("Set Mask", "atem.cmd.cami.setmask24", ftypes.UINT8, nil, base.DEC, 0xF)
pf_fields["pf_flag_cmd_cami_setmask24_mixoption"] = ProtoField.new ("Mix Option", "atem.cmd.cami.setmask24.flags.mixoption", ftypes.BOOLEAN, {"On","Off"}, 3, 0x1)
pf_fields["pf_flag_cmd_cami_setmask24_volume"] = ProtoField.new ("Volume", "atem.cmd.cami.setmask24.flags.volume", ftypes.BOOLEAN, {"On","Off"}, 3, 0x2)
pf_fields["pf_flag_cmd_cami_setmask24_balance"] = ProtoField.new ("Balance", "atem.cmd.cami.setmask24.flags.balance", ftypes.BOOLEAN, {"On","Off"}, 3, 0x4)
pf_fields["pf_cmd_ammo_unknown9"] = ProtoField.new ("Unknown", "atem.cmd.ammo.unknown9", ftypes.NONE, nil, base.NONE)
VALS["VALS_CAMM_SETMASK25"] = {[0] = "Volume"}
pf_fields["pf_cmd_camm_setmask25"] = ProtoField.new ("Set Mask", "atem.cmd.camm.setmask25", ftypes.UINT8, VALS["VALS_CAMM_SETMASK25"], base.DEC)
VALS["VALS_MONITORAUDIO"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_monitoraudio"] = ProtoField.new ("Monitor Audio", "atem.field.monitoraudio", ftypes.UINT8, VALS["VALS_MONITORAUDIO"], base.DEC)
VALS["VALS_MUTE"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_mute"] = ProtoField.new ("Mute", "atem.field.mute", ftypes.UINT8, VALS["VALS_MUTE"], base.DEC)
VALS["VALS_SOLO"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_solo"] = ProtoField.new ("Solo", "atem.field.solo", ftypes.UINT8, VALS["VALS_SOLO"], base.DEC)
VALS["VALS_SOLOINPUT"] = {[1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1001] = "XLR", [1101] = "AES/EBU", [1201] = "RCA", [2001] = "MP1", [2002] = "MP2"}
pf_fields["pf_field_soloinput"] = ProtoField.new ("Solo Input", "atem.field.soloinput", ftypes.UINT16, VALS["VALS_SOLOINPUT"], base.DEC)
VALS["VALS_DIM"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_field_dim"] = ProtoField.new ("Dim", "atem.field.dim", ftypes.UINT8, VALS["VALS_DIM"], base.DEC)
pf_fields["pf_cmd_camm_setmask26"] = ProtoField.new ("Set Mask", "atem.cmd.camm.setmask26", ftypes.UINT8, nil, base.DEC, 0x3F)
pf_fields["pf_flag_cmd_camm_setmask26_monitoraudio"] = ProtoField.new ("Monitor Audio", "atem.cmd.camm.setmask26.flags.monitoraudio", ftypes.BOOLEAN, {"On","Off"}, 6, 0x1)
pf_fields["pf_flag_cmd_camm_setmask26_volume"] = ProtoField.new ("Volume", "atem.cmd.camm.setmask26.flags.volume", ftypes.BOOLEAN, {"On","Off"}, 6, 0x2)
pf_fields["pf_flag_cmd_camm_setmask26_mute"] = ProtoField.new ("Mute", "atem.cmd.camm.setmask26.flags.mute", ftypes.BOOLEAN, {"On","Off"}, 6, 0x4)
pf_fields["pf_flag_cmd_camm_setmask26_solo"] = ProtoField.new ("Solo", "atem.cmd.camm.setmask26.flags.solo", ftypes.BOOLEAN, {"On","Off"}, 6, 0x8)
pf_fields["pf_flag_cmd_camm_setmask26_soloinput"] = ProtoField.new ("Solo Input", "atem.cmd.camm.setmask26.flags.soloinput", ftypes.BOOLEAN, {"On","Off"}, 6, 0x10)
pf_fields["pf_flag_cmd_camm_setmask26_dim"] = ProtoField.new ("Dim", "atem.cmd.camm.setmask26.flags.dim", ftypes.BOOLEAN, {"On","Off"}, 6, 0x20)
VALS["VALS_SALN_ENABLE"] = {[0] = "Off", [1] = "On"}
pf_fields["pf_cmd_saln_enable"] = ProtoField.new ("Enable", "atem.cmd.saln.enable", ftypes.UINT8, VALS["VALS_SALN_ENABLE"], base.DEC)
pf_fields["pf_field_sources1"] = ProtoField.new ("Sources", "atem.field.sources1", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_amlv_sourcesagain"] = ProtoField.new ("Sources (again?)", "atem.cmd.amlv.sourcesagain", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_amlv_masterleft"] = ProtoField.new ("Master Left", "atem.cmd.amlv.masterleft", ftypes.INT32, nil, base.DEC)
pf_fields["pf_cmd_amlv_masterright"] = ProtoField.new ("Master Right", "atem.cmd.amlv.masterright", ftypes.INT32, nil, base.DEC)
pf_fields["pf_cmd_amlv_masterpeakleft"] = ProtoField.new ("Master Peak Left", "atem.cmd.amlv.masterpeakleft", ftypes.INT32, nil, base.DEC)
pf_fields["pf_cmd_amlv_masterpeakright"] = ProtoField.new ("Master Peak Right", "atem.cmd.amlv.masterpeakright", ftypes.INT32, nil, base.DEC)
pf_fields["pf_cmd_amlv_monitor"] = ProtoField.new ("Monitor", "atem.cmd.amlv.monitor", ftypes.INT32, nil, base.DEC)
pf_fields["pf_cmd_ramp_setmask27"] = ProtoField.new ("Set Mask", "atem.cmd.ramp.setmask27", ftypes.UINT8, nil, base.DEC, 0x7)
-- pf_fields["pf_flag_cmd_ramp_setmask27_"] = ProtoField.new ("?", "atem.cmd.ramp.setmask27.flags.", ftypes.BOOLEAN, {"On","Off"}, 3, 0x1)
pf_fields["pf_flag_cmd_ramp_setmask27_inputs"] = ProtoField.new ("Inputs", "atem.cmd.ramp.setmask27.flags.inputs", ftypes.BOOLEAN, {"On","Off"}, 3, 0x2)
pf_fields["pf_flag_cmd_ramp_setmask27_master"] = ProtoField.new ("Master", "atem.cmd.ramp.setmask27.flags.master", ftypes.BOOLEAN, {"On","Off"}, 3, 0x4)
VALS["VALS_RAMP_INPUTSOURCE1"] = {[1] = "Input 1", [2] = "Input 2", [3] = "Input 3", [4] = "Input 4", [5] = "Input 5", [6] = "Input 6", [7] = "Input 7", [8] = "Input 8", [9] = "Input 9", [10] = "Input 10", [11] = "Input 11", [12] = "Input 12", [13] = "Input 13", [14] = "Input 14", [15] = "Input 15", [16] = "Input 16", [17] = "Input 17", [18] = "Input 18", [19] = "Input 19", [20] = "Input 20", [1001] = "XLR", [1101] = "AES/EBU", [1201] = "RCA", [2001] = "MP1", [2002] = "MP2"}
pf_fields["pf_cmd_ramp_inputsource1"] = ProtoField.new ("Input Source", "atem.cmd.ramp.inputsource1", ftypes.UINT16, VALS["VALS_RAMP_INPUTSOURCE1"], base.DEC)
VALS["VALS_RAMP_MASTER"] = {[0] = "No", [1] = "Yes"}
pf_fields["pf_cmd_ramp_master"] = ProtoField.new ("Master", "atem.cmd.ramp.master", ftypes.UINT8, VALS["VALS_RAMP_MASTER"], base.DEC)
pf_fields["pf_cmd_time_hour"] = ProtoField.new ("Hour", "atem.cmd.time.hour", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_time_minute"] = ProtoField.new ("Minute", "atem.cmd.time.minute", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_time_second"] = ProtoField.new ("Second", "atem.cmd.time.second", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_time_frame"] = ProtoField.new ("Frame", "atem.cmd.time.frame", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_lokb_storeId"] = ProtoField.new ("Store ID", "atem.cmd.lokb.storeId", ftypes.UINT16, VALS["VALS_TRANSFER_TYPE"], base.DEC)
pf_fields["pf_cmd_lock_storeId"] = ProtoField.new ("Store ID", "atem.cmd.lock.storeId", ftypes.UINT16, VALS["VALS_TRANSFER_TYPE"], base.DEC)
VALS["VALS_LOCK_STATE"] = {[0] = "Unlock", [1] = "Lock"}
pf_fields["pf_cmd_lock_state"] = ProtoField.new ("State", "atem.cmd.lock.state", ftypes.UINT8, VALS["VALS_LOCK_STATE"], base.DEC)
pf_fields["pf_cmd_lkst_storeId"] = ProtoField.new ("Store ID", "atem.cmd.lkst.storeId", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_lkst_state"] = ProtoField.new ("State", "atem.cmd.lkst.state", ftypes.UINT8, VALS["VALS_LOCK_STATE"], base.DEC)
pf_fields["pf_cmd_incm_state1"] = ProtoField.new ("State 1", "atem.cmd.incm.state1", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_incm_state2"] = ProtoField.new ("State 2", "atem.cmd.incm.state2", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_ftsd_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftsd.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftsd_storeId"] = ProtoField.new ("Transfer Store ID", "atem.cmd.ftsd.storeId", ftypes.UINT16, VALS["VALS_TRANSFER_TYPE"], base.DEC)
pf_fields["pf_cmd_ftsd_index"] = ProtoField.new ("Transfer Index", "atem.cmd.ftsd.index", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_ftsd_size"] = ProtoField.new ("Size", "atem.cmd.ftsd.size", ftypes.UINT16, nil, base.DEC)
VALS["VALS_FTSD_OP"] = {[1] = "Write", [2] = "Clear"}
pf_fields["pf_cmd_ftsd_op"] = ProtoField.new ("Operation", "atem.cmd.ftsd.op", ftypes.UINT16, VALS["VALS_FTSD_OP"], base.DEC)
pf_fields["pf_cmd_ftcd_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftcd.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftcd_chunk_size"] = ProtoField.new ("Chunk Size", "atem.cmd.ftcd.chunkSize", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftcd_chunk_count"]= ProtoField.new ("Chunk Count", "atem.cmd.ftcd.chunkCount", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftda_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftda.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftda_size"] = ProtoField.new ("Size", "atem.cmd.ftda.size", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftda_data"] = ProtoField.new ("Data", "atem.cmd.ftda.data", ftypes.BYTES)
pf_fields["pf_cmd_ftsu_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftsu.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftsu_storeId"] = ProtoField.new ("Transfer Store ID", "atem.cmd.ftsu.storeId", ftypes.UINT8, VALS["VALS_TRANSFER_TYPE"], base.DEC)
pf_fields["pf_cmd_ftsu_index"] = ProtoField.new ("Transfer Index", "atem.cmd.ftsu.index", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_ftua_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftua.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftua_index"] = ProtoField.new ("Transfer Index", "atem.cmd.ftua.index", ftypes.UINT8, nil, base.DEC)
pf_fields["pf_cmd_ftdc_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftdc.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftfd_id"] = ProtoField.new ("Transfer ID", "atem.cmd.ftfd.id", ftypes.UINT16, nil, base.DEC)
pf_fields["pf_cmd_ftfd_filename"] = ProtoField.new ("Filename", "atem.cmd.ftfd.filename", ftypes.STRING, nil, base.NONE)
pf_fields["pf_cmd_ftfd_hash"] = ProtoField.new ("File hash (MD5)", "atem.cmd.ftfd.hash", ftypes.BYTES)
local cmd_labels = {}
cmd_labels["_ver"] = "Protocol Version"
cmd_labels["_pin"] = "Product Id"
cmd_labels["Warn"] = "Warning"
cmd_labels["_top"] = "Topology"
cmd_labels["_MeC"] = "Mix Effect Config"
cmd_labels["_mpl"] = "Media Players"
cmd_labels["_MvC"] = "Multi View Config"
cmd_labels["_SSC"] = "Super Source Config"
cmd_labels["_TlC"] = "Tally Channel Config"
cmd_labels["_AMC"] = "Audio Mixer Config"
cmd_labels["_VMC"] = "Video Mixer Config"
cmd_labels["_MAC"] = "Macro Pool"
cmd_labels["Powr"] = "Power"
cmd_labels["DcOt"] = "Down Converter"
cmd_labels["CDcO"] = "Down Converter"
cmd_labels["VidM"] = "Video Mode"
cmd_labels["CVdM"] = "Video Mode"
cmd_labels["InPr"] = "Input Properties"
cmd_labels["CInL"] = "Input Properties"
cmd_labels["MvPr"] = "Multi Viewer Properties"
cmd_labels["CMvP"] = "Multi Viewer Properties"
cmd_labels["MvIn"] = "Multi Viewer Input"
cmd_labels["CMvI"] = "Multi Viewer Input"
cmd_labels["PrgI"] = "Program Input"
cmd_labels["CPgI"] = "Program Input"
cmd_labels["PrvI"] = "Preview Input"
cmd_labels["CPvI"] = "Preview Input"
cmd_labels["DCut"] = "Cut"
cmd_labels["DAut"] = "Auto"
cmd_labels["TrSS"] = "Transition"
cmd_labels["CTTp"] = "Transition"
cmd_labels["TrPr"] = "Transition Preview"
cmd_labels["CTPr"] = "Transition Preview"
cmd_labels["TrPs"] = "Transition Position"
cmd_labels["CTPs"] = "Transition Position"
cmd_labels["TMxP"] = "Transition Mix"
cmd_labels["CTMx"] = "Transition Mix"
cmd_labels["TDpP"] = "Transition Dip"
cmd_labels["CTDp"] = "Transition Dip"
cmd_labels["TWpP"] = "Transition Wipe"
cmd_labels["CTWp"] = "Transition Wipe"
cmd_labels["TDvP"] = "Transition DVE"
cmd_labels["CTDv"] = "Transition DVE"
cmd_labels["TStP"] = "Transition Stinger"
cmd_labels["CTSt"] = "Transition Stinger"
cmd_labels["KeOn"] = "Keyer On Air"
cmd_labels["CKOn"] = "Keyer On Air"
cmd_labels["KeBP"] = "Keyer Base"
cmd_labels["CKTp"] = "Key Type"
cmd_labels["CKMs"] = "Key Mask"
cmd_labels["CKeF"] = "Key Fill"
cmd_labels["CKeC"] = "Key Cut"
cmd_labels["KeLm"] = "Key Luma"
cmd_labels["CKLm"] = "Key Luma"
cmd_labels["KeCk"] = "Key Chroma"
cmd_labels["CKCk"] = "Key Chroma"
cmd_labels["KePt"] = "Key Pattern"
cmd_labels["CKPt"] = "Key Pattern"
cmd_labels["KeDV"] = "Key DVE"
cmd_labels["CKDV"] = "Key DVE"
cmd_labels["KeFS"] = "Keyer Fly"
cmd_labels["SFKF"] = "Keyer Fly"
cmd_labels["RFlK"] = "Run Flying Key"
cmd_labels["KKFP"] = "Keyer Fly Key Frame"
cmd_labels["DskB"] = "Downstream Keyer"
cmd_labels["CDsF"] = "Downstream Keyer"
cmd_labels["CDsC"] = "Downstream Keyer"
cmd_labels["DskP"] = "Downstream Keyer"
cmd_labels["CDsT"] = "Downstream Keyer"
cmd_labels["CDsR"] = "Downstream Keyer"
cmd_labels["CDsG"] = "Downstream Keyer"
cmd_labels["CDsM"] = "Downstream Keyer"
cmd_labels["DDsA"] = "Downstream Keyer Auto"
cmd_labels["DskS"] = "Downstream Keyer"
cmd_labels["CDsL"] = "Downstream Keyer"
cmd_labels["FtbP"] = "Fade-To-Black"
cmd_labels["FtbC"] = "Fade-To-Black"
cmd_labels["FtbS"] = "Fade-To-Black State"
cmd_labels["FtbA"] = "Fade-To-Black"
cmd_labels["ColV"] = "Color Generator"
cmd_labels["CClV"] = "Color Generator"
cmd_labels["AuxS"] = "Aux Source"
cmd_labels["CAuS"] = "Aux Source"
cmd_labels["CCdo"] = "Camera Control Options(?)"
cmd_labels["CCdP"] = "Camera Control"
cmd_labels["CCmd"] = "Camera Control"
cmd_labels["RCPS"] = "Clip Player"
cmd_labels["SCPS"] = "Clip Player"
cmd_labels["MPCE"] = "Media Player Source"
cmd_labels["MPSS"] = "Media Player Source"
cmd_labels["MPSp"] = "Media Pool Storage"
cmd_labels["CMPS"] = "Media Pool Storage"
cmd_labels["CSTL"] = "Media Pool Clear Still"
cmd_labels["CMPC"] = "Media Pool Clear Clip"
cmd_labels["CMPA"] = "Media Pool Clear Audio"
cmd_labels["MPCS"] = "Media Player Clip Description"
cmd_labels["SMPC"] = "Set Media Player Clip Description"
cmd_labels["MPAS"] = "Media Player Audio Description"
cmd_labels["MPfe"] = "Media Player Frame Description"
cmd_labels["MRPr"] = "Macro Run Status"
cmd_labels["MAct"] = "Macro Action"
cmd_labels["MRCP"] = "Macro Run Change Properties"
cmd_labels["MPrp"] = "Macro Properties"
cmd_labels["CMPr"] = "Change Macro Properties"
cmd_labels["MSRc"] = "Macro Start Recording"
cmd_labels["MSlp"] = "Macro Add Pause"
cmd_labels["MRcS"] = "Macro Recording Status"
cmd_labels["SSrc"] = "Super Source"
cmd_labels["CSSc"] = "Super Source"
cmd_labels["SSBP"] = "Super Source Box Parameters"
cmd_labels["CSBP"] = "Super Source Box Parameters"
cmd_labels["AMIP"] = "Audio Mixer Input"
cmd_labels["CAMI"] = "Audio Mixer Input"
cmd_labels["AMMO"] = "Audio Mixer Master"
cmd_labels["CAMM"] = "Audio Mixer Master"
cmd_labels["AMmO"] = "Audio Mixer Monitor"
cmd_labels["CAMm"] = "Audio Mixer Monitor"
cmd_labels["SALN"] = "Audio Levels"
cmd_labels["AMLv"] = "Audio Mixer Levels"
cmd_labels["RAMP"] = "Reset Audio Mixer Peaks"
cmd_labels["AMTl"] = "Audio Mixer Tally"
cmd_labels["TlIn"] = "Tally By Index"
cmd_labels["TlSr"] = "Tally By Source"
cmd_labels["Time"] = "Last State Change Time Code"
cmd_labels["SRsv"] = "Save Startup State"
cmd_labels["SRcl"] = "Clear Startup State"
cmd_labels["LOCK"] = "Set Lock State"
cmd_labels["LKOB"] = "Lock Obtained"
cmd_labels["LKST"] = "Lock State Changed"
cmd_labels["InCm"] = "Initialization Completed"
cmd_labels["FTSD"] = "Data Transfer to Switcher"
cmd_labels["FTFD"] = "Data File Description"
cmd_labels["FTDC"] = "Data Transfer Completed"
cmd_labels["FTSU"] = "Data Transfer Request"
cmd_labels["FTDa"] = "Data Transfer"
cmd_labels["FTUA"] = "Data Transfer Ack"
cmd_labels["FTDE"] = "Data Transfer Error"
----------------------------------------
-- this actually registers the ProtoFields above, into our new Protocol
-- in a real script I wouldn't do it this way; I'd build a table of fields programmatically
-- and then set atem_proto.fields to it, so as to avoid forgetting a field
atem_proto.fields = {
pf_packet_length, pf_flags, pf_session_id, pf_switcher_pkt_id, pf_client_pkt_id, pf_ack_pkt_id, pf_unknown1, pf_flag_ack,
pf_cmd_length, pf_cmd_name,
pf_flag_init, pf_flag_retransmission, pf_flag_hello, pf_flag_response,
pf_fields["pf_cmd__ver_major"],pf_fields["pf_cmd__ver_minor"],pf_fields["pf_cmd__pin_name0"],pf_fields["pf_cmd_warn_text"],pf_fields["pf_cmd__top_mes"],pf_fields["pf_cmd__top_sources0"],pf_fields["pf_cmd__top_colorgenerators"],pf_fields["pf_cmd__top_auxbusses"],pf_fields["pf_cmd__top_downstreamkeyes"],pf_fields["pf_cmd__top_stingers"],pf_fields["pf_cmd__top_dves"],pf_fields["pf_cmd__top_supersources"],pf_fields["pf_field_unknown0"],pf_fields["pf_cmd__top_hassdoutput"],pf_fields["pf_field_unknown1"],pf_fields["pf_field_me"],pf_fields["pf_cmd__mec_keyersonme"],pf_fields["pf_cmd__mpl_stillbanks"],pf_fields["pf_cmd__mpl_clipbanks"],pf_fields["pf_cmd__mvc_multiviewers"],pf_fields["pf_field_unknown2"],pf_fields["pf_cmd__ssc_boxes"],pf_fields["pf_field_unknown3"],pf_fields["pf_cmd__tlc_tallychannels"],pf_fields["pf_cmd__amc_audiochannels"],pf_fields["pf_cmd__amc_hasmonitor"],pf_fields["pf_cmd__vmc_modes"],pf_fields["pf_flag_cmd__vmc_modes_525i5994ntsc"],pf_fields["pf_flag_cmd__vmc_modes_625i50pal"],pf_fields["pf_flag_cmd__vmc_modes_525i5994ntsc169"],pf_fields["pf_flag_cmd__vmc_modes_625i50pal169"],pf_fields["pf_flag_cmd__vmc_modes_720p50"],pf_fields["pf_flag_cmd__vmc_modes_720p5994"],pf_fields["pf_flag_cmd__vmc_modes_1080i50"],pf_fields["pf_flag_cmd__vmc_modes_1080i5994"],pf_fields["pf_flag_cmd__vmc_modes_1080p2398"],pf_fields["pf_flag_cmd__vmc_modes_1080p24"],pf_fields["pf_flag_cmd__vmc_modes_1080p25"],pf_fields["pf_flag_cmd__vmc_modes_1080p2997"],pf_fields["pf_flag_cmd__vmc_modes_1080p50"],pf_fields["pf_flag_cmd__vmc_modes_1080p5994"],pf_fields["pf_flag_cmd__vmc_modes_2160p2398"],pf_fields["pf_flag_cmd__vmc_modes_2160p24"],pf_fields["pf_flag_cmd__vmc_modes_2160p25"],pf_fields["pf_flag_cmd__vmc_modes_2160p2997"],pf_fields["pf_cmd__mac_banks"],pf_fields["pf_cmd_powr_status"],pf_fields["pf_flag_cmd_powr_status_mainpower"],pf_fields["pf_flag_cmd_powr_status_backuppower"],pf_fields["pf_field_mode"],pf_fields["pf_field_format"],pf_fields["pf_field_videosource"],pf_fields["pf_field_longname"],pf_fields["pf_field_shortname"],pf_fields["pf_cmd_inpr_availableexternalporttypes"],pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_sdi"],pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_hdmi"],pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_component"],pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_composite"],pf_fields["pf_flag_cmd_inpr_availableexternalporttypes_svideo"],pf_fields["pf_cmd_inpr_externalporttype0"],pf_fields["pf_cmd_inpr_porttype"],pf_fields["pf_cmd_inpr_availability"],pf_fields["pf_flag_cmd_inpr_availability_auxilary"],pf_fields["pf_flag_cmd_inpr_availability_multiviewer"],pf_fields["pf_flag_cmd_inpr_availability_supersourceart"],pf_fields["pf_flag_cmd_inpr_availability_supersourcebox"],pf_fields["pf_flag_cmd_inpr_availability_keysourceseverywhere"],pf_fields["pf_cmd_inpr_meavailability"],pf_fields["pf_flag_cmd_inpr_meavailability_me1fillsources"],pf_fields["pf_flag_cmd_inpr_meavailability_me2fillsources"],pf_fields["pf_cmd_inpr_available3"],pf_fields["pf_cmd_cinl_setmask0"],pf_fields["pf_flag_cmd_cinl_setmask0_longname"],pf_fields["pf_flag_cmd_cinl_setmask0_shortname"],pf_fields["pf_flag_cmd_cinl_setmask0_externalporttype"],pf_fields["pf_cmd_cinl_externalporttype1"],pf_fields["pf_field_multiviewer"],pf_fields["pf_field_layout"],pf_fields["pf_cmd_cmvp_setmask1"],pf_fields["pf_field_windowindex"],pf_fields["pf_field_style0"],pf_fields["pf_field_nexttransition"],pf_fields["pf_flag_field_nexttransition_background"],pf_fields["pf_flag_field_nexttransition_key1"],pf_fields["pf_flag_field_nexttransition_key2"],pf_fields["pf_flag_field_nexttransition_key3"],pf_fields["pf_flag_field_nexttransition_key4"],pf_fields["pf_cmd_trss_stylenext"],pf_fields["pf_cmd_trss_nexttransitionnext"],pf_fields["pf_flag_cmd_trss_nexttransitionnext_background"],pf_fields["pf_flag_cmd_trss_nexttransitionnext_key1"],pf_fields["pf_flag_cmd_trss_nexttransitionnext_key2"],pf_fields["pf_flag_cmd_trss_nexttransitionnext_key3"],pf_fields["pf_flag_cmd_trss_nexttransitionnext_key4"],pf_fields["pf_cmd_cttp_setmask2"],pf_fields["pf_flag_cmd_cttp_setmask2_transitionstyle"],pf_fields["pf_flag_cmd_cttp_setmask2_nexttransition"],pf_fields["pf_field_enabled"],pf_fields["pf_cmd_trps_intransition0"],pf_fields["pf_field_framesremaining"],pf_fields["pf_field_position"],pf_fields["pf_field_rate"],pf_fields["pf_field_input0"],pf_fields["pf_cmd_ctdp_setmask3"],pf_fields["pf_flag_cmd_ctdp_setmask3_rate"],pf_fields["pf_flag_cmd_ctdp_setmask3_input"],pf_fields["pf_field_pattern"],pf_fields["pf_field_width"],pf_fields["pf_field_fillsource"],pf_fields["pf_field_symmetry"],pf_fields["pf_field_softness"],pf_fields["pf_field_positionx0"],pf_fields["pf_field_positiony0"],pf_fields["pf_field_reverse"],pf_fields["pf_field_flipflop"],pf_fields["pf_cmd_ctwp_setmask4"],pf_fields["pf_flag_cmd_ctwp_setmask4_rate"],pf_fields["pf_flag_cmd_ctwp_setmask4_pattern"],pf_fields["pf_flag_cmd_ctwp_setmask4_width"],pf_fields["pf_flag_cmd_ctwp_setmask4_fillsource"],pf_fields["pf_flag_cmd_ctwp_setmask4_symmetry"],pf_fields["pf_flag_cmd_ctwp_setmask4_softness"],pf_fields["pf_flag_cmd_ctwp_setmask4_positionx"],pf_fields["pf_flag_cmd_ctwp_setmask4_positiony"],pf_fields["pf_flag_cmd_ctwp_setmask4_reverse"],pf_fields["pf_flag_cmd_ctwp_setmask4_flipflop"],pf_fields["pf_field_style1"],pf_fields["pf_field_keysource"],pf_fields["pf_field_enablekey"],pf_fields["pf_field_premultiplied"],pf_fields["pf_field_clip"],pf_fields["pf_field_gain0"],pf_fields["pf_field_invertkey0"],pf_fields["pf_cmd_ctdv_setmask5"],pf_fields["pf_flag_cmd_ctdv_setmask5_rate"],pf_fields["pf_flag_cmd_ctdv_setmask5_"],pf_fields["pf_flag_cmd_ctdv_setmask5_style"],pf_fields["pf_flag_cmd_ctdv_setmask5_fillsource"],pf_fields["pf_flag_cmd_ctdv_setmask5_keysource"],pf_fields["pf_flag_cmd_ctdv_setmask5_enablekey"],pf_fields["pf_flag_cmd_ctdv_setmask5_premultiplied"],pf_fields["pf_flag_cmd_ctdv_setmask5_clip"],pf_fields["pf_flag_cmd_ctdv_setmask5_gain"],pf_fields["pf_flag_cmd_ctdv_setmask5_invertkey"],pf_fields["pf_flag_cmd_ctdv_setmask5_reverse"],pf_fields["pf_flag_cmd_ctdv_setmask5_flipflop"],pf_fields["pf_field_source"],pf_fields["pf_field_preroll"],pf_fields["pf_field_clipduration"],pf_fields["pf_field_triggerpoint"],pf_fields["pf_field_mixrate"],pf_fields["pf_cmd_ctst_setmask6"],pf_fields["pf_flag_cmd_ctst_setmask6_source"],pf_fields["pf_flag_cmd_ctst_setmask6_premultiplied"],pf_fields["pf_flag_cmd_ctst_setmask6_clip"],pf_fields["pf_flag_cmd_ctst_setmask6_gain"],pf_fields["pf_flag_cmd_ctst_setmask6_invertkey"],pf_fields["pf_flag_cmd_ctst_setmask6_preroll"],pf_fields["pf_flag_cmd_ctst_setmask6_clipduration"],pf_fields["pf_flag_cmd_ctst_setmask6_triggerpoint"],pf_fields["pf_flag_cmd_ctst_setmask6_mixrate"],pf_fields["pf_field_keyer0"],pf_fields["pf_field_type0"],pf_fields["pf_cmd_kebp_keyenabled"],pf_fields["pf_cmd_kebp_keyenabledagain"],pf_fields["pf_field_flyenabled"],pf_fields["pf_field_masked"],pf_fields["pf_field_top"],pf_fields["pf_field_bottom"],pf_fields["pf_field_left"],pf_fields["pf_field_right"],pf_fields["pf_cmd_cktp_setmask7"],pf_fields["pf_flag_cmd_cktp_setmask7_type"],pf_fields["pf_flag_cmd_cktp_setmask7_enabled"],pf_fields["pf_field_setmask8"],pf_fields["pf_flag_field_setmask8_masked"],pf_fields["pf_flag_field_setmask8_top"],pf_fields["pf_flag_field_setmask8_bottom"],pf_fields["pf_flag_field_setmask8_left"],pf_fields["pf_flag_field_setmask8_right"],pf_fields["pf_cmd_cklm_setmask9"],pf_fields["pf_flag_cmd_cklm_setmask9_premultiplied"],pf_fields["pf_flag_cmd_cklm_setmask9_clip"],pf_fields["pf_flag_cmd_cklm_setmask9_gain"],pf_fields["pf_flag_cmd_cklm_setmask9_invertkey"],pf_fields["pf_field_hue0"],pf_fields["pf_field_ysuppress"],pf_fields["pf_field_lift"],pf_fields["pf_field_narrow"],pf_fields["pf_cmd_ckck_setmask10"],pf_fields["pf_flag_cmd_ckck_setmask10_hue"],pf_fields["pf_flag_cmd_ckck_setmask10_gain"],pf_fields["pf_flag_cmd_ckck_setmask10_ysuppress"],pf_fields["pf_flag_cmd_ckck_setmask10_lift"],pf_fields["pf_flag_cmd_ckck_setmask10_narrow"],pf_fields["pf_field_size"],pf_fields["pf_field_invertpattern"],pf_fields["pf_cmd_ckpt_setmask11"],pf_fields["pf_flag_cmd_ckpt_setmask11_pattern"],pf_fields["pf_flag_cmd_ckpt_setmask11_size"],pf_fields["pf_flag_cmd_ckpt_setmask11_symmetry"],pf_fields["pf_flag_cmd_ckpt_setmask11_softness"],pf_fields["pf_flag_cmd_ckpt_setmask11_positionx"],pf_fields["pf_flag_cmd_ckpt_setmask11_positiony"],pf_fields["pf_flag_cmd_ckpt_setmask11_invertpattern"],pf_fields["pf_field_sizex"],pf_fields["pf_field_sizey"],pf_fields["pf_field_positionx1"],pf_fields["pf_field_positiony1"],pf_fields["pf_field_rotation"],pf_fields["pf_field_borderenabled"],pf_fields["pf_field_shadow"],pf_fields["pf_field_borderbevel"],pf_fields["pf_field_borderouterwidth"],pf_fields["pf_field_borderinnerwidth"],pf_fields["pf_field_borderoutersoftness"],pf_fields["pf_field_borderinnersoftness"],pf_fields["pf_field_borderbevelsoftness"],pf_fields["pf_field_borderbevelposition"],pf_fields["pf_field_borderopacity"],pf_fields["pf_field_borderhue"],pf_fields["pf_field_bordersaturation"],pf_fields["pf_field_borderluma"],pf_fields["pf_field_lightsourcedirection"],pf_fields["pf_field_lightsourcealtitude"],pf_fields["pf_cmd_ckdv_setmask12"],pf_fields["pf_flag_cmd_ckdv_setmask12_sizex"],pf_fields["pf_flag_cmd_ckdv_setmask12_sizey"],pf_fields["pf_flag_cmd_ckdv_setmask12_positionx"],pf_fields["pf_flag_cmd_ckdv_setmask12_positiony"],pf_fields["pf_flag_cmd_ckdv_setmask12_rotation"],pf_fields["pf_flag_cmd_ckdv_setmask12_borderenabled"],pf_fields["pf_flag_cmd_ckdv_setmask12_shadow"],pf_fields["pf_flag_cmd_ckdv_setmask12_borderbevel"],pf_fields["pf_flag_cmd_ckdv_setmask12_outerwidth"],pf_fields["pf_flag_cmd_ckdv_setmask12_innerwidth"],pf_fields["pf_flag_cmd_ckdv_setmask12_outersoftness"],pf_fields["pf_flag_cmd_ckdv_setmask12_innersoftness"],pf_fields["pf_flag_cmd_ckdv_setmask12_bevelsoftness"],pf_fields["pf_flag_cmd_ckdv_setmask12_bevelposition"],pf_fields["pf_flag_cmd_ckdv_setmask12_borderopacity"],pf_fields["pf_flag_cmd_ckdv_setmask12_borderhue"],pf_fields["pf_flag_cmd_ckdv_setmask12_bordersaturation"],pf_fields["pf_flag_cmd_ckdv_setmask12_borderluma"],pf_fields["pf_flag_cmd_ckdv_setmask12_direction"],pf_fields["pf_flag_cmd_ckdv_setmask12_altitude"],pf_fields["pf_flag_cmd_ckdv_setmask12_masked"],pf_fields["pf_flag_cmd_ckdv_setmask12_top"],pf_fields["pf_flag_cmd_ckdv_setmask12_bottom"],pf_fields["pf_flag_cmd_ckdv_setmask12_left"],pf_fields["pf_flag_cmd_ckdv_setmask12_right"],pf_fields["pf_flag_cmd_ckdv_setmask12_rate"],pf_fields["pf_cmd_kefs_isaset"],pf_fields["pf_cmd_kefs_isbset"],pf_fields["pf_cmd_kefs_isatkeyframe"],pf_fields["pf_flag_cmd_kefs_isatkeyframe_a"],pf_fields["pf_flag_cmd_kefs_isatkeyframe_b"],pf_fields["pf_flag_cmd_kefs_isatkeyframe_full"],pf_fields["pf_flag_cmd_kefs_isatkeyframe_runtoinfinite"],pf_fields["pf_field_runtoinfiniteindex"],pf_fields["pf_field_keyframe0"],pf_fields["pf_cmd_rflk_setmask13"],pf_fields["pf_flag_cmd_rflk_setmask13_onoff"],pf_fields["pf_flag_cmd_rflk_setmask13_runtoinfinite"],pf_fields["pf_cmd_rflk_keyframe1"],pf_fields["pf_field_keyer1"],pf_fields["pf_field_tie"],pf_fields["pf_cmd_cdsg_setmask14"],pf_fields["pf_flag_cmd_cdsg_setmask14_premultiplied"],pf_fields["pf_flag_cmd_cdsg_setmask14_clip"],pf_fields["pf_flag_cmd_cdsg_setmask14_gain"],pf_fields["pf_cmd_cdsg_invertkey1"],pf_fields["pf_field_onair"],pf_fields["pf_field_intransition1"],pf_fields["pf_cmd_dsks_isautotransitioning"],pf_fields["pf_cmd_ftbc_setmask15"],pf_fields["pf_cmd_ftbs_fullyblack"],pf_fields["pf_field_colorgenerator"],pf_fields["pf_field_saturation0"],pf_fields["pf_field_luma"],pf_fields["pf_cmd_cclv_setmask16"],pf_fields["pf_flag_cmd_cclv_setmask16_hue"],pf_fields["pf_flag_cmd_cclv_setmask16_saturation"],pf_fields["pf_flag_cmd_cclv_setmask16_luma"],pf_fields["pf_field_auxchannel"],pf_fields["pf_field_setmask17"],pf_fields["pf_field_input1"],pf_fields["pf_field_adjustmentdomain"],pf_fields["pf_cmd_ccdo_lensfeature0"],pf_fields["pf_cmd_ccdo_camerafeature0"],pf_fields["pf_field_chipfeature"],pf_fields["pf_cmd_ccdo_available"],pf_fields["pf_field_lensfeature1"],pf_fields["pf_field_camerafeature1"],pf_fields["pf_cmd_ccdp_unknown4"],pf_fields["pf_field_iris"],pf_fields["pf_field_focus"],pf_fields["pf_field_gain1"],pf_fields["pf_field_whitebalance"],pf_fields["pf_field_zoomspeed"],pf_fields["pf_field_liftr"],pf_fields["pf_field_gammar"],pf_fields["pf_field_gainr"],pf_fields["pf_field_lummix"],pf_fields["pf_field_hue1"],pf_fields["pf_field_shutter"],pf_fields["pf_field_liftg"],pf_fields["pf_field_gammag"],pf_fields["pf_field_gaing"],pf_fields["pf_field_contrast"],pf_fields["pf_field_saturation1"],pf_fields["pf_field_liftb"],pf_fields["pf_field_gammab"],pf_fields["pf_field_gainb"],pf_fields["pf_field_lifty"],pf_fields["pf_field_gammay"],pf_fields["pf_field_gainy"],pf_fields["pf_cmd_ccmd_relative"],pf_fields["pf_field_unknown5"],pf_fields["pf_field_mediaplayer"],pf_fields["pf_field_playing"],pf_fields["pf_field_loop"],pf_fields["pf_field_atbeginning"],pf_fields["pf_field_clipframe"],pf_fields["pf_cmd_scps_setmask18"],pf_fields["pf_flag_cmd_scps_setmask18_playing"],pf_fields["pf_flag_cmd_scps_setmask18_loop"],pf_fields["pf_flag_cmd_scps_setmask18_beginning"],pf_fields["pf_flag_cmd_scps_setmask18_frame"],pf_fields["pf_field_type1"],pf_fields["pf_field_stillindex"],pf_fields["pf_field_clipindex"],pf_fields["pf_cmd_mpss_setmask19"],pf_fields["pf_flag_cmd_mpss_setmask19_type"],pf_fields["pf_flag_cmd_mpss_setmask19_still"],pf_fields["pf_flag_cmd_mpss_setmask19_clip"],pf_fields["pf_field_clip1maxlength"],pf_fields["pf_cmd_mpsp_clip2maxlength"],pf_fields["pf_field_clipbank"],pf_fields["pf_field_isused"],pf_fields["pf_field_filename"],pf_fields["pf_field_frames"],pf_fields["pf_cmd_mpas_hash"],pf_fields["pf_cmd_mpfe_type"],pf_fields["pf_cmd_mpfe_index"],pf_fields["pf_cmd_mpfe_hash"],pf_fields["pf_cmd_mpfe_filenamestringlength"],pf_fields["pf_cmd_mrpr_state"],pf_fields["pf_flag_cmd_mrpr_state_running"],pf_fields["pf_flag_cmd_mrpr_state_waiting"],pf_fields["pf_cmd_mrpr_islooping"],pf_fields["pf_field_index0"],pf_fields["pf_cmd_mact_action"],pf_fields["pf_cmd_mrcp_setmask20"],pf_fields["pf_cmd_mrcp_looping"],pf_fields["pf_cmd_mprp_macroindex"],pf_fields["pf_field_namestringlength"],pf_fields["pf_field_descriptionstringlength"],pf_fields["pf_cmd_mprp_name1"],pf_fields["pf_field_description"],pf_fields["pf_cmd_cmpr_setmask21"],pf_fields["pf_flag_cmd_cmpr_setmask21_name"],pf_fields["pf_flag_cmd_cmpr_setmask21_description"],pf_fields["pf_field_name2"],pf_fields["pf_cmd_msrc_index1"],pf_fields["pf_cmd_mrcs_isrecording"],pf_fields["pf_field_foreground"],pf_fields["pf_cmd_cssc_setmask22"],pf_fields["pf_flag_cmd_cssc_setmask22_fillsource"],pf_fields["pf_flag_cmd_cssc_setmask22_keysource"],pf_fields["pf_flag_cmd_cssc_setmask22_foreground"],pf_fields["pf_flag_cmd_cssc_setmask22_premultiplied"],pf_fields["pf_flag_cmd_cssc_setmask22_clip"],pf_fields["pf_flag_cmd_cssc_setmask22_gain"],pf_fields["pf_flag_cmd_cssc_setmask22_invert"],pf_fields["pf_flag_cmd_cssc_setmask22_enabled"],pf_fields["pf_flag_cmd_cssc_setmask22_bevel"],pf_fields["pf_flag_cmd_cssc_setmask22_outerwidth"],pf_fields["pf_flag_cmd_cssc_setmask22_innerwidth"],pf_fields["pf_flag_cmd_cssc_setmask22_outersoftness"],pf_fields["pf_flag_cmd_cssc_setmask22_innersoftness"],pf_fields["pf_flag_cmd_cssc_setmask22_bevelsoftness"],pf_fields["pf_flag_cmd_cssc_setmask22_bevelpos"],pf_fields["pf_flag_cmd_cssc_setmask22_hue"],pf_fields["pf_flag_cmd_cssc_setmask22_saturation"],pf_fields["pf_flag_cmd_cssc_setmask22_luma"],pf_fields["pf_flag_cmd_cssc_setmask22_direction"],pf_fields["pf_flag_cmd_cssc_setmask22_altitude"],pf_fields["pf_field_box"],pf_fields["pf_field_inputsource0"],pf_fields["pf_field_positionx2"],pf_fields["pf_field_positiony2"],pf_fields["pf_field_cropped"],pf_fields["pf_field_croptop"],pf_fields["pf_field_cropbottom"],pf_fields["pf_field_cropleft"],pf_fields["pf_field_cropright"],pf_fields["pf_cmd_csbp_setmask23"],pf_fields["pf_flag_cmd_csbp_setmask23_enabled"],pf_fields["pf_flag_cmd_csbp_setmask23_inputsource"],pf_fields["pf_flag_cmd_csbp_setmask23_positionx"],pf_fields["pf_flag_cmd_csbp_setmask23_positiony"],pf_fields["pf_flag_cmd_csbp_setmask23_size"],pf_fields["pf_flag_cmd_csbp_setmask23_cropped"],pf_fields["pf_flag_cmd_csbp_setmask23_croptop"],pf_fields["pf_flag_cmd_csbp_setmask23_cropbottom"],pf_fields["pf_flag_cmd_csbp_setmask23_cropleft"],pf_fields["pf_flag_cmd_csbp_setmask23_cropright"],pf_fields["pf_field_audiosource"],pf_fields["pf_cmd_amip_type2"],pf_fields["pf_cmd_amip_frommediaplayer"],pf_fields["pf_cmd_amip_plugtype"],pf_fields["pf_field_mixoption"],pf_fields["pf_field_volume"],pf_fields["pf_field_balance"],pf_fields["pf_cmd_cami_setmask24"],pf_fields["pf_flag_cmd_cami_setmask24_mixoption"],pf_fields["pf_flag_cmd_cami_setmask24_volume"],pf_fields["pf_flag_cmd_cami_setmask24_balance"],pf_fields["pf_cmd_ammo_unknown9"],pf_fields["pf_cmd_camm_setmask25"],pf_fields["pf_field_monitoraudio"],pf_fields["pf_field_mute"],pf_fields["pf_field_solo"],pf_fields["pf_field_soloinput"],pf_fields["pf_field_dim"],pf_fields["pf_cmd_camm_setmask26"],pf_fields["pf_flag_cmd_camm_setmask26_monitoraudio"],pf_fields["pf_flag_cmd_camm_setmask26_volume"],pf_fields["pf_flag_cmd_camm_setmask26_mute"],pf_fields["pf_flag_cmd_camm_setmask26_solo"],pf_fields["pf_flag_cmd_camm_setmask26_soloinput"],pf_fields["pf_flag_cmd_camm_setmask26_dim"],pf_fields["pf_cmd_saln_enable"],pf_fields["pf_field_sources1"],pf_fields["pf_cmd_amlv_sourcesagain"],pf_fields["pf_cmd_amlv_masterleft"],pf_fields["pf_cmd_amlv_masterright"],pf_fields["pf_cmd_amlv_masterpeakleft"],pf_fields["pf_cmd_amlv_masterpeakright"],pf_fields["pf_cmd_amlv_monitor"],pf_fields["pf_cmd_ramp_setmask27"],pf_fields["pf_flag_cmd_ramp_setmask27_"],pf_fields["pf_flag_cmd_ramp_setmask27_inputs"],pf_fields["pf_flag_cmd_ramp_setmask27_master"],pf_fields["pf_cmd_ramp_inputsource1"],pf_fields["pf_cmd_ramp_master"],pf_fields["pf_cmd_time_hour"],pf_fields["pf_cmd_time_minute"],pf_fields["pf_cmd_time_second"],pf_fields["pf_cmd_time_frame"]
, pf_fields["pf_cmd_lokb_storeId"], pf_fields["pf_cmd_lock_storeId"], pf_fields["pf_cmd_lock_state"]
, pf_fields["pf_cmd_lkst_storeId"], pf_fields["pf_cmd_lkst_state"]
, pf_fields["pf_cmd_incm_state1"], pf_fields["pf_cmd_incm_state2"]
, pf_fields["pf_cmd_ftsd_id"], pf_fields["pf_cmd_ftsd_storeId"], pf_fields["pf_cmd_ftsd_index"], pf_fields["pf_cmd_ftsd_size"], pf_fields["pf_cmd_ftsd_op"]
, pf_fields["pf_cmd_ftcd_id"], pf_fields["pf_cmd_ftcd_chunk_count"], pf_fields["pf_cmd_ftcd_chunk_size"]
, pf_fields["pf_cmd_ftda_id"], pf_fields["pf_cmd_ftda_size"], pf_fields["pf_cmd_ftda_data"]
, pf_fields["pf_cmd_ftsu_id"], pf_fields["pf_cmd_ftsu_storeId"], pf_fields["pf_cmd_ftsu_index"]
, pf_fields["pf_cmd_ftua_id"], pf_fields["pf_cmd_ftua_index"]
, pf_fields["pf_cmd_ftdc_id"]
, pf_fields["pf_cmd_ftfd_id"], pf_fields["pf_cmd_ftfd_filename"], pf_fields["pf_cmd_ftfd_hash"]
}
----------------------------------------
-- we don't just want to display our protocol's fields, we want to access the value of some of them too!
-- There are several ways to do that. One is to just parse the buffer contents in Lua code to find
-- the values. But since ProtoFields actually do the parsing for us, and can be retrieved using Field
-- objects, it's kinda cool to do it that way. So let's create some Fields to extract the values.
-- The following creates the Field objects, but they're not 'registered' until after this script is loaded.
-- Also, these lines can't be before the 'atem_proto.fields = ...' line above, because the Field.new() here is
-- referencing fields we're creating, and they're not "created" until that line above.
-- Furthermore, you cannot put these 'Field.new()' lines inside the dissector function.
-- Before Wireshark version 1.11, you couldn't even do this concept (of using fields you just created).
local packet_length_field = Field.new("atem.packet_length")
local session_id_field = Field.new("atem.session_id")
local switcher_pkt_id_field = Field.new("atem.switcher_pkt_id")
local client_pkt_id_field = Field.new("atem.client_pkt_id")
local ack_pkt_id_field = Field.new("atem.ack_pkt_id")
local unkown1_field = Field.new("atem.unknown1")
local cmd_length_field = Field.new("atem.cmd.length")
local cmd_name_field = Field.new("atem.cmd.name")
local ef_too_short = ProtoExpert.new("atem.too_short.expert", "ATEM message too short", expert.group.MALFORMED, expert.severity.ERROR)
local ef_length_mismatch = ProtoExpert.new("atem.length_mismatch.expert", "ATEM message length mismatch with header", expert.group.MALFORMED, expert.severity.ERROR)
-- register them
atem_proto.experts = { ef_too_short, ef_length_mismatch }
--------------------------------------------------------------------------------
-- preferences handling stuff
--------------------------------------------------------------------------------
-- a "enum" table for our enum pref, as required by Pref.enum()
-- having the "index" number makes ZERO sense, and is completely illogical
-- but it's what the code has expected it to be for a long time. Ugh.
local debug_pref_enum = {
{ 1, "Disabled", debug_level.DISABLED },
{ 2, "Level 1", debug_level.LEVEL_1 },
{ 3, "Level 2", debug_level.LEVEL_2 },
}
atem_proto.prefs.debug = Pref.enum("Debug", default_settings.debug_level, "The debug printing level", debug_pref_enum)
atem_proto.prefs.port = Pref.uint("Port number", default_settings.port, "The UDP port number for BMD ATEM")
----------------------------------------
-- a function for handling prefs being changed
function atem_proto.prefs_changed()