/
Memx.Equities.MemoirDepthFeed.Sbe.v1.3.Script.Dissector.lua
2329 lines (1805 loc) · 98.8 KB
/
Memx.Equities.MemoirDepthFeed.Sbe.v1.3.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
-----------------------------------------------------------------------
-- Memx Equities MemoirDepthFeed Sbe 1.3 Protocol
local memx_equities_memoirdepthfeed_sbe_v1_3 = Proto("Memx.Equities.MemoirDepthFeed.Sbe.v1.3.Lua", "Memx Equities MemoirDepthFeed Sbe 1.3")
-- Component Tables
local show = {}
local format = {}
local memx_equities_memoirdepthfeed_sbe_v1_3_display = {}
local memx_equities_memoirdepthfeed_sbe_v1_3_dissect = {}
local memx_equities_memoirdepthfeed_sbe_v1_3_size_of = {}
local verify = {}
local translate = {}
-----------------------------------------------------------------------
-- Declare Protocol Fields
-----------------------------------------------------------------------
-- Memx Equities MemoirDepthFeed Sbe 1.3 Fields
memx_equities_memoirdepthfeed_sbe_v1_3.fields.as_of_sequence_number = ProtoField.new("As Of Sequence Number", "memx.equities.memoirdepthfeed.sbe.v1.3.asofsequencenumber", ftypes.UINT64)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.block_length = ProtoField.new("Block Length", "memx.equities.memoirdepthfeed.sbe.v1.3.blocklength", ftypes.UINT16)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.broken_trade_message = ProtoField.new("Broken Trade Message", "memx.equities.memoirdepthfeed.sbe.v1.3.brokentrademessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.clear_book_message = ProtoField.new("Clear Book Message", "memx.equities.memoirdepthfeed.sbe.v1.3.clearbookmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.common_header = ProtoField.new("Common Header", "memx.equities.memoirdepthfeed.sbe.v1.3.commonheader", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.corrected_price = ProtoField.new("Corrected Price", "memx.equities.memoirdepthfeed.sbe.v1.3.correctedprice", ftypes.DOUBLE)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.corrected_quantity = ProtoField.new("Corrected Quantity", "memx.equities.memoirdepthfeed.sbe.v1.3.correctedquantity", ftypes.UINT32)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.corrected_trade_message = ProtoField.new("Corrected Trade Message", "memx.equities.memoirdepthfeed.sbe.v1.3.correctedtrademessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.header_length = ProtoField.new("Header Length", "memx.equities.memoirdepthfeed.sbe.v1.3.headerlength", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.instrument_directory_message = ProtoField.new("Instrument Directory Message", "memx.equities.memoirdepthfeed.sbe.v1.3.instrumentdirectorymessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.is_test_symbol = ProtoField.new("Is Test Symbol", "memx.equities.memoirdepthfeed.sbe.v1.3.istestsymbol", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.message = ProtoField.new("Message", "memx.equities.memoirdepthfeed.sbe.v1.3.message", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.message_count = ProtoField.new("Message Count", "memx.equities.memoirdepthfeed.sbe.v1.3.messagecount", ftypes.UINT16)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.message_length = ProtoField.new("Message Length", "memx.equities.memoirdepthfeed.sbe.v1.3.messagelength", ftypes.UINT16)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.message_type = ProtoField.new("Message Type", "memx.equities.memoirdepthfeed.sbe.v1.3.messagetype", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.mpv = ProtoField.new("Mpv", "memx.equities.memoirdepthfeed.sbe.v1.3.mpv", ftypes.DOUBLE)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_added_message = ProtoField.new("Order Added Message", "memx.equities.memoirdepthfeed.sbe.v1.3.orderaddedmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_deleted_message = ProtoField.new("Order Deleted Message", "memx.equities.memoirdepthfeed.sbe.v1.3.orderdeletedmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_executed_message = ProtoField.new("Order Executed Message", "memx.equities.memoirdepthfeed.sbe.v1.3.orderexecutedmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_id = ProtoField.new("Order Id", "memx.equities.memoirdepthfeed.sbe.v1.3.orderid", ftypes.UINT64)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_reduced_message = ProtoField.new("Order Reduced Message", "memx.equities.memoirdepthfeed.sbe.v1.3.orderreducedmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.original_price = ProtoField.new("Original Price", "memx.equities.memoirdepthfeed.sbe.v1.3.originalprice", ftypes.DOUBLE)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.original_quantity = ProtoField.new("Original Quantity", "memx.equities.memoirdepthfeed.sbe.v1.3.originalquantity", ftypes.UINT32)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.packet = ProtoField.new("Packet", "memx.equities.memoirdepthfeed.sbe.v1.3.packet", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.payload = ProtoField.new("Payload", "memx.equities.memoirdepthfeed.sbe.v1.3.payload", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.price = ProtoField.new("Price", "memx.equities.memoirdepthfeed.sbe.v1.3.price", ftypes.DOUBLE)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.quantity = ProtoField.new("Quantity", "memx.equities.memoirdepthfeed.sbe.v1.3.quantity", ftypes.UINT32)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.reg_sho_restriction_message = ProtoField.new("Reg Sho Restriction Message", "memx.equities.memoirdepthfeed.sbe.v1.3.regshorestrictionmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.reserved = ProtoField.new("Reserved", "memx.equities.memoirdepthfeed.sbe.v1.3.reserved", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.round_lot = ProtoField.new("Round Lot", "memx.equities.memoirdepthfeed.sbe.v1.3.roundlot", ftypes.UINT32)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.sbe_header = ProtoField.new("Sbe Header", "memx.equities.memoirdepthfeed.sbe.v1.3.sbeheader", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.sbe_message = ProtoField.new("Sbe Message", "memx.equities.memoirdepthfeed.sbe.v1.3.sbemessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.schema_id = ProtoField.new("Schema Id", "memx.equities.memoirdepthfeed.sbe.v1.3.schemaid", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.security_id = ProtoField.new("Security Id", "memx.equities.memoirdepthfeed.sbe.v1.3.securityid", ftypes.UINT16)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.security_trading_status = ProtoField.new("Security Trading Status", "memx.equities.memoirdepthfeed.sbe.v1.3.securitytradingstatus", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.security_trading_status_message = ProtoField.new("Security Trading Status Message", "memx.equities.memoirdepthfeed.sbe.v1.3.securitytradingstatusmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.security_trading_status_reason = ProtoField.new("Security Trading Status Reason", "memx.equities.memoirdepthfeed.sbe.v1.3.securitytradingstatusreason", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.sequence_number = ProtoField.new("Sequence Number", "memx.equities.memoirdepthfeed.sbe.v1.3.sequencenumber", ftypes.UINT64)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.sequenced_message = ProtoField.new("Sequenced Message", "memx.equities.memoirdepthfeed.sbe.v1.3.sequencedmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.sequenced_messages = ProtoField.new("Sequenced Messages", "memx.equities.memoirdepthfeed.sbe.v1.3.sequencedmessages", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.session_id = ProtoField.new("Session Id", "memx.equities.memoirdepthfeed.sbe.v1.3.sessionid", ftypes.UINT64)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.short_sale_restriction = ProtoField.new("Short Sale Restriction", "memx.equities.memoirdepthfeed.sbe.v1.3.shortsalerestriction", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.side = ProtoField.new("Side", "memx.equities.memoirdepthfeed.sbe.v1.3.side", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.snapshot_complete_message = ProtoField.new("Snapshot Complete Message", "memx.equities.memoirdepthfeed.sbe.v1.3.snapshotcompletemessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.symbol = ProtoField.new("Symbol", "memx.equities.memoirdepthfeed.sbe.v1.3.symbol", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.symbol_sfx = ProtoField.new("Symbol Sfx", "memx.equities.memoirdepthfeed.sbe.v1.3.symbolsfx", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.template_id = ProtoField.new("Template Id", "memx.equities.memoirdepthfeed.sbe.v1.3.templateid", ftypes.UINT8)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.timestamp = ProtoField.new("Timestamp", "memx.equities.memoirdepthfeed.sbe.v1.3.timestamp", ftypes.UINT64)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.trade_id = ProtoField.new("Trade Id", "memx.equities.memoirdepthfeed.sbe.v1.3.tradeid", ftypes.UINT64)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.trade_message = ProtoField.new("Trade Message", "memx.equities.memoirdepthfeed.sbe.v1.3.trademessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.trading_session = ProtoField.new("Trading Session", "memx.equities.memoirdepthfeed.sbe.v1.3.tradingsession", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.trading_session_status_message = ProtoField.new("Trading Session Status Message", "memx.equities.memoirdepthfeed.sbe.v1.3.tradingsessionstatusmessage", ftypes.STRING)
memx_equities_memoirdepthfeed_sbe_v1_3.fields.version = ProtoField.new("Version", "memx.equities.memoirdepthfeed.sbe.v1.3.version", ftypes.UINT16)
-----------------------------------------------------------------------
-- Declare Dissection Options
-----------------------------------------------------------------------
-- Memx Equities MemoirDepthFeed Sbe 1.3 Element Dissection Options
show.broken_trade_message = true
show.clear_book_message = true
show.common_header = true
show.corrected_trade_message = true
show.instrument_directory_message = true
show.message = true
show.order_added_message = true
show.order_deleted_message = true
show.order_executed_message = true
show.order_reduced_message = true
show.packet = true
show.reg_sho_restriction_message = true
show.sbe_header = true
show.sbe_message = true
show.security_trading_status_message = true
show.sequenced_message = true
show.snapshot_complete_message = true
show.trade_message = true
show.trading_session_status_message = true
show.payload = false
show.sequenced_messages = false
-- Register Memx Equities MemoirDepthFeed Sbe 1.3 Show Options
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_broken_trade_message = Pref.bool("Show Broken Trade Message", show.broken_trade_message, "Parse and add Broken Trade Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_clear_book_message = Pref.bool("Show Clear Book Message", show.clear_book_message, "Parse and add Clear Book Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_common_header = Pref.bool("Show Common Header", show.common_header, "Parse and add Common Header to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_corrected_trade_message = Pref.bool("Show Corrected Trade Message", show.corrected_trade_message, "Parse and add Corrected Trade Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_instrument_directory_message = Pref.bool("Show Instrument Directory Message", show.instrument_directory_message, "Parse and add Instrument Directory Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_message = Pref.bool("Show Message", show.message, "Parse and add Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_added_message = Pref.bool("Show Order Added Message", show.order_added_message, "Parse and add Order Added Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_deleted_message = Pref.bool("Show Order Deleted Message", show.order_deleted_message, "Parse and add Order Deleted Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_executed_message = Pref.bool("Show Order Executed Message", show.order_executed_message, "Parse and add Order Executed Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_reduced_message = Pref.bool("Show Order Reduced Message", show.order_reduced_message, "Parse and add Order Reduced Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_packet = Pref.bool("Show Packet", show.packet, "Parse and add Packet to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_reg_sho_restriction_message = Pref.bool("Show Reg Sho Restriction Message", show.reg_sho_restriction_message, "Parse and add Reg Sho Restriction Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sbe_header = Pref.bool("Show Sbe Header", show.sbe_header, "Parse and add Sbe Header to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sbe_message = Pref.bool("Show Sbe Message", show.sbe_message, "Parse and add Sbe Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_security_trading_status_message = Pref.bool("Show Security Trading Status Message", show.security_trading_status_message, "Parse and add Security Trading Status Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sequenced_message = Pref.bool("Show Sequenced Message", show.sequenced_message, "Parse and add Sequenced Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_snapshot_complete_message = Pref.bool("Show Snapshot Complete Message", show.snapshot_complete_message, "Parse and add Snapshot Complete Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_trade_message = Pref.bool("Show Trade Message", show.trade_message, "Parse and add Trade Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_trading_session_status_message = Pref.bool("Show Trading Session Status Message", show.trading_session_status_message, "Parse and add Trading Session Status Message to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_payload = Pref.bool("Show Payload", show.payload, "Parse and add Payload to protocol tree")
memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sequenced_messages = Pref.bool("Show Sequenced Messages", show.sequenced_messages, "Parse and add Sequenced Messages to protocol tree")
-- Handle changed preferences
function memx_equities_memoirdepthfeed_sbe_v1_3.prefs_changed()
local changed = false
-- Check if show options have changed
if show.broken_trade_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_broken_trade_message then
show.broken_trade_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_broken_trade_message
changed = true
end
if show.clear_book_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_clear_book_message then
show.clear_book_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_clear_book_message
changed = true
end
if show.common_header ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_common_header then
show.common_header = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_common_header
changed = true
end
if show.corrected_trade_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_corrected_trade_message then
show.corrected_trade_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_corrected_trade_message
changed = true
end
if show.instrument_directory_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_instrument_directory_message then
show.instrument_directory_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_instrument_directory_message
changed = true
end
if show.message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_message then
show.message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_message
changed = true
end
if show.order_added_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_added_message then
show.order_added_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_added_message
changed = true
end
if show.order_deleted_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_deleted_message then
show.order_deleted_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_deleted_message
changed = true
end
if show.order_executed_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_executed_message then
show.order_executed_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_executed_message
changed = true
end
if show.order_reduced_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_reduced_message then
show.order_reduced_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_order_reduced_message
changed = true
end
if show.packet ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_packet then
show.packet = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_packet
changed = true
end
if show.reg_sho_restriction_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_reg_sho_restriction_message then
show.reg_sho_restriction_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_reg_sho_restriction_message
changed = true
end
if show.sbe_header ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sbe_header then
show.sbe_header = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sbe_header
changed = true
end
if show.sbe_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sbe_message then
show.sbe_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sbe_message
changed = true
end
if show.security_trading_status_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_security_trading_status_message then
show.security_trading_status_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_security_trading_status_message
changed = true
end
if show.sequenced_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sequenced_message then
show.sequenced_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sequenced_message
changed = true
end
if show.snapshot_complete_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_snapshot_complete_message then
show.snapshot_complete_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_snapshot_complete_message
changed = true
end
if show.trade_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_trade_message then
show.trade_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_trade_message
changed = true
end
if show.trading_session_status_message ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_trading_session_status_message then
show.trading_session_status_message = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_trading_session_status_message
changed = true
end
if show.payload ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_payload then
show.payload = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_payload
changed = true
end
if show.sequenced_messages ~= memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sequenced_messages then
show.sequenced_messages = memx_equities_memoirdepthfeed_sbe_v1_3.prefs.show_sequenced_messages
changed = true
end
-- Reload on changed preference
if changed then
reload()
end
end
-----------------------------------------------------------------------
-- Dissect Memx Equities MemoirDepthFeed Sbe 1.3
-----------------------------------------------------------------------
-- Size: As Of Sequence Number
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.as_of_sequence_number = 8
-- Display: As Of Sequence Number
memx_equities_memoirdepthfeed_sbe_v1_3_display.as_of_sequence_number = function(value)
return "As Of Sequence Number: "..value
end
-- Dissect: As Of Sequence Number
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.as_of_sequence_number = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.as_of_sequence_number
local range = buffer(offset, length)
local value = range:uint64()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.as_of_sequence_number(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.as_of_sequence_number, range, value, display)
return offset + length, value
end
-- Size: Timestamp
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp = 8
-- Display: Timestamp
memx_equities_memoirdepthfeed_sbe_v1_3_display.timestamp = function(value)
-- Parse unix timestamp
local seconds = value:tonumber()/1000000000
local nanoseconds = value:tonumber()%1000000000
return "Timestamp: "..os.date("%x %H:%M:%S.", seconds)..string.format("%09d", nanoseconds)
end
-- Dissect: Timestamp
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
local range = buffer(offset, length)
local value = range:uint64()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.timestamp(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.timestamp, range, value, display)
return offset + length, value
end
-- Calculate size of: Snapshot Complete Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.snapshot_complete_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.as_of_sequence_number
return index
end
-- Display: Snapshot Complete Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.snapshot_complete_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Snapshot Complete Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.snapshot_complete_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- As Of Sequence Number: 8 Byte Unsigned Fixed Width Integer
index, as_of_sequence_number = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.as_of_sequence_number(buffer, index, packet, parent)
return index
end
-- Dissect: Snapshot Complete Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.snapshot_complete_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.snapshot_complete_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.snapshot_complete_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.snapshot_complete_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.snapshot_complete_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.snapshot_complete_message_fields(buffer, offset, packet, parent)
end
-- Size: Security Id
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id = 2
-- Display: Security Id
memx_equities_memoirdepthfeed_sbe_v1_3_display.security_id = function(value)
return "Security Id: "..value
end
-- Dissect: Security Id
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
local range = buffer(offset, length)
local value = range:uint()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.security_id(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.security_id, range, value, display)
return offset + length, value
end
-- Calculate size of: Clear Book Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.clear_book_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
return index
end
-- Display: Clear Book Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.clear_book_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Clear Book Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.clear_book_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
return index
end
-- Dissect: Clear Book Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.clear_book_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.clear_book_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.clear_book_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.clear_book_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.clear_book_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.clear_book_message_fields(buffer, offset, packet, parent)
end
-- Size: Corrected Price
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_price = 8
-- Display: Corrected Price
memx_equities_memoirdepthfeed_sbe_v1_3_display.corrected_price = function(value)
return "Corrected Price: "..value
end
-- Translate: Corrected Price
translate.corrected_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Corrected Price
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_price = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_price
local range = buffer(offset, length)
local raw = range:int64()
local value = translate.corrected_price(raw)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.corrected_price(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.corrected_price, range, value, display)
return offset + length, value
end
-- Size: Corrected Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_quantity = 4
-- Display: Corrected Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_display.corrected_quantity = function(value)
return "Corrected Quantity: "..value
end
-- Dissect: Corrected Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_quantity = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_quantity
local range = buffer(offset, length)
local value = range:uint()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.corrected_quantity(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.corrected_quantity, range, value, display)
return offset + length, value
end
-- Size: Original Price
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_price = 8
-- Display: Original Price
memx_equities_memoirdepthfeed_sbe_v1_3_display.original_price = function(value)
return "Original Price: "..value
end
-- Translate: Original Price
translate.original_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Original Price
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.original_price = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_price
local range = buffer(offset, length)
local raw = range:int64()
local value = translate.original_price(raw)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.original_price(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.original_price, range, value, display)
return offset + length, value
end
-- Size: Original Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_quantity = 4
-- Display: Original Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_display.original_quantity = function(value)
return "Original Quantity: "..value
end
-- Dissect: Original Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.original_quantity = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_quantity
local range = buffer(offset, length)
local value = range:uint()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.original_quantity(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.original_quantity, range, value, display)
return offset + length, value
end
-- Size: Trade Id
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_id = 8
-- Display: Trade Id
memx_equities_memoirdepthfeed_sbe_v1_3_display.trade_id = function(value)
return "Trade Id: "..value
end
-- Dissect: Trade Id
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_id = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_id
local range = buffer(offset, length)
local value = range:uint64()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.trade_id(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.trade_id, range, value, display)
return offset + length, value
end
-- Calculate size of: Corrected Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_trade_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_quantity
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_price
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_quantity
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_price
return index
end
-- Display: Corrected Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.corrected_trade_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Corrected Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_trade_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Trade Id: 8 Byte Unsigned Fixed Width Integer
index, trade_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_id(buffer, index, packet, parent)
-- Original Quantity: 4 Byte Unsigned Fixed Width Integer
index, original_quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.original_quantity(buffer, index, packet, parent)
-- Original Price: 8 Byte Signed Fixed Width Integer
index, original_price = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.original_price(buffer, index, packet, parent)
-- Corrected Quantity: 4 Byte Unsigned Fixed Width Integer
index, corrected_quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_quantity(buffer, index, packet, parent)
-- Corrected Price: 8 Byte Signed Fixed Width Integer
index, corrected_price = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_price(buffer, index, packet, parent)
return index
end
-- Dissect: Corrected Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_trade_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.corrected_trade_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.corrected_trade_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.corrected_trade_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.corrected_trade_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.corrected_trade_message_fields(buffer, offset, packet, parent)
end
-- Calculate size of: Broken Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.broken_trade_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_quantity
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.original_price
return index
end
-- Display: Broken Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.broken_trade_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Broken Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.broken_trade_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Trade Id: 8 Byte Unsigned Fixed Width Integer
index, trade_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_id(buffer, index, packet, parent)
-- Original Quantity: 4 Byte Unsigned Fixed Width Integer
index, original_quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.original_quantity(buffer, index, packet, parent)
-- Original Price: 8 Byte Signed Fixed Width Integer
index, original_price = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.original_price(buffer, index, packet, parent)
return index
end
-- Dissect: Broken Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.broken_trade_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.broken_trade_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.broken_trade_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.broken_trade_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.broken_trade_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.broken_trade_message_fields(buffer, offset, packet, parent)
end
-- Size: Price
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.price = 8
-- Display: Price
memx_equities_memoirdepthfeed_sbe_v1_3_display.price = function(value)
return "Price: "..value
end
-- Translate: Price
translate.price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Price
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.price = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.price
local range = buffer(offset, length)
local raw = range:int64()
local value = translate.price(raw)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.price(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.price, range, value, display)
return offset + length, value
end
-- Size: Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.quantity = 4
-- Display: Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_display.quantity = function(value)
return "Quantity: "..value
end
-- Dissect: Quantity
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.quantity = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.quantity
local range = buffer(offset, length)
local value = range:uint()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.quantity(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.quantity, range, value, display)
return offset + length, value
end
-- Calculate size of: Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.quantity
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.price
return index
end
-- Display: Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.trade_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Trade Id: 8 Byte Unsigned Fixed Width Integer
index, trade_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_id(buffer, index, packet, parent)
-- Quantity: 4 Byte Unsigned Fixed Width Integer
index, quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.quantity(buffer, index, packet, parent)
-- Price: 8 Byte Signed Fixed Width Integer
index, price = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.price(buffer, index, packet, parent)
return index
end
-- Dissect: Trade Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.trade_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.trade_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.trade_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_message_fields(buffer, offset, packet, parent)
end
-- Size: Order Id
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_id = 8
-- Display: Order Id
memx_equities_memoirdepthfeed_sbe_v1_3_display.order_id = function(value)
return "Order Id: "..value
end
-- Dissect: Order Id
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_id = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_id
local range = buffer(offset, length)
local value = range:uint64()
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.order_id(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_id, range, value, display)
return offset + length, value
end
-- Calculate size of: Order Executed Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_executed_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trade_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.quantity
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.price
return index
end
-- Display: Order Executed Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.order_executed_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Order Executed Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_executed_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Order Id: 8 Byte Unsigned Fixed Width Integer
index, order_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_id(buffer, index, packet, parent)
-- Trade Id: 8 Byte Unsigned Fixed Width Integer
index, trade_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.trade_id(buffer, index, packet, parent)
-- Quantity: 4 Byte Unsigned Fixed Width Integer
index, quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.quantity(buffer, index, packet, parent)
-- Price: 8 Byte Signed Fixed Width Integer
index, price = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.price(buffer, index, packet, parent)
return index
end
-- Dissect: Order Executed Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_executed_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.order_executed_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_executed_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.order_executed_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_executed_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_executed_message_fields(buffer, offset, packet, parent)
end
-- Calculate size of: Order Reduced Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_reduced_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.quantity
return index
end
-- Display: Order Reduced Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.order_reduced_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Order Reduced Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_reduced_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Order Id: 8 Byte Unsigned Fixed Width Integer
index, order_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_id(buffer, index, packet, parent)
-- Quantity: 4 Byte Unsigned Fixed Width Integer
index, quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.quantity(buffer, index, packet, parent)
return index
end
-- Dissect: Order Reduced Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_reduced_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.order_reduced_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_reduced_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.order_reduced_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_reduced_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_reduced_message_fields(buffer, offset, packet, parent)
end
-- Calculate size of: Order Deleted Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_deleted_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_id
return index
end
-- Display: Order Deleted Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.order_deleted_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Order Deleted Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_deleted_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Order Id: 8 Byte Unsigned Fixed Width Integer
index, order_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_id(buffer, index, packet, parent)
return index
end
-- Dissect: Order Deleted Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_deleted_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.order_deleted_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_deleted_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.order_deleted_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_deleted_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_deleted_message_fields(buffer, offset, packet, parent)
end
-- Size: Side
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.side = 1
-- Display: Side
memx_equities_memoirdepthfeed_sbe_v1_3_display.side = function(value)
-- Check if field has value
if value == nil or value == 0 then
return "Side: No Value"
end
if value == "B" then
return "Side: Buy (B)"
end
if value == "S" then
return "Side: Sell (S)"
end
return "Side: Unknown("..value..")"
end
-- Dissect: Side
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.side = function(buffer, offset, packet, parent)
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.side
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 = memx_equities_memoirdepthfeed_sbe_v1_3_display.side(value, buffer, offset, packet, parent)
parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.side, range, value, display)
return offset + length, value
end
-- Calculate size of: Order Added Message
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_added_message = function(buffer, offset)
local index = 0
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.timestamp
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.security_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_id
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.side
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.quantity
index = index + memx_equities_memoirdepthfeed_sbe_v1_3_size_of.price
return index
end
-- Display: Order Added Message
memx_equities_memoirdepthfeed_sbe_v1_3_display.order_added_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Order Added Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_added_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- Timestamp: 8 Byte Unsigned Fixed Width Integer
index, timestamp = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.timestamp(buffer, index, packet, parent)
-- Security Id: 2 Byte Unsigned Fixed Width Integer
index, security_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.security_id(buffer, index, packet, parent)
-- Order Id: 8 Byte Unsigned Fixed Width Integer
index, order_id = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_id(buffer, index, packet, parent)
-- Side: 1 Byte Ascii String Enum with 2 values
index, side = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.side(buffer, index, packet, parent)
-- Quantity: 4 Byte Unsigned Fixed Width Integer
index, quantity = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.quantity(buffer, index, packet, parent)
-- Price: 8 Byte Signed Fixed Width Integer
index, price = memx_equities_memoirdepthfeed_sbe_v1_3_dissect.price(buffer, index, packet, parent)
return index
end
-- Dissect: Order Added Message
memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_added_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.order_added_message then
local length = memx_equities_memoirdepthfeed_sbe_v1_3_size_of.order_added_message(buffer, offset)
local range = buffer(offset, length)
local display = memx_equities_memoirdepthfeed_sbe_v1_3_display.order_added_message(buffer, packet, parent)
parent = parent:add(memx_equities_memoirdepthfeed_sbe_v1_3.fields.order_added_message, range, display)
end
return memx_equities_memoirdepthfeed_sbe_v1_3_dissect.order_added_message_fields(buffer, offset, packet, parent)
end
-- Size: Trading Session
memx_equities_memoirdepthfeed_sbe_v1_3_size_of.trading_session = 1