/
Cme.Ebs.Spectrum.Sbe.v12.0.Script.Dissector.lua
1965 lines (1512 loc) · 82.6 KB
/
Cme.Ebs.Spectrum.Sbe.v12.0.Script.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
-----------------------------------------------------------------------
-- Lua Script Wireshark Dissector
--
-- Please see end of file for rules and regulations
-----------------------------------------------------------------------
-- Cme Ebs Spectrum Sbe 12.0 Protocol
local cme_ebs_spectrum_sbe_v12_0 = Proto("Cme.Ebs.Spectrum.Sbe.v12.0.Lua", "Cme Ebs Spectrum Sbe 12.0")
-- Component Tables
local show = {}
local format = {}
local cme_ebs_spectrum_sbe_v12_0_display = {}
local cme_ebs_spectrum_sbe_v12_0_dissect = {}
local cme_ebs_spectrum_sbe_v12_0_size_of = {}
local verify = {}
local translate = {}
-----------------------------------------------------------------------
-- Declare Protocol Fields
-----------------------------------------------------------------------
-- Cme Ebs Spectrum Sbe 12.0 Fields
cme_ebs_spectrum_sbe_v12_0.fields.aggressor_side = ProtoField.new("Aggressor Side", "cme.ebs.spectrum.sbe.v12.0.aggressorside", ftypes.UINT8)
cme_ebs_spectrum_sbe_v12_0.fields.binary_packet_header = ProtoField.new("Binary Packet Header", "cme.ebs.spectrum.sbe.v12.0.binarypacketheader", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.block_length = ProtoField.new("Block Length", "cme.ebs.spectrum.sbe.v12.0.blocklength", ftypes.UINT16)
cme_ebs_spectrum_sbe_v12_0.fields.financial_instrument_full_name = ProtoField.new("Financial Instrument Full Name", "cme.ebs.spectrum.sbe.v12.0.financialinstrumentfullname", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.global_day_roll = ProtoField.new("Global Day Roll", "cme.ebs.spectrum.sbe.v12.0.globaldayroll", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.group_size = ProtoField.new("Group Size", "cme.ebs.spectrum.sbe.v12.0.groupsize", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.instrument_guid = ProtoField.new("Instrument Guid", "cme.ebs.spectrum.sbe.v12.0.instrumentguid", ftypes.UINT64)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_incremental_refresh_spectrum_group = ProtoField.new("M D Incremental Refresh Spectrum Group", "cme.ebs.spectrum.sbe.v12.0.mdincrementalrefreshspectrumgroup", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_incremental_refresh_spectrum_groups = ProtoField.new("M D Incremental Refresh Spectrum Groups", "cme.ebs.spectrum.sbe.v12.0.mdincrementalrefreshspectrumgroups", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_incremental_refresh_ticker_group = ProtoField.new("M D Incremental Refresh Ticker Group", "cme.ebs.spectrum.sbe.v12.0.mdincrementalrefreshtickergroup", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_incremental_refresh_ticker_groups = ProtoField.new("M D Incremental Refresh Ticker Groups", "cme.ebs.spectrum.sbe.v12.0.mdincrementalrefreshtickergroups", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_snapshot_refresh_spectrum_group = ProtoField.new("M D Snapshot Refresh Spectrum Group", "cme.ebs.spectrum.sbe.v12.0.mdsnapshotrefreshspectrumgroup", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_snapshot_refresh_spectrum_groups = ProtoField.new("M D Snapshot Refresh Spectrum Groups", "cme.ebs.spectrum.sbe.v12.0.mdsnapshotrefreshspectrumgroups", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_snapshot_refresh_ticker_group = ProtoField.new("M D Snapshot Refresh Ticker Group", "cme.ebs.spectrum.sbe.v12.0.mdsnapshotrefreshtickergroup", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.m_d_snapshot_refresh_ticker_groups = ProtoField.new("M D Snapshot Refresh Ticker Groups", "cme.ebs.spectrum.sbe.v12.0.mdsnapshotrefreshtickergroups", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.md_entry_px = ProtoField.new("Md Entry Px", "cme.ebs.spectrum.sbe.v12.0.mdentrypx", ftypes.DOUBLE)
cme_ebs_spectrum_sbe_v12_0.fields.md_entry_size = ProtoField.new("Md Entry Size", "cme.ebs.spectrum.sbe.v12.0.mdentrysize", ftypes.UINT64)
cme_ebs_spectrum_sbe_v12_0.fields.md_entry_time = ProtoField.new("Md Entry Time", "cme.ebs.spectrum.sbe.v12.0.mdentrytime", ftypes.UINT64)
cme_ebs_spectrum_sbe_v12_0.fields.md_entry_type_spectrum_entry_type = ProtoField.new("Md Entry Type Spectrum Entry Type", "cme.ebs.spectrum.sbe.v12.0.mdentrytypespectrumentrytype", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.md_entry_type_ticker_entry_type = ProtoField.new("Md Entry Type Ticker Entry Type", "cme.ebs.spectrum.sbe.v12.0.mdentrytypetickerentrytype", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.md_incremental_refresh_spectrum = ProtoField.new("Md Incremental Refresh Spectrum", "cme.ebs.spectrum.sbe.v12.0.mdincrementalrefreshspectrum", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.md_incremental_refresh_ticker = ProtoField.new("Md Incremental Refresh Ticker", "cme.ebs.spectrum.sbe.v12.0.mdincrementalrefreshticker", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.md_snapshot_refresh_spectrum = ProtoField.new("Md Snapshot Refresh Spectrum", "cme.ebs.spectrum.sbe.v12.0.mdsnapshotrefreshspectrum", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.md_snapshot_refresh_ticker = ProtoField.new("Md Snapshot Refresh Ticker", "cme.ebs.spectrum.sbe.v12.0.mdsnapshotrefreshticker", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.message = ProtoField.new("Message", "cme.ebs.spectrum.sbe.v12.0.message", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.message_header = ProtoField.new("Message Header", "cme.ebs.spectrum.sbe.v12.0.messageheader", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.message_sequence_number = ProtoField.new("Message Sequence Number", "cme.ebs.spectrum.sbe.v12.0.messagesequencenumber", ftypes.UINT32)
cme_ebs_spectrum_sbe_v12_0.fields.message_size = ProtoField.new("Message Size", "cme.ebs.spectrum.sbe.v12.0.messagesize", ftypes.UINT16)
cme_ebs_spectrum_sbe_v12_0.fields.num_in_group_uint_8 = ProtoField.new("Num In Group uint 8", "cme.ebs.spectrum.sbe.v12.0.numingroupuint8", ftypes.UINT8)
cme_ebs_spectrum_sbe_v12_0.fields.open_close_settl_flag = ProtoField.new("Open Close Settl Flag", "cme.ebs.spectrum.sbe.v12.0.openclosesettlflag", ftypes.UINT8)
cme_ebs_spectrum_sbe_v12_0.fields.packet = ProtoField.new("Packet", "cme.ebs.spectrum.sbe.v12.0.packet", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.payload = ProtoField.new("Payload", "cme.ebs.spectrum.sbe.v12.0.payload", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.schema_id = ProtoField.new("Schema Id", "cme.ebs.spectrum.sbe.v12.0.schemaid", ftypes.UINT16)
cme_ebs_spectrum_sbe_v12_0.fields.security_id = ProtoField.new("Security Id", "cme.ebs.spectrum.sbe.v12.0.securityid", ftypes.INT32)
cme_ebs_spectrum_sbe_v12_0.fields.security_trading_event = ProtoField.new("Security Trading Event", "cme.ebs.spectrum.sbe.v12.0.securitytradingevent", ftypes.UINT8)
cme_ebs_spectrum_sbe_v12_0.fields.sending_time = ProtoField.new("Sending Time", "cme.ebs.spectrum.sbe.v12.0.sendingtime", ftypes.UINT64)
cme_ebs_spectrum_sbe_v12_0.fields.symbol = ProtoField.new("Symbol", "cme.ebs.spectrum.sbe.v12.0.symbol", ftypes.STRING)
cme_ebs_spectrum_sbe_v12_0.fields.template_id = ProtoField.new("Template Id", "cme.ebs.spectrum.sbe.v12.0.templateid", ftypes.UINT16)
cme_ebs_spectrum_sbe_v12_0.fields.trading_session_id = ProtoField.new("Trading Session Id", "cme.ebs.spectrum.sbe.v12.0.tradingsessionid", ftypes.UINT8)
cme_ebs_spectrum_sbe_v12_0.fields.transact_time = ProtoField.new("Transact Time", "cme.ebs.spectrum.sbe.v12.0.transacttime", ftypes.UINT64)
cme_ebs_spectrum_sbe_v12_0.fields.version = ProtoField.new("Version", "cme.ebs.spectrum.sbe.v12.0.version", ftypes.UINT16)
-----------------------------------------------------------------------
-- Declare Dissection Options
-----------------------------------------------------------------------
-- Cme Ebs Spectrum Sbe 12.0 Element Dissection Options
show.binary_packet_header = true
show.global_day_roll = true
show.group_size = true
show.m_d_incremental_refresh_spectrum_group = true
show.m_d_incremental_refresh_spectrum_groups = true
show.m_d_incremental_refresh_ticker_group = true
show.m_d_incremental_refresh_ticker_groups = true
show.m_d_snapshot_refresh_spectrum_group = true
show.m_d_snapshot_refresh_spectrum_groups = true
show.m_d_snapshot_refresh_ticker_group = true
show.m_d_snapshot_refresh_ticker_groups = true
show.md_incremental_refresh_spectrum = true
show.md_incremental_refresh_ticker = true
show.md_snapshot_refresh_spectrum = true
show.md_snapshot_refresh_ticker = true
show.message = true
show.message_header = true
show.packet = true
show.payload = false
-- Register Cme Ebs Spectrum Sbe 12.0 Show Options
cme_ebs_spectrum_sbe_v12_0.prefs.show_binary_packet_header = Pref.bool("Show Binary Packet Header", show.binary_packet_header, "Parse and add Binary Packet Header to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_global_day_roll = Pref.bool("Show Global Day Roll", show.global_day_roll, "Parse and add Global Day Roll to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_group_size = Pref.bool("Show Group Size", show.group_size, "Parse and add Group Size to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_spectrum_group = Pref.bool("Show M D Incremental Refresh Spectrum Group", show.m_d_incremental_refresh_spectrum_group, "Parse and add M D Incremental Refresh Spectrum Group to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_spectrum_groups = Pref.bool("Show M D Incremental Refresh Spectrum Groups", show.m_d_incremental_refresh_spectrum_groups, "Parse and add M D Incremental Refresh Spectrum Groups to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_ticker_group = Pref.bool("Show M D Incremental Refresh Ticker Group", show.m_d_incremental_refresh_ticker_group, "Parse and add M D Incremental Refresh Ticker Group to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_ticker_groups = Pref.bool("Show M D Incremental Refresh Ticker Groups", show.m_d_incremental_refresh_ticker_groups, "Parse and add M D Incremental Refresh Ticker Groups to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_spectrum_group = Pref.bool("Show M D Snapshot Refresh Spectrum Group", show.m_d_snapshot_refresh_spectrum_group, "Parse and add M D Snapshot Refresh Spectrum Group to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_spectrum_groups = Pref.bool("Show M D Snapshot Refresh Spectrum Groups", show.m_d_snapshot_refresh_spectrum_groups, "Parse and add M D Snapshot Refresh Spectrum Groups to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_ticker_group = Pref.bool("Show M D Snapshot Refresh Ticker Group", show.m_d_snapshot_refresh_ticker_group, "Parse and add M D Snapshot Refresh Ticker Group to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_ticker_groups = Pref.bool("Show M D Snapshot Refresh Ticker Groups", show.m_d_snapshot_refresh_ticker_groups, "Parse and add M D Snapshot Refresh Ticker Groups to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_md_incremental_refresh_spectrum = Pref.bool("Show Md Incremental Refresh Spectrum", show.md_incremental_refresh_spectrum, "Parse and add Md Incremental Refresh Spectrum to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_md_incremental_refresh_ticker = Pref.bool("Show Md Incremental Refresh Ticker", show.md_incremental_refresh_ticker, "Parse and add Md Incremental Refresh Ticker to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_md_snapshot_refresh_spectrum = Pref.bool("Show Md Snapshot Refresh Spectrum", show.md_snapshot_refresh_spectrum, "Parse and add Md Snapshot Refresh Spectrum to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_md_snapshot_refresh_ticker = Pref.bool("Show Md Snapshot Refresh Ticker", show.md_snapshot_refresh_ticker, "Parse and add Md Snapshot Refresh Ticker to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_message = Pref.bool("Show Message", show.message, "Parse and add Message to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_message_header = Pref.bool("Show Message Header", show.message_header, "Parse and add Message Header to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_packet = Pref.bool("Show Packet", show.packet, "Parse and add Packet to protocol tree")
cme_ebs_spectrum_sbe_v12_0.prefs.show_payload = Pref.bool("Show Payload", show.payload, "Parse and add Payload to protocol tree")
-- Handle changed preferences
function cme_ebs_spectrum_sbe_v12_0.prefs_changed()
local changed = false
-- Check if show options have changed
if show.binary_packet_header ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_binary_packet_header then
show.binary_packet_header = cme_ebs_spectrum_sbe_v12_0.prefs.show_binary_packet_header
changed = true
end
if show.global_day_roll ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_global_day_roll then
show.global_day_roll = cme_ebs_spectrum_sbe_v12_0.prefs.show_global_day_roll
changed = true
end
if show.group_size ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_group_size then
show.group_size = cme_ebs_spectrum_sbe_v12_0.prefs.show_group_size
changed = true
end
if show.m_d_incremental_refresh_spectrum_group ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_spectrum_group then
show.m_d_incremental_refresh_spectrum_group = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_spectrum_group
changed = true
end
if show.m_d_incremental_refresh_spectrum_groups ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_spectrum_groups then
show.m_d_incremental_refresh_spectrum_groups = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_spectrum_groups
changed = true
end
if show.m_d_incremental_refresh_ticker_group ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_ticker_group then
show.m_d_incremental_refresh_ticker_group = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_ticker_group
changed = true
end
if show.m_d_incremental_refresh_ticker_groups ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_ticker_groups then
show.m_d_incremental_refresh_ticker_groups = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_incremental_refresh_ticker_groups
changed = true
end
if show.m_d_snapshot_refresh_spectrum_group ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_spectrum_group then
show.m_d_snapshot_refresh_spectrum_group = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_spectrum_group
changed = true
end
if show.m_d_snapshot_refresh_spectrum_groups ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_spectrum_groups then
show.m_d_snapshot_refresh_spectrum_groups = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_spectrum_groups
changed = true
end
if show.m_d_snapshot_refresh_ticker_group ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_ticker_group then
show.m_d_snapshot_refresh_ticker_group = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_ticker_group
changed = true
end
if show.m_d_snapshot_refresh_ticker_groups ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_ticker_groups then
show.m_d_snapshot_refresh_ticker_groups = cme_ebs_spectrum_sbe_v12_0.prefs.show_m_d_snapshot_refresh_ticker_groups
changed = true
end
if show.md_incremental_refresh_spectrum ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_md_incremental_refresh_spectrum then
show.md_incremental_refresh_spectrum = cme_ebs_spectrum_sbe_v12_0.prefs.show_md_incremental_refresh_spectrum
changed = true
end
if show.md_incremental_refresh_ticker ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_md_incremental_refresh_ticker then
show.md_incremental_refresh_ticker = cme_ebs_spectrum_sbe_v12_0.prefs.show_md_incremental_refresh_ticker
changed = true
end
if show.md_snapshot_refresh_spectrum ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_md_snapshot_refresh_spectrum then
show.md_snapshot_refresh_spectrum = cme_ebs_spectrum_sbe_v12_0.prefs.show_md_snapshot_refresh_spectrum
changed = true
end
if show.md_snapshot_refresh_ticker ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_md_snapshot_refresh_ticker then
show.md_snapshot_refresh_ticker = cme_ebs_spectrum_sbe_v12_0.prefs.show_md_snapshot_refresh_ticker
changed = true
end
if show.message ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_message then
show.message = cme_ebs_spectrum_sbe_v12_0.prefs.show_message
changed = true
end
if show.message_header ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_message_header then
show.message_header = cme_ebs_spectrum_sbe_v12_0.prefs.show_message_header
changed = true
end
if show.packet ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_packet then
show.packet = cme_ebs_spectrum_sbe_v12_0.prefs.show_packet
changed = true
end
if show.payload ~= cme_ebs_spectrum_sbe_v12_0.prefs.show_payload then
show.payload = cme_ebs_spectrum_sbe_v12_0.prefs.show_payload
changed = true
end
-- Reload on changed preference
if changed then
reload()
end
end
-----------------------------------------------------------------------
-- Dissect Cme Ebs Spectrum Sbe 12.0
-----------------------------------------------------------------------
-- Size: Security Trading Event
cme_ebs_spectrum_sbe_v12_0_size_of.security_trading_event = 1
-- Display: Security Trading Event
cme_ebs_spectrum_sbe_v12_0_display.security_trading_event = function(value)
if value == 4 then
return "Security Trading Event: Global Day Roll (4)"
end
return "Security Trading Event: Unknown("..value..")"
end
-- Dissect: Security Trading Event
cme_ebs_spectrum_sbe_v12_0_dissect.security_trading_event = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.security_trading_event
local range = buffer(offset, length)
local value = range:le_uint()
local display = cme_ebs_spectrum_sbe_v12_0_display.security_trading_event(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.security_trading_event, range, value, display)
return offset + length, value
end
-- Size: Transact Time
cme_ebs_spectrum_sbe_v12_0_size_of.transact_time = 8
-- Display: Transact Time
cme_ebs_spectrum_sbe_v12_0_display.transact_time = function(value)
return "Transact Time: "..value
end
-- Dissect: Transact Time
cme_ebs_spectrum_sbe_v12_0_dissect.transact_time = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.transact_time
local range = buffer(offset, length)
local value = range:le_uint64()
local display = cme_ebs_spectrum_sbe_v12_0_display.transact_time(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.transact_time, range, value, display)
return offset + length, value
end
-- Calculate size of: Global Day Roll
cme_ebs_spectrum_sbe_v12_0_size_of.global_day_roll = function(buffer, offset)
local index = 0
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.transact_time
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.security_trading_event
return index
end
-- Display: Global Day Roll
cme_ebs_spectrum_sbe_v12_0_display.global_day_roll = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Global Day Roll
cme_ebs_spectrum_sbe_v12_0_dissect.global_day_roll_fields = function(buffer, offset, packet, parent)
local index = offset
-- Transact Time: 8 Byte Unsigned Fixed Width Integer
index, transact_time = cme_ebs_spectrum_sbe_v12_0_dissect.transact_time(buffer, index, packet, parent)
-- Security Trading Event: 1 Byte Unsigned Fixed Width Integer Enum with 1 values
index, security_trading_event = cme_ebs_spectrum_sbe_v12_0_dissect.security_trading_event(buffer, index, packet, parent)
return index
end
-- Dissect: Global Day Roll
cme_ebs_spectrum_sbe_v12_0_dissect.global_day_roll = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.global_day_roll then
local length = cme_ebs_spectrum_sbe_v12_0_size_of.global_day_roll(buffer, offset)
local range = buffer(offset, length)
local display = cme_ebs_spectrum_sbe_v12_0_display.global_day_roll(buffer, packet, parent)
parent = parent:add(cme_ebs_spectrum_sbe_v12_0.fields.global_day_roll, range, display)
end
return cme_ebs_spectrum_sbe_v12_0_dissect.global_day_roll_fields(buffer, offset, packet, parent)
end
-- Size: Aggressor Side
cme_ebs_spectrum_sbe_v12_0_size_of.aggressor_side = 1
-- Display: Aggressor Side
cme_ebs_spectrum_sbe_v12_0_display.aggressor_side = function(value)
if value == 255 then
return "Aggressor Side: No Value"
end
if value == 1 then
return "Aggressor Side: Buy (1)"
end
if value == 2 then
return "Aggressor Side: Sell (2)"
end
return "Aggressor Side: Unknown("..value..")"
end
-- Dissect: Aggressor Side
cme_ebs_spectrum_sbe_v12_0_dissect.aggressor_side = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.aggressor_side
local range = buffer(offset, length)
local value = range:le_uint()
local display = cme_ebs_spectrum_sbe_v12_0_display.aggressor_side(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.aggressor_side, range, value, display)
return offset + length, value
end
-- Size: Trading Session Id
cme_ebs_spectrum_sbe_v12_0_size_of.trading_session_id = 1
-- Display: Trading Session Id
cme_ebs_spectrum_sbe_v12_0_display.trading_session_id = function(value)
if value == 255 then
return "Trading Session Id: No Value"
end
if value == 0 then
return "Trading Session Id: Gl (0)"
end
if value == 1 then
return "Trading Session Id: Sy (1)"
end
if value == 2 then
return "Trading Session Id: Tk (2)"
end
if value == 3 then
return "Trading Session Id: Hk (3)"
end
if value == 4 then
return "Trading Session Id: Ln (4)"
end
if value == 5 then
return "Trading Session Id: Ny (5)"
end
return "Trading Session Id: Unknown("..value..")"
end
-- Dissect: Trading Session Id
cme_ebs_spectrum_sbe_v12_0_dissect.trading_session_id = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.trading_session_id
local range = buffer(offset, length)
local value = range:le_uint()
local display = cme_ebs_spectrum_sbe_v12_0_display.trading_session_id(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.trading_session_id, range, value, display)
return offset + length, value
end
-- Size: Open Close Settl Flag
cme_ebs_spectrum_sbe_v12_0_size_of.open_close_settl_flag = 1
-- Display: Open Close Settl Flag
cme_ebs_spectrum_sbe_v12_0_display.open_close_settl_flag = function(value)
if value == 0 then
return "Open Close Settl Flag: Current Day (0)"
end
if value == 4 then
return "Open Close Settl Flag: Previous Day (4)"
end
return "Open Close Settl Flag: Unknown("..value..")"
end
-- Dissect: Open Close Settl Flag
cme_ebs_spectrum_sbe_v12_0_dissect.open_close_settl_flag = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.open_close_settl_flag
local range = buffer(offset, length)
local value = range:le_uint()
local display = cme_ebs_spectrum_sbe_v12_0_display.open_close_settl_flag(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.open_close_settl_flag, range, value, display)
return offset + length, value
end
-- Size: Md Entry Time
cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_time = 8
-- Display: Md Entry Time
cme_ebs_spectrum_sbe_v12_0_display.md_entry_time = function(value)
return "Md Entry Time: "..value
end
-- Dissect: Md Entry Time
cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_time = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_time
local range = buffer(offset, length)
local value = range:le_uint64()
local display = cme_ebs_spectrum_sbe_v12_0_display.md_entry_time(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.md_entry_time, range, value, display)
return offset + length, value
end
-- Size: Md Entry Size
cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_size = 8
-- Display: Md Entry Size
cme_ebs_spectrum_sbe_v12_0_display.md_entry_size = function(value)
-- Check if field has value
if value == UInt64(0xFFFFFFFF, 0xFFFFFFFF) then
return "Md Entry Size: No Value"
end
return "Md Entry Size: "..value
end
-- Dissect: Md Entry Size
cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_size = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_size
local range = buffer(offset, length)
local value = range:le_uint64()
local display = cme_ebs_spectrum_sbe_v12_0_display.md_entry_size(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.md_entry_size, range, value, display)
return offset + length, value
end
-- Size: Md Entry Px
cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_px = 8
-- Display: Md Entry Px
cme_ebs_spectrum_sbe_v12_0_display.md_entry_px = function(raw, value)
-- Check null sentinel value
if raw == Int64(0xFFFFFFFF, 0x7FFFFFFF) then
return "Md Entry Px: No Value"
end
return "Md Entry Px: "..value
end
-- Translate: Md Entry Px
translate.md_entry_px = function(raw)
-- Check null sentinel value
if raw == Int64(0xFFFFFFFF, 0x7FFFFFFF) then
return 0/0
end
return raw:tonumber()/1000000000
end
-- Dissect: Md Entry Px
cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_px = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_px
local range = buffer(offset, length)
local raw = range:le_int64()
local value = translate.md_entry_px(raw)
local display = cme_ebs_spectrum_sbe_v12_0_display.md_entry_px(raw, value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.md_entry_px, range, value, display)
return offset + length, value
end
-- Size: Md Entry Type Ticker Entry Type
cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_type_ticker_entry_type = 1
-- Display: Md Entry Type Ticker Entry Type
cme_ebs_spectrum_sbe_v12_0_display.md_entry_type_ticker_entry_type = function(value)
-- Check if field has value
if value == nil or value == 0 then
return "Md Entry Type Ticker Entry Type: No Value"
end
if value == "k" then
return "Md Entry Type Ticker Entry Type: Touch High (k)"
end
if value == "l" then
return "Md Entry Type Ticker Entry Type: Touch Low (l)"
end
if value == "m" then
return "Md Entry Type Ticker Entry Type: Open Best Bid (m)"
end
if value == "n" then
return "Md Entry Type Ticker Entry Type: Open Best Offer (n)"
end
if value == "o" then
return "Md Entry Type Ticker Entry Type: Close Best Bid (o)"
end
if value == "p" then
return "Md Entry Type Ticker Entry Type: Close Best Offer (p)"
end
if value == "q" then
return "Md Entry Type Ticker Entry Type: Market High (q)"
end
if value == "r" then
return "Md Entry Type Ticker Entry Type: Market Low (r)"
end
if value == "w" then
return "Md Entry Type Ticker Entry Type: Market Best Offer (w)"
end
if value == "x" then
return "Md Entry Type Ticker Entry Type: Market Best Bid (x)"
end
if value == "y" then
return "Md Entry Type Ticker Entry Type: Paid (y)"
end
if value == "z" then
return "Md Entry Type Ticker Entry Type: Given (z)"
end
return "Md Entry Type Ticker Entry Type: Unknown("..value..")"
end
-- Dissect: Md Entry Type Ticker Entry Type
cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_type_ticker_entry_type = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_type_ticker_entry_type
local range = buffer(offset, length)
-- parse as byte
local value = range:uint()
-- check if value is non zero
if value ~= 0 then
value = range:string()
end
local display = cme_ebs_spectrum_sbe_v12_0_display.md_entry_type_ticker_entry_type(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.md_entry_type_ticker_entry_type, range, value, display)
return offset + length, value
end
-- Calculate size of: M D Snapshot Refresh Ticker Group
cme_ebs_spectrum_sbe_v12_0_size_of.m_d_snapshot_refresh_ticker_group = function(buffer, offset)
local index = 0
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_type_ticker_entry_type
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_px
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_size
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_time
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.open_close_settl_flag
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.trading_session_id
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.aggressor_side
return index
end
-- Display: M D Snapshot Refresh Ticker Group
cme_ebs_spectrum_sbe_v12_0_display.m_d_snapshot_refresh_ticker_group = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: M D Snapshot Refresh Ticker Group
cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_group_fields = function(buffer, offset, packet, parent)
local index = offset
-- Md Entry Type Ticker Entry Type: 1 Byte Ascii String Enum with 12 values
index, md_entry_type_ticker_entry_type = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_type_ticker_entry_type(buffer, index, packet, parent)
-- Md Entry Px: 8 Byte Signed Fixed Width Integer Nullable
index, md_entry_px = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_px(buffer, index, packet, parent)
-- Md Entry Size: 8 Byte Unsigned Fixed Width Integer Nullable
index, md_entry_size = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_size(buffer, index, packet, parent)
-- Md Entry Time: 8 Byte Unsigned Fixed Width Integer
index, md_entry_time = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_time(buffer, index, packet, parent)
-- Open Close Settl Flag: 1 Byte Unsigned Fixed Width Integer Enum with 2 values
index, open_close_settl_flag = cme_ebs_spectrum_sbe_v12_0_dissect.open_close_settl_flag(buffer, index, packet, parent)
-- Trading Session Id: 1 Byte Unsigned Fixed Width Integer Enum with 7 values
index, trading_session_id = cme_ebs_spectrum_sbe_v12_0_dissect.trading_session_id(buffer, index, packet, parent)
-- Aggressor Side: 1 Byte Unsigned Fixed Width Integer Enum with 3 values
index, aggressor_side = cme_ebs_spectrum_sbe_v12_0_dissect.aggressor_side(buffer, index, packet, parent)
return index
end
-- Dissect: M D Snapshot Refresh Ticker Group
cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_group = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.m_d_snapshot_refresh_ticker_group then
local length = cme_ebs_spectrum_sbe_v12_0_size_of.m_d_snapshot_refresh_ticker_group(buffer, offset)
local range = buffer(offset, length)
local display = cme_ebs_spectrum_sbe_v12_0_display.m_d_snapshot_refresh_ticker_group(buffer, packet, parent)
parent = parent:add(cme_ebs_spectrum_sbe_v12_0.fields.m_d_snapshot_refresh_ticker_group, range, display)
end
return cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_group_fields(buffer, offset, packet, parent)
end
-- Size: Num In Group uint 8
cme_ebs_spectrum_sbe_v12_0_size_of.num_in_group_uint_8 = 1
-- Display: Num In Group uint 8
cme_ebs_spectrum_sbe_v12_0_display.num_in_group_uint_8 = function(value)
return "Num In Group uint 8: "..value
end
-- Dissect: Num In Group uint 8
cme_ebs_spectrum_sbe_v12_0_dissect.num_in_group_uint_8 = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.num_in_group_uint_8
local range = buffer(offset, length)
local value = range:le_uint()
local display = cme_ebs_spectrum_sbe_v12_0_display.num_in_group_uint_8(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.num_in_group_uint_8, range, value, display)
return offset + length, value
end
-- Size: Block Length
cme_ebs_spectrum_sbe_v12_0_size_of.block_length = 2
-- Display: Block Length
cme_ebs_spectrum_sbe_v12_0_display.block_length = function(value)
return "Block Length: "..value
end
-- Dissect: Block Length
cme_ebs_spectrum_sbe_v12_0_dissect.block_length = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.block_length
local range = buffer(offset, length)
local value = range:le_uint()
local display = cme_ebs_spectrum_sbe_v12_0_display.block_length(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.block_length, range, value, display)
return offset + length, value
end
-- Calculate size of: Group Size
cme_ebs_spectrum_sbe_v12_0_size_of.group_size = function(buffer, offset)
local index = 0
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.block_length
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.num_in_group_uint_8
return index
end
-- Display: Group Size
cme_ebs_spectrum_sbe_v12_0_display.group_size = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Group Size
cme_ebs_spectrum_sbe_v12_0_dissect.group_size_fields = function(buffer, offset, packet, parent)
local index = offset
-- Block Length: 2 Byte Unsigned Fixed Width Integer
index, block_length = cme_ebs_spectrum_sbe_v12_0_dissect.block_length(buffer, index, packet, parent)
-- Num In Group uint 8: 1 Byte Unsigned Fixed Width Integer
index, num_in_group_uint_8 = cme_ebs_spectrum_sbe_v12_0_dissect.num_in_group_uint_8(buffer, index, packet, parent)
return index
end
-- Dissect: Group Size
cme_ebs_spectrum_sbe_v12_0_dissect.group_size = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.group_size then
local length = cme_ebs_spectrum_sbe_v12_0_size_of.group_size(buffer, offset)
local range = buffer(offset, length)
local display = cme_ebs_spectrum_sbe_v12_0_display.group_size(buffer, packet, parent)
parent = parent:add(cme_ebs_spectrum_sbe_v12_0.fields.group_size, range, display)
end
return cme_ebs_spectrum_sbe_v12_0_dissect.group_size_fields(buffer, offset, packet, parent)
end
-- Calculate size of: M D Snapshot Refresh Ticker Groups
cme_ebs_spectrum_sbe_v12_0_size_of.m_d_snapshot_refresh_ticker_groups = function(buffer, offset)
local index = 0
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.group_size(buffer, offset + index)
-- Calculate field size from count
local m_d_snapshot_refresh_ticker_group_count = buffer(offset + index - 1, 1):le_uint()
index = index + m_d_snapshot_refresh_ticker_group_count * 28
return index
end
-- Display: M D Snapshot Refresh Ticker Groups
cme_ebs_spectrum_sbe_v12_0_display.m_d_snapshot_refresh_ticker_groups = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: M D Snapshot Refresh Ticker Groups
cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_groups_fields = function(buffer, offset, packet, parent)
local index = offset
-- Group Size: Struct of 2 fields
index, group_size = cme_ebs_spectrum_sbe_v12_0_dissect.group_size(buffer, index, packet, parent)
-- Dependency element: Num In Group uint 8
local num_in_group_uint_8 = buffer(index - 1, 1):le_uint()
-- M D Snapshot Refresh Ticker Group: Struct of 7 fields
for i = 1, num_in_group_uint_8 do
index = cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_group(buffer, index, packet, parent)
end
return index
end
-- Dissect: M D Snapshot Refresh Ticker Groups
cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_groups = function(buffer, offset, packet, parent)
-- Optionally add dynamic struct element to protocol tree
if show.m_d_snapshot_refresh_ticker_groups then
local length = cme_ebs_spectrum_sbe_v12_0_size_of.m_d_snapshot_refresh_ticker_groups(buffer, offset)
local range = buffer(offset, length)
local display = cme_ebs_spectrum_sbe_v12_0_display.m_d_snapshot_refresh_ticker_groups(buffer, packet, parent)
parent = parent:add(cme_ebs_spectrum_sbe_v12_0.fields.m_d_snapshot_refresh_ticker_groups, range, display)
end
return cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_groups_fields(buffer, offset, packet, parent)
end
-- Size: Security Id
cme_ebs_spectrum_sbe_v12_0_size_of.security_id = 4
-- Display: Security Id
cme_ebs_spectrum_sbe_v12_0_display.security_id = function(value)
return "Security Id: "..value
end
-- Dissect: Security Id
cme_ebs_spectrum_sbe_v12_0_dissect.security_id = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.security_id
local range = buffer(offset, length)
local value = range:le_int()
local display = cme_ebs_spectrum_sbe_v12_0_display.security_id(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.security_id, range, value, display)
return offset + length, value
end
-- Size: Instrument Guid
cme_ebs_spectrum_sbe_v12_0_size_of.instrument_guid = 8
-- Display: Instrument Guid
cme_ebs_spectrum_sbe_v12_0_display.instrument_guid = function(value)
return "Instrument Guid: "..value
end
-- Dissect: Instrument Guid
cme_ebs_spectrum_sbe_v12_0_dissect.instrument_guid = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.instrument_guid
local range = buffer(offset, length)
local value = range:le_uint64()
local display = cme_ebs_spectrum_sbe_v12_0_display.instrument_guid(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.instrument_guid, range, value, display)
return offset + length, value
end
-- Size: Symbol
cme_ebs_spectrum_sbe_v12_0_size_of.symbol = 20
-- Display: Symbol
cme_ebs_spectrum_sbe_v12_0_display.symbol = function(value)
-- Check if field has value
if value == nil or value == '' then
return "Symbol: No Value"
end
return "Symbol: "..value
end
-- Dissect: Symbol
cme_ebs_spectrum_sbe_v12_0_dissect.symbol = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.symbol
local range = buffer(offset, length)
-- parse last octet
local last = buffer(offset + length - 1, 1):uint()
-- read full string or up to first zero
local value = ''
if last == 0 then
value = range:stringz()
else
value = range:string()
end
local display = cme_ebs_spectrum_sbe_v12_0_display.symbol(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.symbol, range, value, display)
return offset + length, value
end
-- Size: Financial Instrument Full Name
cme_ebs_spectrum_sbe_v12_0_size_of.financial_instrument_full_name = 35
-- Display: Financial Instrument Full Name
cme_ebs_spectrum_sbe_v12_0_display.financial_instrument_full_name = function(value)
-- Check if field has value
if value == nil or value == '' then
return "Financial Instrument Full Name: No Value"
end
return "Financial Instrument Full Name: "..value
end
-- Dissect: Financial Instrument Full Name
cme_ebs_spectrum_sbe_v12_0_dissect.financial_instrument_full_name = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.financial_instrument_full_name
local range = buffer(offset, length)
-- parse last octet
local last = buffer(offset + length - 1, 1):uint()
-- read full string or up to first zero
local value = ''
if last == 0 then
value = range:stringz()
else
value = range:string()
end
local display = cme_ebs_spectrum_sbe_v12_0_display.financial_instrument_full_name(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.financial_instrument_full_name, range, value, display)
return offset + length, value
end
-- Calculate size of: Md Snapshot Refresh Ticker
cme_ebs_spectrum_sbe_v12_0_size_of.md_snapshot_refresh_ticker = function(buffer, offset)
local index = 0
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.transact_time
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.match_event_indicator
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.financial_instrument_full_name
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.symbol
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.instrument_guid
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.security_id
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.m_d_snapshot_refresh_ticker_groups(buffer, offset + index)
return index
end
-- Display: Md Snapshot Refresh Ticker
cme_ebs_spectrum_sbe_v12_0_display.md_snapshot_refresh_ticker = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Md Snapshot Refresh Ticker
cme_ebs_spectrum_sbe_v12_0_dissect.md_snapshot_refresh_ticker_fields = function(buffer, offset, packet, parent)
local index = offset
-- Transact Time: 8 Byte Unsigned Fixed Width Integer
index, transact_time = cme_ebs_spectrum_sbe_v12_0_dissect.transact_time(buffer, index, packet, parent)
-- Match Event Indicator
index, match_event_indicator = cme_ebs_spectrum_sbe_v12_0_dissect.match_event_indicator(buffer, index, packet, parent)
-- Financial Instrument Full Name: 35 Byte Ascii String
index, financial_instrument_full_name = cme_ebs_spectrum_sbe_v12_0_dissect.financial_instrument_full_name(buffer, index, packet, parent)
-- Symbol: 20 Byte Ascii String
index, symbol = cme_ebs_spectrum_sbe_v12_0_dissect.symbol(buffer, index, packet, parent)
-- Instrument Guid: 8 Byte Unsigned Fixed Width Integer
index, instrument_guid = cme_ebs_spectrum_sbe_v12_0_dissect.instrument_guid(buffer, index, packet, parent)
-- Security Id: 4 Byte Signed Fixed Width Integer
index, security_id = cme_ebs_spectrum_sbe_v12_0_dissect.security_id(buffer, index, packet, parent)
-- M D Snapshot Refresh Ticker Groups: Struct of 2 fields
index, m_d_snapshot_refresh_ticker_groups = cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_ticker_groups(buffer, index, packet, parent)
return index
end
-- Dissect: Md Snapshot Refresh Ticker
cme_ebs_spectrum_sbe_v12_0_dissect.md_snapshot_refresh_ticker = function(buffer, offset, packet, parent)
-- Optionally add dynamic struct element to protocol tree
if show.md_snapshot_refresh_ticker then
local length = cme_ebs_spectrum_sbe_v12_0_size_of.md_snapshot_refresh_ticker(buffer, offset)
local range = buffer(offset, length)
local display = cme_ebs_spectrum_sbe_v12_0_display.md_snapshot_refresh_ticker(buffer, packet, parent)
parent = parent:add(cme_ebs_spectrum_sbe_v12_0.fields.md_snapshot_refresh_ticker, range, display)
end
return cme_ebs_spectrum_sbe_v12_0_dissect.md_snapshot_refresh_ticker_fields(buffer, offset, packet, parent)
end
-- Size: Md Entry Type Spectrum Entry Type
cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_type_spectrum_entry_type = 1
-- Display: Md Entry Type Spectrum Entry Type
cme_ebs_spectrum_sbe_v12_0_display.md_entry_type_spectrum_entry_type = function(value)
-- Check if field has value
if value == nil or value == 0 then
return "Md Entry Type Spectrum Entry Type: No Value"
end
if value == "9" then
return "Md Entry Type Spectrum Entry Type: Vwap (9)"
end
if value == "t" then
return "Md Entry Type Spectrum Entry Type: Twap (t)"
end
return "Md Entry Type Spectrum Entry Type: Unknown("..value..")"
end
-- Dissect: Md Entry Type Spectrum Entry Type
cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_type_spectrum_entry_type = function(buffer, offset, packet, parent)
local length = cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_type_spectrum_entry_type
local range = buffer(offset, length)
-- parse as byte
local value = range:uint()
-- check if value is non zero
if value ~= 0 then
value = range:string()
end
local display = cme_ebs_spectrum_sbe_v12_0_display.md_entry_type_spectrum_entry_type(value, buffer, offset, packet, parent)
parent:add(cme_ebs_spectrum_sbe_v12_0.fields.md_entry_type_spectrum_entry_type, range, value, display)
return offset + length, value
end
-- Calculate size of: M D Snapshot Refresh Spectrum Group
cme_ebs_spectrum_sbe_v12_0_size_of.m_d_snapshot_refresh_spectrum_group = function(buffer, offset)
local index = 0
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_type_spectrum_entry_type
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_px
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_size
index = index + cme_ebs_spectrum_sbe_v12_0_size_of.md_entry_time
return index
end
-- Display: M D Snapshot Refresh Spectrum Group
cme_ebs_spectrum_sbe_v12_0_display.m_d_snapshot_refresh_spectrum_group = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: M D Snapshot Refresh Spectrum Group
cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_spectrum_group_fields = function(buffer, offset, packet, parent)
local index = offset
-- Md Entry Type Spectrum Entry Type: 1 Byte Ascii String Enum with 2 values
index, md_entry_type_spectrum_entry_type = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_type_spectrum_entry_type(buffer, index, packet, parent)
-- Md Entry Px: 8 Byte Signed Fixed Width Integer Nullable
index, md_entry_px = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_px(buffer, index, packet, parent)
-- Md Entry Size: 8 Byte Unsigned Fixed Width Integer Nullable
index, md_entry_size = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_size(buffer, index, packet, parent)
-- Md Entry Time: 8 Byte Unsigned Fixed Width Integer
index, md_entry_time = cme_ebs_spectrum_sbe_v12_0_dissect.md_entry_time(buffer, index, packet, parent)
return index
end
-- Dissect: M D Snapshot Refresh Spectrum Group
cme_ebs_spectrum_sbe_v12_0_dissect.m_d_snapshot_refresh_spectrum_group = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.m_d_snapshot_refresh_spectrum_group then