/
Miax.Pearl.Equities.TopOfMarket.Mach.v1.1.a.Script.Dissector.lua
1695 lines (1323 loc) · 76.2 KB
/
Miax.Pearl.Equities.TopOfMarket.Mach.v1.1.a.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
-----------------------------------------------------------------------
-- Miax Pearl Equities TopOfMarket Mach 1.1.a Protocol
local miax_pearl_equities_topofmarket_mach_v1_1_a = Proto("Miax.Pearl.Equities.TopOfMarket.Mach.v1.1.a.Lua", "Miax Pearl Equities TopOfMarket Mach 1.1.a")
-- Component Tables
local show = {}
local format = {}
local miax_pearl_equities_topofmarket_mach_v1_1_a_display = {}
local miax_pearl_equities_topofmarket_mach_v1_1_a_dissect = {}
local miax_pearl_equities_topofmarket_mach_v1_1_a_size_of = {}
local verify = {}
-----------------------------------------------------------------------
-- Declare Protocol Fields
-----------------------------------------------------------------------
-- Miax Pearl Equities TopOfMarket Mach 1.1.a Fields
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.application_message = ProtoField.new("Application Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.applicationmessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.bid_price = ProtoField.new("Bid Price", "miax.pearl.equities.topofmarket.mach.v1.1.a.bidprice", ftypes.UINT16)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.bid_size = ProtoField.new("Bid Size", "miax.pearl.equities.topofmarket.mach.v1.1.a.bidsize", ftypes.UINT16)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.closing_time = ProtoField.new("Closing Time", "miax.pearl.equities.topofmarket.mach.v1.1.a.closingtime", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.compact_top_of_market_best_bid_and_offer_message = ProtoField.new("Compact Top Of Market Best Bid And Offer Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.compacttopofmarketbestbidandoffermessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.correction_number = ProtoField.new("Correction Number", "miax.pearl.equities.topofmarket.mach.v1.1.a.correctionnumber", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.data = ProtoField.new("Data", "miax.pearl.equities.topofmarket.mach.v1.1.a.data", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.last_sale_message = ProtoField.new("Last Sale Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.lastsalemessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.lot_size = ProtoField.new("Lot Size", "miax.pearl.equities.topofmarket.mach.v1.1.a.lotsize", ftypes.UINT16)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.market_state = ProtoField.new("Market State", "miax.pearl.equities.topofmarket.mach.v1.1.a.marketstate", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.message = ProtoField.new("Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.message", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.message_type = ProtoField.new("Message Type", "miax.pearl.equities.topofmarket.mach.v1.1.a.messagetype", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.offer_price = ProtoField.new("Offer Price", "miax.pearl.equities.topofmarket.mach.v1.1.a.offerprice", ftypes.UINT16)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.offer_size = ProtoField.new("Offer Size", "miax.pearl.equities.topofmarket.mach.v1.1.a.offersize", ftypes.UINT16)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.opening_time = ProtoField.new("Opening Time", "miax.pearl.equities.topofmarket.mach.v1.1.a.openingtime", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.packet = ProtoField.new("Packet", "miax.pearl.equities.topofmarket.mach.v1.1.a.packet", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.packet_length = ProtoField.new("Packet Length", "miax.pearl.equities.topofmarket.mach.v1.1.a.packetlength", ftypes.UINT16)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.packet_type = ProtoField.new("Packet Type", "miax.pearl.equities.topofmarket.mach.v1.1.a.packettype", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.payload = ProtoField.new("Payload", "miax.pearl.equities.topofmarket.mach.v1.1.a.payload", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.price = ProtoField.new("Price", "miax.pearl.equities.topofmarket.mach.v1.1.a.price", ftypes.UINT64)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.primary_market_code = ProtoField.new("Primary Market Code", "miax.pearl.equities.topofmarket.mach.v1.1.a.primarymarketcode", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.reserved = ProtoField.new("Reserved", "miax.pearl.equities.topofmarket.mach.v1.1.a.reserved", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.security_trading_status_notification_message = ProtoField.new("Security Trading Status Notification Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.securitytradingstatusnotificationmessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.sequence_number = ProtoField.new("Sequence Number", "miax.pearl.equities.topofmarket.mach.v1.1.a.sequencenumber", ftypes.UINT64)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.session_id = ProtoField.new("Session Id", "miax.pearl.equities.topofmarket.mach.v1.1.a.sessionid", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.session_number = ProtoField.new("Session Number", "miax.pearl.equities.topofmarket.mach.v1.1.a.sessionnumber", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.short_sale_restriction = ProtoField.new("Short Sale Restriction", "miax.pearl.equities.topofmarket.mach.v1.1.a.shortsalerestriction", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.size = ProtoField.new("Size", "miax.pearl.equities.topofmarket.mach.v1.1.a.size", ftypes.UINT32)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.symbol_id = ProtoField.new("Symbol Id", "miax.pearl.equities.topofmarket.mach.v1.1.a.symbolid", ftypes.UINT32)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.symbol_update_message = ProtoField.new("Symbol Update Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.symbolupdatemessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.system_state_message = ProtoField.new("System State Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.systemstatemessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.system_status = ProtoField.new("System Status", "miax.pearl.equities.topofmarket.mach.v1.1.a.systemstatus", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.system_time_message = ProtoField.new("System Time Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.systemtimemessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.test_security_indicator = ProtoField.new("Test Security Indicator", "miax.pearl.equities.topofmarket.mach.v1.1.a.testsecurityindicator", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.ticker_symbol = ProtoField.new("Ticker Symbol", "miax.pearl.equities.topofmarket.mach.v1.1.a.tickersymbol", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.timestamp = ProtoField.new("Timestamp", "miax.pearl.equities.topofmarket.mach.v1.1.a.timestamp", ftypes.UINT32)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.to_m_version = ProtoField.new("To M Version", "miax.pearl.equities.topofmarket.mach.v1.1.a.tomversion", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.trade_cancel_message = ProtoField.new("Trade Cancel Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.tradecancelmessage", ftypes.STRING)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.trade_id = ProtoField.new("Trade Id", "miax.pearl.equities.topofmarket.mach.v1.1.a.tradeid", ftypes.UINT64)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.trading_status = ProtoField.new("Trading Status", "miax.pearl.equities.topofmarket.mach.v1.1.a.tradingstatus", ftypes.UINT8)
miax_pearl_equities_topofmarket_mach_v1_1_a.fields.wide_top_of_market_best_bid_and_offer_message = ProtoField.new("Wide Top Of Market Best Bid And Offer Message", "miax.pearl.equities.topofmarket.mach.v1.1.a.widetopofmarketbestbidandoffermessage", ftypes.STRING)
-----------------------------------------------------------------------
-- Declare Dissection Options
-----------------------------------------------------------------------
-- Miax Pearl Equities TopOfMarket Mach 1.1.a Element Dissection Options
show.application_message = true
show.compact_top_of_market_best_bid_and_offer_message = true
show.last_sale_message = true
show.message = true
show.packet = true
show.security_trading_status_notification_message = true
show.symbol_update_message = true
show.system_state_message = true
show.system_time_message = true
show.trade_cancel_message = true
show.wide_top_of_market_best_bid_and_offer_message = true
show.data = false
show.payload = false
-- Register Miax Pearl Equities TopOfMarket Mach 1.1.a Show Options
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_application_message = Pref.bool("Show Application Message", show.application_message, "Parse and add Application Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_compact_top_of_market_best_bid_and_offer_message = Pref.bool("Show Compact Top Of Market Best Bid And Offer Message", show.compact_top_of_market_best_bid_and_offer_message, "Parse and add Compact Top Of Market Best Bid And Offer Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_last_sale_message = Pref.bool("Show Last Sale Message", show.last_sale_message, "Parse and add Last Sale Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_message = Pref.bool("Show Message", show.message, "Parse and add Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_packet = Pref.bool("Show Packet", show.packet, "Parse and add Packet to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_security_trading_status_notification_message = Pref.bool("Show Security Trading Status Notification Message", show.security_trading_status_notification_message, "Parse and add Security Trading Status Notification Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_symbol_update_message = Pref.bool("Show Symbol Update Message", show.symbol_update_message, "Parse and add Symbol Update Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_system_state_message = Pref.bool("Show System State Message", show.system_state_message, "Parse and add System State Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_system_time_message = Pref.bool("Show System Time Message", show.system_time_message, "Parse and add System Time Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_trade_cancel_message = Pref.bool("Show Trade Cancel Message", show.trade_cancel_message, "Parse and add Trade Cancel Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_wide_top_of_market_best_bid_and_offer_message = Pref.bool("Show Wide Top Of Market Best Bid And Offer Message", show.wide_top_of_market_best_bid_and_offer_message, "Parse and add Wide Top Of Market Best Bid And Offer Message to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_data = Pref.bool("Show Data", show.data, "Parse and add Data to protocol tree")
miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_payload = Pref.bool("Show Payload", show.payload, "Parse and add Payload to protocol tree")
-- Handle changed preferences
function miax_pearl_equities_topofmarket_mach_v1_1_a.prefs_changed()
local changed = false
-- Check if show options have changed
if show.application_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_application_message then
show.application_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_application_message
changed = true
end
if show.compact_top_of_market_best_bid_and_offer_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_compact_top_of_market_best_bid_and_offer_message then
show.compact_top_of_market_best_bid_and_offer_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_compact_top_of_market_best_bid_and_offer_message
changed = true
end
if show.last_sale_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_last_sale_message then
show.last_sale_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_last_sale_message
changed = true
end
if show.message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_message then
show.message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_message
changed = true
end
if show.packet ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_packet then
show.packet = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_packet
changed = true
end
if show.security_trading_status_notification_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_security_trading_status_notification_message then
show.security_trading_status_notification_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_security_trading_status_notification_message
changed = true
end
if show.symbol_update_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_symbol_update_message then
show.symbol_update_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_symbol_update_message
changed = true
end
if show.system_state_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_system_state_message then
show.system_state_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_system_state_message
changed = true
end
if show.system_time_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_system_time_message then
show.system_time_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_system_time_message
changed = true
end
if show.trade_cancel_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_trade_cancel_message then
show.trade_cancel_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_trade_cancel_message
changed = true
end
if show.wide_top_of_market_best_bid_and_offer_message ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_wide_top_of_market_best_bid_and_offer_message then
show.wide_top_of_market_best_bid_and_offer_message = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_wide_top_of_market_best_bid_and_offer_message
changed = true
end
if show.data ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_data then
show.data = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_data
changed = true
end
if show.payload ~= miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_payload then
show.payload = miax_pearl_equities_topofmarket_mach_v1_1_a.prefs.show_payload
changed = true
end
-- Reload on changed preference
if changed then
reload()
end
end
-----------------------------------------------------------------------
-- Dissect Miax Pearl Equities TopOfMarket Mach 1.1.a
-----------------------------------------------------------------------
-- Size: Size
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.size = 4
-- Display: Size
miax_pearl_equities_topofmarket_mach_v1_1_a_display.size = function(value)
return "Size: "..value
end
-- Dissect: Size
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.size = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.size
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.size(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.size, range, value, display)
return offset + length, value
end
-- Size: Price
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.price = 8
-- Display: Price
miax_pearl_equities_topofmarket_mach_v1_1_a_display.price = function(value)
return "Price: "..value
end
-- Dissect: Price
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.price = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.price
local range = buffer(offset, length)
local value = range:le_uint64()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.price(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.price, range, value, display)
return offset + length, value
end
-- Size: Correction Number
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.correction_number = 1
-- Display: Correction Number
miax_pearl_equities_topofmarket_mach_v1_1_a_display.correction_number = function(value)
return "Correction Number: "..value
end
-- Dissect: Correction Number
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.correction_number = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.correction_number
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.correction_number(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.correction_number, range, value, display)
return offset + length, value
end
-- Size: Trade Id
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trade_id = 8
-- Display: Trade Id
miax_pearl_equities_topofmarket_mach_v1_1_a_display.trade_id = function(value)
return "Trade Id: "..value
end
-- Dissect: Trade Id
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trade_id = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trade_id
local range = buffer(offset, length)
local value = range:le_uint64()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.trade_id(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.trade_id, range, value, display)
return offset + length, value
end
-- Size: Symbol Id
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id = 4
-- Display: Symbol Id
miax_pearl_equities_topofmarket_mach_v1_1_a_display.symbol_id = function(value)
return "Symbol Id: "..value
end
-- Dissect: Symbol Id
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.symbol_id = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.symbol_id(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.symbol_id, range, value, display)
return offset + length, value
end
-- Size: Timestamp
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp = 4
-- Display: Timestamp
miax_pearl_equities_topofmarket_mach_v1_1_a_display.timestamp = function(value)
return "Timestamp: "..value
end
-- Dissect: Timestamp
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.timestamp(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.timestamp, range, value, display)
return offset + length, value
end
-- Calculate size of: Trade Cancel Message
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trade_cancel_message = function(buffer, offset)
local index = 0
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trade_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.correction_number
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.price
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.size
return index
end
-- Display: Trade Cancel Message
miax_pearl_equities_topofmarket_mach_v1_1_a_display.trade_cancel_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Trade Cancel Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trade_cancel_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 4 Byte Unsigned Fixed Width Integer
index, timestamp = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp(buffer, index, packet, parent)
-- Symbol Id: 4 Byte Unsigned Fixed Width Integer
index, symbol_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.symbol_id(buffer, index, packet, parent)
-- Trade Id: 8 Byte Unsigned Fixed Width Integer
index, trade_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trade_id(buffer, index, packet, parent)
-- Correction Number: 1 Byte Unsigned Fixed Width Integer
index, correction_number = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.correction_number(buffer, index, packet, parent)
-- Price: 8 Byte Unsigned Fixed Width Integer
index, price = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.price(buffer, index, packet, parent)
-- Size: 4 Byte Unsigned Fixed Width Integer
index, size = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.size(buffer, index, packet, parent)
return index
end
-- Dissect: Trade Cancel Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trade_cancel_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.trade_cancel_message then
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trade_cancel_message(buffer, offset)
local range = buffer(offset, length)
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.trade_cancel_message(buffer, packet, parent)
parent = parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.trade_cancel_message, range, display)
end
return miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trade_cancel_message_fields(buffer, offset, packet, parent)
end
-- Calculate size of: Last Sale Message
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.last_sale_message = function(buffer, offset)
local index = 0
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trade_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.correction_number
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.price
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.size
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.flags
return index
end
-- Display: Last Sale Message
miax_pearl_equities_topofmarket_mach_v1_1_a_display.last_sale_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Last Sale Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.last_sale_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 4 Byte Unsigned Fixed Width Integer
index, timestamp = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp(buffer, index, packet, parent)
-- Symbol Id: 4 Byte Unsigned Fixed Width Integer
index, symbol_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.symbol_id(buffer, index, packet, parent)
-- Trade Id: 8 Byte Unsigned Fixed Width Integer
index, trade_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trade_id(buffer, index, packet, parent)
-- Correction Number: 1 Byte Unsigned Fixed Width Integer
index, correction_number = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.correction_number(buffer, index, packet, parent)
-- Price: 8 Byte Unsigned Fixed Width Integer
index, price = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.price(buffer, index, packet, parent)
-- Size: 4 Byte Unsigned Fixed Width Integer
index, size = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.size(buffer, index, packet, parent)
-- Flags
index, flags = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.flags(buffer, index, packet, parent)
return index
end
-- Dissect: Last Sale Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.last_sale_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.last_sale_message then
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.last_sale_message(buffer, offset)
local range = buffer(offset, length)
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.last_sale_message(buffer, packet, parent)
parent = parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.last_sale_message, range, display)
end
return miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.last_sale_message_fields(buffer, offset, packet, parent)
end
-- Size: Offer Size
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_size = 2
-- Display: Offer Size
miax_pearl_equities_topofmarket_mach_v1_1_a_display.offer_size = function(value)
return "Offer Size: "..value
end
-- Dissect: Offer Size
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.offer_size = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_size
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.offer_size(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.offer_size, range, value, display)
return offset + length, value
end
-- Size: Offer Price
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_price = 2
-- Display: Offer Price
miax_pearl_equities_topofmarket_mach_v1_1_a_display.offer_price = function(value)
return "Offer Price: "..value
end
-- Dissect: Offer Price
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.offer_price = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_price
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.offer_price(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.offer_price, range, value, display)
return offset + length, value
end
-- Size: Bid Size
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_size = 2
-- Display: Bid Size
miax_pearl_equities_topofmarket_mach_v1_1_a_display.bid_size = function(value)
return "Bid Size: "..value
end
-- Dissect: Bid Size
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.bid_size = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_size
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.bid_size(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.bid_size, range, value, display)
return offset + length, value
end
-- Size: Bid Price
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_price = 2
-- Display: Bid Price
miax_pearl_equities_topofmarket_mach_v1_1_a_display.bid_price = function(value)
return "Bid Price: "..value
end
-- Dissect: Bid Price
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.bid_price = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_price
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.bid_price(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.bid_price, range, value, display)
return offset + length, value
end
-- Calculate size of: Wide Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.wide_top_of_market_best_bid_and_offer_message = function(buffer, offset)
local index = 0
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_price
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_size
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_price
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_size
return index
end
-- Display: Wide Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_display.wide_top_of_market_best_bid_and_offer_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Wide Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.wide_top_of_market_best_bid_and_offer_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 4 Byte Unsigned Fixed Width Integer
index, timestamp = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp(buffer, index, packet, parent)
-- Symbol Id: 4 Byte Unsigned Fixed Width Integer
index, symbol_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.symbol_id(buffer, index, packet, parent)
-- Bid Price: 2 Byte Unsigned Fixed Width Integer
index, bid_price = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.bid_price(buffer, index, packet, parent)
-- Bid Size: 2 Byte Unsigned Fixed Width Integer
index, bid_size = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.bid_size(buffer, index, packet, parent)
-- Offer Price: 2 Byte Unsigned Fixed Width Integer
index, offer_price = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.offer_price(buffer, index, packet, parent)
-- Offer Size: 2 Byte Unsigned Fixed Width Integer
index, offer_size = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.offer_size(buffer, index, packet, parent)
return index
end
-- Dissect: Wide Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.wide_top_of_market_best_bid_and_offer_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.wide_top_of_market_best_bid_and_offer_message then
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.wide_top_of_market_best_bid_and_offer_message(buffer, offset)
local range = buffer(offset, length)
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.wide_top_of_market_best_bid_and_offer_message(buffer, packet, parent)
parent = parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.wide_top_of_market_best_bid_and_offer_message, range, display)
end
return miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.wide_top_of_market_best_bid_and_offer_message_fields(buffer, offset, packet, parent)
end
-- Calculate size of: Compact Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.compact_top_of_market_best_bid_and_offer_message = function(buffer, offset)
local index = 0
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_price
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.bid_size
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_price
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.offer_size
return index
end
-- Display: Compact Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_display.compact_top_of_market_best_bid_and_offer_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Compact Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.compact_top_of_market_best_bid_and_offer_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 4 Byte Unsigned Fixed Width Integer
index, timestamp = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp(buffer, index, packet, parent)
-- Symbol Id: 4 Byte Unsigned Fixed Width Integer
index, symbol_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.symbol_id(buffer, index, packet, parent)
-- Bid Price: 2 Byte Unsigned Fixed Width Integer
index, bid_price = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.bid_price(buffer, index, packet, parent)
-- Bid Size: 2 Byte Unsigned Fixed Width Integer
index, bid_size = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.bid_size(buffer, index, packet, parent)
-- Offer Price: 2 Byte Unsigned Fixed Width Integer
index, offer_price = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.offer_price(buffer, index, packet, parent)
-- Offer Size: 2 Byte Unsigned Fixed Width Integer
index, offer_size = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.offer_size(buffer, index, packet, parent)
return index
end
-- Dissect: Compact Top Of Market Best Bid And Offer Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.compact_top_of_market_best_bid_and_offer_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.compact_top_of_market_best_bid_and_offer_message then
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.compact_top_of_market_best_bid_and_offer_message(buffer, offset)
local range = buffer(offset, length)
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.compact_top_of_market_best_bid_and_offer_message(buffer, packet, parent)
parent = parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.compact_top_of_market_best_bid_and_offer_message, range, display)
end
return miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.compact_top_of_market_best_bid_and_offer_message_fields(buffer, offset, packet, parent)
end
-- Size: Short Sale Restriction
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.short_sale_restriction = 1
-- Display: Short Sale Restriction
miax_pearl_equities_topofmarket_mach_v1_1_a_display.short_sale_restriction = function(value)
if value == "Y" then
return "Short Sale Restriction: Ssr In Effect (Y)"
end
if value == "N" then
return "Short Sale Restriction: Ssr Not In Effect (N)"
end
return "Short Sale Restriction: Unknown("..value..")"
end
-- Dissect: Short Sale Restriction
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.short_sale_restriction = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.short_sale_restriction
local range = buffer(offset, length)
local value = range:string()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.short_sale_restriction(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.short_sale_restriction, range, value, display)
return offset + length, value
end
-- Size: Market State
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.market_state = 1
-- Display: Market State
miax_pearl_equities_topofmarket_mach_v1_1_a_display.market_state = function(value)
if value == 1 then
return "Market State: Pre Opening (1)"
end
if value == 2 then
return "Market State: Early Trading (2)"
end
if value == 3 then
return "Market State: Regular Trading (3)"
end
if value == 4 then
return "Market State: After Hours Trading (4)"
end
return "Market State: Unknown("..value..")"
end
-- Dissect: Market State
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.market_state = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.market_state
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.market_state(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.market_state, range, value, display)
return offset + length, value
end
-- Size: Trading Status
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trading_status = 1
-- Display: Trading Status
miax_pearl_equities_topofmarket_mach_v1_1_a_display.trading_status = function(value)
if value == 1 then
return "Trading Status: Pre Open (1)"
end
if value == 2 then
return "Trading Status: Trading (2)"
end
if value == 3 then
return "Trading Status: Halt (3)"
end
if value == 4 then
return "Trading Status: Operational Halt (4)"
end
if value == 5 then
return "Trading Status: Closed (5)"
end
return "Trading Status: Unknown("..value..")"
end
-- Dissect: Trading Status
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trading_status = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trading_status
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.trading_status(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.trading_status, range, value, display)
return offset + length, value
end
-- Calculate size of: Security Trading Status Notification Message
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.security_trading_status_notification_message = function(buffer, offset)
local index = 0
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.symbol_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.trading_status
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.market_state
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.short_sale_restriction
return index
end
-- Display: Security Trading Status Notification Message
miax_pearl_equities_topofmarket_mach_v1_1_a_display.security_trading_status_notification_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Security Trading Status Notification Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.security_trading_status_notification_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 4 Byte Unsigned Fixed Width Integer
index, timestamp = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp(buffer, index, packet, parent)
-- Symbol Id: 4 Byte Unsigned Fixed Width Integer
index, symbol_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.symbol_id(buffer, index, packet, parent)
-- Trading Status: 1 Byte Unsigned Fixed Width Integer Enum with 5 values
index, trading_status = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.trading_status(buffer, index, packet, parent)
-- Market State: 1 Byte Unsigned Fixed Width Integer Enum with 4 values
index, market_state = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.market_state(buffer, index, packet, parent)
-- Short Sale Restriction: 1 Byte Ascii String Enum with 2 values
index, short_sale_restriction = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.short_sale_restriction(buffer, index, packet, parent)
return index
end
-- Dissect: Security Trading Status Notification Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.security_trading_status_notification_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.security_trading_status_notification_message then
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.security_trading_status_notification_message(buffer, offset)
local range = buffer(offset, length)
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.security_trading_status_notification_message(buffer, packet, parent)
parent = parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.security_trading_status_notification_message, range, display)
end
return miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.security_trading_status_notification_message_fields(buffer, offset, packet, parent)
end
-- Size: System Status
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.system_status = 1
-- Display: System Status
miax_pearl_equities_topofmarket_mach_v1_1_a_display.system_status = function(value)
if value == "S" then
return "System Status: Start (S)"
end
if value == "C" then
return "System Status: End (C)"
end
if value == "1" then
return "System Status: Start (1)"
end
if value == "2" then
return "System Status: End (2)"
end
return "System Status: Unknown("..value..")"
end
-- Dissect: System Status
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.system_status = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.system_status
local range = buffer(offset, length)
local value = range:string()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.system_status(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.system_status, range, value, display)
return offset + length, value
end
-- Size: Session Id
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.session_id = 1
-- Display: Session Id
miax_pearl_equities_topofmarket_mach_v1_1_a_display.session_id = function(value)
return "Session Id: "..value
end
-- Dissect: Session Id
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.session_id = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.session_id
local range = buffer(offset, length)
local value = range:le_uint()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.session_id(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.session_id, range, value, display)
return offset + length, value
end
-- Size: To M Version
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.to_m_version = 8
-- Display: To M Version
miax_pearl_equities_topofmarket_mach_v1_1_a_display.to_m_version = function(value)
return "To M Version: "..value
end
-- Dissect: To M Version
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.to_m_version = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.to_m_version
local range = buffer(offset, length)
local value = range:string()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.to_m_version(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.to_m_version, range, value, display)
return offset + length, value
end
-- Calculate size of: System State Message
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.system_state_message = function(buffer, offset)
local index = 0
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.timestamp
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.to_m_version
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.session_id
index = index + miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.system_status
return index
end
-- Display: System State Message
miax_pearl_equities_topofmarket_mach_v1_1_a_display.system_state_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: System State Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.system_state_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 4 Byte Unsigned Fixed Width Integer
index, timestamp = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.timestamp(buffer, index, packet, parent)
-- To M Version: 8 Byte Ascii String
index, to_m_version = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.to_m_version(buffer, index, packet, parent)
-- Session Id: 1 Byte Unsigned Fixed Width Integer
index, session_id = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.session_id(buffer, index, packet, parent)
-- System Status: 1 Byte Ascii String Enum with 4 values
index, system_status = miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.system_status(buffer, index, packet, parent)
return index
end
-- Dissect: System State Message
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.system_state_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.system_state_message then
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.system_state_message(buffer, offset)
local range = buffer(offset, length)
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.system_state_message(buffer, packet, parent)
parent = parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.system_state_message, range, display)
end
return miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.system_state_message_fields(buffer, offset, packet, parent)
end
-- Size: Primary Market Code
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.primary_market_code = 1
-- Display: Primary Market Code
miax_pearl_equities_topofmarket_mach_v1_1_a_display.primary_market_code = function(value)
if value == "A" then
return "Primary Market Code: Nyse American (A)"
end
if value == "B" then
return "Primary Market Code: Nasdaq Bx (B)"
end
if value == "C" then
return "Primary Market Code: Nyse National (C)"
end
if value == "H" then
return "Primary Market Code: Miax Pearl Equities (H)"
end
if value == "I" then
return "Primary Market Code: Nasdaq Ise (I)"
end
if value == "J" then
return "Primary Market Code: Cboe Edga Exchange (J)"
end
if value == "K" then
return "Primary Market Code: Cboe Edgx Exchange (K)"
end
if value == "L" then
return "Primary Market Code: Long Term Stock Exchange (L)"
end
if value == "M" then
return "Primary Market Code: Nyse Chicago (M)"
end
if value == "N" then
return "Primary Market Code: New York Stock Exchange (N)"
end
if value == "P" then
return "Primary Market Code: Nyse Arca (P)"
end
if value == "Q" then
return "Primary Market Code: Nasdaq (Q)"
end
if value == "U" then
return "Primary Market Code: Members Exchange (U)"
end
if value == "V" then
return "Primary Market Code: Investors Exchange (V)"
end
if value == "W" then
return "Primary Market Code: Cboe Stock Exchange (W)"
end
if value == "X" then
return "Primary Market Code: Nasdaq Phlx (X)"
end
if value == "Y" then
return "Primary Market Code: Cboe Byx Exchange (Y)"
end
if value == "Z" then
return "Primary Market Code: Cboe Bzx Exchange (Z)"
end
return "Primary Market Code: Unknown("..value..")"
end
-- Dissect: Primary Market Code
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.primary_market_code = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.primary_market_code
local range = buffer(offset, length)
local value = range:string()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.primary_market_code(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.primary_market_code, range, value, display)
return offset + length, value
end
-- Size: Closing Time
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.closing_time = 8
-- Display: Closing Time
miax_pearl_equities_topofmarket_mach_v1_1_a_display.closing_time = function(value)
return "Closing Time: "..value
end
-- Dissect: Closing Time
miax_pearl_equities_topofmarket_mach_v1_1_a_dissect.closing_time = function(buffer, offset, packet, parent)
local length = miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.closing_time
local range = buffer(offset, length)
local value = range:string()
local display = miax_pearl_equities_topofmarket_mach_v1_1_a_display.closing_time(value, buffer, offset, packet, parent)
parent:add(miax_pearl_equities_topofmarket_mach_v1_1_a.fields.closing_time, range, value, display)
return offset + length, value
end
-- Size: Opening Time
miax_pearl_equities_topofmarket_mach_v1_1_a_size_of.opening_time = 8
-- Display: Opening Time
miax_pearl_equities_topofmarket_mach_v1_1_a_display.opening_time = function(value)
return "Opening Time: "..value
end