/
Nasdaq.Equities.Orders.Ouch.v5.0.Script.Dissector.lua
4968 lines (4005 loc) · 211 KB
/
Nasdaq.Equities.Orders.Ouch.v5.0.Script.Dissector.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-----------------------------------------------------------------------
-- Lua Script Wireshark Dissector
--
-- Please see end of file for rules and regulations
-----------------------------------------------------------------------
-- Nasdaq Equities Orders Ouch 5.0 Protocol
local nasdaq_equities_orders_ouch_v5_0 = Proto("Nasdaq.Equities.Orders.Ouch.v5.0.Lua", "Nasdaq Equities Orders Ouch 5.0")
-- Component Tables
local show = {}
local format = {}
local nasdaq_equities_orders_ouch_v5_0_display = {}
local nasdaq_equities_orders_ouch_v5_0_dissect = {}
local nasdaq_equities_orders_ouch_v5_0_size_of = {}
local verify = {}
local translate = {}
-----------------------------------------------------------------------
-- Declare Protocol Fields
-----------------------------------------------------------------------
-- Nasdaq Equities Orders Ouch 5.0 Fields
nasdaq_equities_orders_ouch_v5_0.fields.account_query_response_message = ProtoField.new("Account Query Response Message", "nasdaq.equities.orders.ouch.v5.0.accountqueryresponsemessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.aiq_canceled_message = ProtoField.new("Aiq Canceled Message", "nasdaq.equities.orders.ouch.v5.0.aiqcanceledmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.appendage_length = ProtoField.new("Appendage Length", "nasdaq.equities.orders.ouch.v5.0.appendagelength", ftypes.UINT16)
nasdaq_equities_orders_ouch_v5_0.fields.bbo_weight_indicator = ProtoField.new("Bbo Weight Indicator", "nasdaq.equities.orders.ouch.v5.0.bboweightindicator", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.broken_trade_message = ProtoField.new("Broken Trade Message", "nasdaq.equities.orders.ouch.v5.0.brokentrademessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.broken_trade_reason = ProtoField.new("Broken Trade Reason", "nasdaq.equities.orders.ouch.v5.0.brokentradereason", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.cancel_order_message = ProtoField.new("Cancel Order Message", "nasdaq.equities.orders.ouch.v5.0.cancelordermessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.cancel_order_reason = ProtoField.new("Cancel Order Reason", "nasdaq.equities.orders.ouch.v5.0.cancelorderreason", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.cancel_pending_message = ProtoField.new("Cancel Pending Message", "nasdaq.equities.orders.ouch.v5.0.cancelpendingmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.cancel_reject_message = ProtoField.new("Cancel Reject Message", "nasdaq.equities.orders.ouch.v5.0.cancelrejectmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.canceled_message = ProtoField.new("Canceled Message", "nasdaq.equities.orders.ouch.v5.0.canceledmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.capacity = ProtoField.new("Capacity", "nasdaq.equities.orders.ouch.v5.0.capacity", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.clordid = ProtoField.new("ClOrdId", "nasdaq.equities.orders.ouch.v5.0.clordid", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.cross_type = ProtoField.new("Cross Type", "nasdaq.equities.orders.ouch.v5.0.crosstype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.customer_type = ProtoField.new("Customer Type", "nasdaq.equities.orders.ouch.v5.0.customertype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.debug_packet = ProtoField.new("Debug Packet", "nasdaq.equities.orders.ouch.v5.0.debugpacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.decrement_shares = ProtoField.new("Decrement Shares", "nasdaq.equities.orders.ouch.v5.0.decrementshares", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.discretion = ProtoField.new("Discretion", "nasdaq.equities.orders.ouch.v5.0.discretion", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.discretion_peg_offset = ProtoField.new("Discretion Peg Offset", "nasdaq.equities.orders.ouch.v5.0.discretionpegoffset", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.discretion_peg_type = ProtoField.new("Discretion Peg Type", "nasdaq.equities.orders.ouch.v5.0.discretionpegtype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.discretion_price = ProtoField.new("Discretion Price", "nasdaq.equities.orders.ouch.v5.0.discretionprice", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.display = ProtoField.new("Display", "nasdaq.equities.orders.ouch.v5.0.display", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.display_price = ProtoField.new("Display Price", "nasdaq.equities.orders.ouch.v5.0.displayprice", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.display_quantity = ProtoField.new("Display Quantity", "nasdaq.equities.orders.ouch.v5.0.displayquantity", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.enter_order_appendage = ProtoField.new("Enter Order Appendage", "nasdaq.equities.orders.ouch.v5.0.enterorderappendage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.enter_order_message = ProtoField.new("Enter Order Message", "nasdaq.equities.orders.ouch.v5.0.enterordermessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.enter_order_optional_field = ProtoField.new("Enter Order Optional Field", "nasdaq.equities.orders.ouch.v5.0.enterorderoptionalfield", ftypes.INT8)
nasdaq_equities_orders_ouch_v5_0.fields.enter_order_optional_value = ProtoField.new("Enter Order Optional Value", "nasdaq.equities.orders.ouch.v5.0.enterorderoptionalvalue", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.event_code = ProtoField.new("Event Code", "nasdaq.equities.orders.ouch.v5.0.eventcode", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.execution_price = ProtoField.new("Execution Price", "nasdaq.equities.orders.ouch.v5.0.executionprice", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.expire_time = ProtoField.new("Expire Time", "nasdaq.equities.orders.ouch.v5.0.expiretime", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.firm = ProtoField.new("Firm", "nasdaq.equities.orders.ouch.v5.0.firm", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.handle_inst = ProtoField.new("Handle Inst", "nasdaq.equities.orders.ouch.v5.0.handleinst", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.inter_market_sweep_eligibility = ProtoField.new("Inter Market Sweep Eligibility", "nasdaq.equities.orders.ouch.v5.0.intermarketsweepeligibility", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.liquidity_flag = ProtoField.new("Liquidity Flag", "nasdaq.equities.orders.ouch.v5.0.liquidityflag", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.login_accepted_packet = ProtoField.new("Login Accepted Packet", "nasdaq.equities.orders.ouch.v5.0.loginacceptedpacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.login_rejected_packet = ProtoField.new("Login Rejected Packet", "nasdaq.equities.orders.ouch.v5.0.loginrejectedpacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.login_request_packet = ProtoField.new("Login Request Packet", "nasdaq.equities.orders.ouch.v5.0.loginrequestpacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.match_number = ProtoField.new("Match Number", "nasdaq.equities.orders.ouch.v5.0.matchnumber", ftypes.UINT64)
nasdaq_equities_orders_ouch_v5_0.fields.max_floor = ProtoField.new("Max Floor", "nasdaq.equities.orders.ouch.v5.0.maxfloor", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.min_qty = ProtoField.new("Min Qty", "nasdaq.equities.orders.ouch.v5.0.minqty", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.modify_order_message = ProtoField.new("Modify Order Message", "nasdaq.equities.orders.ouch.v5.0.modifyordermessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.next_user_ref_num = ProtoField.new("Next User Ref Num", "nasdaq.equities.orders.ouch.v5.0.nextuserrefnum", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.optional_field_length = ProtoField.new("Optional Field Length", "nasdaq.equities.orders.ouch.v5.0.optionalfieldlength", ftypes.INT8)
nasdaq_equities_orders_ouch_v5_0.fields.order_accepted_appendage = ProtoField.new("Order Accepted Appendage", "nasdaq.equities.orders.ouch.v5.0.orderacceptedappendage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_accepted_message = ProtoField.new("Order Accepted Message", "nasdaq.equities.orders.ouch.v5.0.orderacceptedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_accepted_optional_field = ProtoField.new("Order Accepted Optional Field", "nasdaq.equities.orders.ouch.v5.0.orderacceptedoptionalfield", ftypes.INT8)
nasdaq_equities_orders_ouch_v5_0.fields.order_accepted_optional_value = ProtoField.new("Order Accepted Optional Value", "nasdaq.equities.orders.ouch.v5.0.orderacceptedoptionalvalue", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_cancel_reason = ProtoField.new("Order Cancel Reason", "nasdaq.equities.orders.ouch.v5.0.ordercancelreason", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_executed_appendage = ProtoField.new("Order Executed Appendage", "nasdaq.equities.orders.ouch.v5.0.orderexecutedappendage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_executed_message = ProtoField.new("Order Executed Message", "nasdaq.equities.orders.ouch.v5.0.orderexecutedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_executed_optional_field = ProtoField.new("Order Executed Optional Field", "nasdaq.equities.orders.ouch.v5.0.orderexecutedoptionalfield", ftypes.INT8)
nasdaq_equities_orders_ouch_v5_0.fields.order_executed_optional_value = ProtoField.new("Order Executed Optional Value", "nasdaq.equities.orders.ouch.v5.0.orderexecutedoptionalvalue", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_modified_message = ProtoField.new("Order Modified Message", "nasdaq.equities.orders.ouch.v5.0.ordermodifiedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_priority_update_message = ProtoField.new("Order Priority Update Message", "nasdaq.equities.orders.ouch.v5.0.orderpriorityupdatemessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_reference_number = ProtoField.new("Order Reference Number", "nasdaq.equities.orders.ouch.v5.0.orderreferencenumber", ftypes.UINT64)
nasdaq_equities_orders_ouch_v5_0.fields.order_restated_appendage = ProtoField.new("Order Restated Appendage", "nasdaq.equities.orders.ouch.v5.0.orderrestatedappendage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_restated_message = ProtoField.new("Order Restated Message", "nasdaq.equities.orders.ouch.v5.0.orderrestatedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_restated_optional_field = ProtoField.new("Order Restated Optional Field", "nasdaq.equities.orders.ouch.v5.0.orderrestatedoptionalfield", ftypes.INT8)
nasdaq_equities_orders_ouch_v5_0.fields.order_restated_optional_value = ProtoField.new("Order Restated Optional Value", "nasdaq.equities.orders.ouch.v5.0.orderrestatedoptionalvalue", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_restated_reason = ProtoField.new("Order Restated Reason", "nasdaq.equities.orders.ouch.v5.0.orderrestatedreason", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.order_state = ProtoField.new("Order State", "nasdaq.equities.orders.ouch.v5.0.orderstate", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.orig_user_ref_num = ProtoField.new("Orig User Ref Num", "nasdaq.equities.orders.ouch.v5.0.origuserrefnum", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.packet = ProtoField.new("Packet", "nasdaq.equities.orders.ouch.v5.0.packet", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.packet_header = ProtoField.new("Packet Header", "nasdaq.equities.orders.ouch.v5.0.packetheader", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.packet_length = ProtoField.new("Packet Length", "nasdaq.equities.orders.ouch.v5.0.packetlength", ftypes.UINT16)
nasdaq_equities_orders_ouch_v5_0.fields.packet_type = ProtoField.new("Packet Type", "nasdaq.equities.orders.ouch.v5.0.packettype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.password = ProtoField.new("Password", "nasdaq.equities.orders.ouch.v5.0.password", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.payload = ProtoField.new("Payload", "nasdaq.equities.orders.ouch.v5.0.payload", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.peg_offset = ProtoField.new("Peg Offset", "nasdaq.equities.orders.ouch.v5.0.pegoffset", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.post_only = ProtoField.new("Post Only", "nasdaq.equities.orders.ouch.v5.0.postonly", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.price = ProtoField.new("Price", "nasdaq.equities.orders.ouch.v5.0.price", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.price_type = ProtoField.new("Price Type", "nasdaq.equities.orders.ouch.v5.0.pricetype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.quantity = ProtoField.new("Quantity", "nasdaq.equities.orders.ouch.v5.0.quantity", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.quantity_prevented_from_trading = ProtoField.new("Quantity Prevented From Trading", "nasdaq.equities.orders.ouch.v5.0.quantitypreventedfromtrading", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.random_reserves = ProtoField.new("Random Reserves", "nasdaq.equities.orders.ouch.v5.0.randomreserves", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.reference_price = ProtoField.new("Reference Price", "nasdaq.equities.orders.ouch.v5.0.referenceprice", ftypes.DOUBLE)
nasdaq_equities_orders_ouch_v5_0.fields.reference_price_type = ProtoField.new("Reference Price Type", "nasdaq.equities.orders.ouch.v5.0.referencepricetype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.reject_reason_code = ProtoField.new("Reject Reason Code", "nasdaq.equities.orders.ouch.v5.0.rejectreasoncode", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.rejected_order_message = ProtoField.new("Rejected Order Message", "nasdaq.equities.orders.ouch.v5.0.rejectedordermessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.rejected_order_reason = ProtoField.new("Rejected Order Reason", "nasdaq.equities.orders.ouch.v5.0.rejectedorderreason", ftypes.UINT16)
nasdaq_equities_orders_ouch_v5_0.fields.replace_order_appendage = ProtoField.new("Replace Order Appendage", "nasdaq.equities.orders.ouch.v5.0.replaceorderappendage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.replace_order_message = ProtoField.new("Replace Order Message", "nasdaq.equities.orders.ouch.v5.0.replaceordermessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.replace_order_optional_field = ProtoField.new("Replace Order Optional Field", "nasdaq.equities.orders.ouch.v5.0.replaceorderoptionalfield", ftypes.INT8)
nasdaq_equities_orders_ouch_v5_0.fields.replace_order_optional_value = ProtoField.new("Replace Order Optional Value", "nasdaq.equities.orders.ouch.v5.0.replaceorderoptionalvalue", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.replaced_message = ProtoField.new("Replaced Message", "nasdaq.equities.orders.ouch.v5.0.replacedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.requested_sequence_number = ProtoField.new("Requested Sequence Number", "nasdaq.equities.orders.ouch.v5.0.requestedsequencenumber", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.requested_session = ProtoField.new("Requested Session", "nasdaq.equities.orders.ouch.v5.0.requestedsession", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.route = ProtoField.new("Route", "nasdaq.equities.orders.ouch.v5.0.route", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.secondary_ord_ref_num = ProtoField.new("Secondary Ord Ref Num", "nasdaq.equities.orders.ouch.v5.0.secondaryordrefnum", ftypes.UINT64)
nasdaq_equities_orders_ouch_v5_0.fields.sequence_number = ProtoField.new("Sequence Number", "nasdaq.equities.orders.ouch.v5.0.sequencenumber", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.sequenced_data_packet = ProtoField.new("Sequenced Data Packet", "nasdaq.equities.orders.ouch.v5.0.sequenceddatapacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.sequenced_message = ProtoField.new("Sequenced Message", "nasdaq.equities.orders.ouch.v5.0.sequencedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.sequenced_message_type = ProtoField.new("Sequenced Message Type", "nasdaq.equities.orders.ouch.v5.0.sequencedmessagetype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.session = ProtoField.new("Session", "nasdaq.equities.orders.ouch.v5.0.session", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.side = ProtoField.new("Side", "nasdaq.equities.orders.ouch.v5.0.side", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.soup_bin_tcp_packet = ProtoField.new("Soup Bin Tcp Packet", "nasdaq.equities.orders.ouch.v5.0.soupbintcppacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.symbol = ProtoField.new("Symbol", "nasdaq.equities.orders.ouch.v5.0.symbol", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.system_event_message = ProtoField.new("System Event Message", "nasdaq.equities.orders.ouch.v5.0.systemeventmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.text = ProtoField.new("Text", "nasdaq.equities.orders.ouch.v5.0.text", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.time_in_force = ProtoField.new("Time In Force", "nasdaq.equities.orders.ouch.v5.0.timeinforce", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.timestamp = ProtoField.new("Timestamp", "nasdaq.equities.orders.ouch.v5.0.timestamp", ftypes.UINT64)
nasdaq_equities_orders_ouch_v5_0.fields.trade_correction_message = ProtoField.new("Trade Correction Message", "nasdaq.equities.orders.ouch.v5.0.tradecorrectionmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.trade_correction_reason = ProtoField.new("Trade Correction Reason", "nasdaq.equities.orders.ouch.v5.0.tradecorrectionreason", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.trade_now = ProtoField.new("Trade Now", "nasdaq.equities.orders.ouch.v5.0.tradenow", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.unsequenced_data_packet = ProtoField.new("Unsequenced Data Packet", "nasdaq.equities.orders.ouch.v5.0.unsequenceddatapacket", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.unsequenced_message = ProtoField.new("Unsequenced Message", "nasdaq.equities.orders.ouch.v5.0.unsequencedmessage", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.unsequenced_message_type = ProtoField.new("Unsequenced Message Type", "nasdaq.equities.orders.ouch.v5.0.unsequencedmessagetype", ftypes.STRING)
nasdaq_equities_orders_ouch_v5_0.fields.user_ref_num = ProtoField.new("User Ref Num", "nasdaq.equities.orders.ouch.v5.0.userrefnum", ftypes.UINT32)
nasdaq_equities_orders_ouch_v5_0.fields.username = ProtoField.new("Username", "nasdaq.equities.orders.ouch.v5.0.username", ftypes.STRING)
-----------------------------------------------------------------------
-- Declare Dissection Options
-----------------------------------------------------------------------
-- Nasdaq Equities Orders Ouch 5.0 Element Dissection Options
show.account_query_response_message = true
show.aiq_canceled_message = true
show.broken_trade_message = true
show.cancel_order_message = true
show.cancel_pending_message = true
show.cancel_reject_message = true
show.canceled_message = true
show.debug_packet = true
show.enter_order_appendage = true
show.enter_order_message = true
show.login_accepted_packet = true
show.login_rejected_packet = true
show.login_request_packet = true
show.modify_order_message = true
show.order_accepted_appendage = true
show.order_accepted_message = true
show.order_executed_appendage = true
show.order_executed_message = true
show.order_modified_message = true
show.order_priority_update_message = true
show.order_restated_appendage = true
show.order_restated_message = true
show.packet = true
show.packet_header = true
show.rejected_order_message = true
show.replace_order_appendage = true
show.replace_order_message = true
show.replaced_message = true
show.sequenced_data_packet = true
show.soup_bin_tcp_packet = true
show.system_event_message = true
show.trade_correction_message = true
show.unsequenced_data_packet = true
show.enter_order_optional_value = false
show.order_accepted_optional_value = false
show.order_executed_optional_value = false
show.order_restated_optional_value = false
show.payload = false
show.replace_order_optional_value = false
show.sequenced_message = false
show.unsequenced_message = false
-- Register Nasdaq Equities Orders Ouch 5.0 Show Options
nasdaq_equities_orders_ouch_v5_0.prefs.show_account_query_response_message = Pref.bool("Show Account Query Response Message", show.account_query_response_message, "Parse and add Account Query Response Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_aiq_canceled_message = Pref.bool("Show Aiq Canceled Message", show.aiq_canceled_message, "Parse and add Aiq Canceled Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_broken_trade_message = Pref.bool("Show Broken Trade Message", show.broken_trade_message, "Parse and add Broken Trade Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_order_message = Pref.bool("Show Cancel Order Message", show.cancel_order_message, "Parse and add Cancel Order Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_pending_message = Pref.bool("Show Cancel Pending Message", show.cancel_pending_message, "Parse and add Cancel Pending Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_reject_message = Pref.bool("Show Cancel Reject Message", show.cancel_reject_message, "Parse and add Cancel Reject Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_canceled_message = Pref.bool("Show Canceled Message", show.canceled_message, "Parse and add Canceled Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_debug_packet = Pref.bool("Show Debug Packet", show.debug_packet, "Parse and add Debug Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_appendage = Pref.bool("Show Enter Order Appendage", show.enter_order_appendage, "Parse and add Enter Order Appendage to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_message = Pref.bool("Show Enter Order Message", show.enter_order_message, "Parse and add Enter Order Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_login_accepted_packet = Pref.bool("Show Login Accepted Packet", show.login_accepted_packet, "Parse and add Login Accepted Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_login_rejected_packet = Pref.bool("Show Login Rejected Packet", show.login_rejected_packet, "Parse and add Login Rejected Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_login_request_packet = Pref.bool("Show Login Request Packet", show.login_request_packet, "Parse and add Login Request Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_modify_order_message = Pref.bool("Show Modify Order Message", show.modify_order_message, "Parse and add Modify Order Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_appendage = Pref.bool("Show Order Accepted Appendage", show.order_accepted_appendage, "Parse and add Order Accepted Appendage to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_message = Pref.bool("Show Order Accepted Message", show.order_accepted_message, "Parse and add Order Accepted Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_appendage = Pref.bool("Show Order Executed Appendage", show.order_executed_appendage, "Parse and add Order Executed Appendage to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_message = Pref.bool("Show Order Executed Message", show.order_executed_message, "Parse and add Order Executed Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_modified_message = Pref.bool("Show Order Modified Message", show.order_modified_message, "Parse and add Order Modified Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_priority_update_message = Pref.bool("Show Order Priority Update Message", show.order_priority_update_message, "Parse and add Order Priority Update Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_appendage = Pref.bool("Show Order Restated Appendage", show.order_restated_appendage, "Parse and add Order Restated Appendage to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_message = Pref.bool("Show Order Restated Message", show.order_restated_message, "Parse and add Order Restated Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_packet = Pref.bool("Show Packet", show.packet, "Parse and add Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_packet_header = Pref.bool("Show Packet Header", show.packet_header, "Parse and add Packet Header to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_rejected_order_message = Pref.bool("Show Rejected Order Message", show.rejected_order_message, "Parse and add Rejected Order Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_appendage = Pref.bool("Show Replace Order Appendage", show.replace_order_appendage, "Parse and add Replace Order Appendage to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_message = Pref.bool("Show Replace Order Message", show.replace_order_message, "Parse and add Replace Order Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_replaced_message = Pref.bool("Show Replaced Message", show.replaced_message, "Parse and add Replaced Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_sequenced_data_packet = Pref.bool("Show Sequenced Data Packet", show.sequenced_data_packet, "Parse and add Sequenced Data Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_soup_bin_tcp_packet = Pref.bool("Show Soup Bin Tcp Packet", show.soup_bin_tcp_packet, "Parse and add Soup Bin Tcp Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_system_event_message = Pref.bool("Show System Event Message", show.system_event_message, "Parse and add System Event Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_trade_correction_message = Pref.bool("Show Trade Correction Message", show.trade_correction_message, "Parse and add Trade Correction Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_unsequenced_data_packet = Pref.bool("Show Unsequenced Data Packet", show.unsequenced_data_packet, "Parse and add Unsequenced Data Packet to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_optional_value = Pref.bool("Show Enter Order Optional Value", show.enter_order_optional_value, "Parse and add Enter Order Optional Value to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_optional_value = Pref.bool("Show Order Accepted Optional Value", show.order_accepted_optional_value, "Parse and add Order Accepted Optional Value to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_optional_value = Pref.bool("Show Order Executed Optional Value", show.order_executed_optional_value, "Parse and add Order Executed Optional Value to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_optional_value = Pref.bool("Show Order Restated Optional Value", show.order_restated_optional_value, "Parse and add Order Restated Optional Value to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_payload = Pref.bool("Show Payload", show.payload, "Parse and add Payload to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_optional_value = Pref.bool("Show Replace Order Optional Value", show.replace_order_optional_value, "Parse and add Replace Order Optional Value to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_sequenced_message = Pref.bool("Show Sequenced Message", show.sequenced_message, "Parse and add Sequenced Message to protocol tree")
nasdaq_equities_orders_ouch_v5_0.prefs.show_unsequenced_message = Pref.bool("Show Unsequenced Message", show.unsequenced_message, "Parse and add Unsequenced Message to protocol tree")
-- Handle changed preferences
function nasdaq_equities_orders_ouch_v5_0.prefs_changed()
local changed = false
-- Check if show options have changed
if show.account_query_response_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_account_query_response_message then
show.account_query_response_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_account_query_response_message
changed = true
end
if show.aiq_canceled_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_aiq_canceled_message then
show.aiq_canceled_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_aiq_canceled_message
changed = true
end
if show.broken_trade_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_broken_trade_message then
show.broken_trade_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_broken_trade_message
changed = true
end
if show.cancel_order_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_order_message then
show.cancel_order_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_order_message
changed = true
end
if show.cancel_pending_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_pending_message then
show.cancel_pending_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_pending_message
changed = true
end
if show.cancel_reject_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_reject_message then
show.cancel_reject_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_cancel_reject_message
changed = true
end
if show.canceled_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_canceled_message then
show.canceled_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_canceled_message
changed = true
end
if show.debug_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_debug_packet then
show.debug_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_debug_packet
changed = true
end
if show.enter_order_appendage ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_appendage then
show.enter_order_appendage = nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_appendage
changed = true
end
if show.enter_order_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_message then
show.enter_order_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_message
changed = true
end
if show.login_accepted_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_login_accepted_packet then
show.login_accepted_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_login_accepted_packet
changed = true
end
if show.login_rejected_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_login_rejected_packet then
show.login_rejected_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_login_rejected_packet
changed = true
end
if show.login_request_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_login_request_packet then
show.login_request_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_login_request_packet
changed = true
end
if show.modify_order_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_modify_order_message then
show.modify_order_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_modify_order_message
changed = true
end
if show.order_accepted_appendage ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_appendage then
show.order_accepted_appendage = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_appendage
changed = true
end
if show.order_accepted_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_message then
show.order_accepted_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_message
changed = true
end
if show.order_executed_appendage ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_appendage then
show.order_executed_appendage = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_appendage
changed = true
end
if show.order_executed_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_message then
show.order_executed_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_message
changed = true
end
if show.order_modified_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_modified_message then
show.order_modified_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_modified_message
changed = true
end
if show.order_priority_update_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_priority_update_message then
show.order_priority_update_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_priority_update_message
changed = true
end
if show.order_restated_appendage ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_appendage then
show.order_restated_appendage = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_appendage
changed = true
end
if show.order_restated_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_message then
show.order_restated_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_message
changed = true
end
if show.packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_packet then
show.packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_packet
changed = true
end
if show.packet_header ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_packet_header then
show.packet_header = nasdaq_equities_orders_ouch_v5_0.prefs.show_packet_header
changed = true
end
if show.rejected_order_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_rejected_order_message then
show.rejected_order_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_rejected_order_message
changed = true
end
if show.replace_order_appendage ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_appendage then
show.replace_order_appendage = nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_appendage
changed = true
end
if show.replace_order_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_message then
show.replace_order_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_message
changed = true
end
if show.replaced_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_replaced_message then
show.replaced_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_replaced_message
changed = true
end
if show.sequenced_data_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_sequenced_data_packet then
show.sequenced_data_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_sequenced_data_packet
changed = true
end
if show.soup_bin_tcp_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_soup_bin_tcp_packet then
show.soup_bin_tcp_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_soup_bin_tcp_packet
changed = true
end
if show.system_event_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_system_event_message then
show.system_event_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_system_event_message
changed = true
end
if show.trade_correction_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_trade_correction_message then
show.trade_correction_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_trade_correction_message
changed = true
end
if show.unsequenced_data_packet ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_unsequenced_data_packet then
show.unsequenced_data_packet = nasdaq_equities_orders_ouch_v5_0.prefs.show_unsequenced_data_packet
changed = true
end
if show.enter_order_optional_value ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_optional_value then
show.enter_order_optional_value = nasdaq_equities_orders_ouch_v5_0.prefs.show_enter_order_optional_value
changed = true
end
if show.order_accepted_optional_value ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_optional_value then
show.order_accepted_optional_value = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_accepted_optional_value
changed = true
end
if show.order_executed_optional_value ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_optional_value then
show.order_executed_optional_value = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_executed_optional_value
changed = true
end
if show.order_restated_optional_value ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_optional_value then
show.order_restated_optional_value = nasdaq_equities_orders_ouch_v5_0.prefs.show_order_restated_optional_value
changed = true
end
if show.payload ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_payload then
show.payload = nasdaq_equities_orders_ouch_v5_0.prefs.show_payload
changed = true
end
if show.replace_order_optional_value ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_optional_value then
show.replace_order_optional_value = nasdaq_equities_orders_ouch_v5_0.prefs.show_replace_order_optional_value
changed = true
end
if show.sequenced_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_sequenced_message then
show.sequenced_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_sequenced_message
changed = true
end
if show.unsequenced_message ~= nasdaq_equities_orders_ouch_v5_0.prefs.show_unsequenced_message then
show.unsequenced_message = nasdaq_equities_orders_ouch_v5_0.prefs.show_unsequenced_message
changed = true
end
-- Reload on changed preference
if changed then
reload()
end
end
-----------------------------------------------------------------------
-- Protocol Functions
-----------------------------------------------------------------------
-- trim trailing spaces
trim_right_spaces = function(str)
local finish = str:len()
for i = 1, finish do
if str:byte(i) == 0x20 then
return str:sub(1, i - 1)
end
end
return str
end
-----------------------------------------------------------------------
-- Dissect Nasdaq Equities Orders Ouch 5.0
-----------------------------------------------------------------------
-- Size: Quantity
nasdaq_equities_orders_ouch_v5_0_size_of.quantity = 4
-- Display: Quantity
nasdaq_equities_orders_ouch_v5_0_display.quantity = function(value)
return "Quantity: "..value
end
-- Dissect: Quantity
nasdaq_equities_orders_ouch_v5_0_dissect.quantity = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.quantity
local range = buffer(offset, length)
local value = range:uint()
local display = nasdaq_equities_orders_ouch_v5_0_display.quantity(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.quantity, range, value, display)
return offset + length, value
end
-- Size: Side
nasdaq_equities_orders_ouch_v5_0_size_of.side = 1
-- Display: Side
nasdaq_equities_orders_ouch_v5_0_display.side = function(value)
if value == "B" then
return "Side: Buy (B)"
end
if value == "S" then
return "Side: Sell (S)"
end
if value == "T" then
return "Side: Sell Short (T)"
end
if value == "E" then
return "Side: Sell Short Exempt (E)"
end
return "Side: Unknown("..value..")"
end
-- Dissect: Side
nasdaq_equities_orders_ouch_v5_0_dissect.side = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.side
local range = buffer(offset, length)
local value = range:string()
local display = nasdaq_equities_orders_ouch_v5_0_display.side(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.side, range, value, display)
return offset + length, value
end
-- Size: User Ref Num
nasdaq_equities_orders_ouch_v5_0_size_of.user_ref_num = 4
-- Display: User Ref Num
nasdaq_equities_orders_ouch_v5_0_display.user_ref_num = function(value)
return "User Ref Num: "..value
end
-- Dissect: User Ref Num
nasdaq_equities_orders_ouch_v5_0_dissect.user_ref_num = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.user_ref_num
local range = buffer(offset, length)
local value = range:uint()
local display = nasdaq_equities_orders_ouch_v5_0_display.user_ref_num(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.user_ref_num, range, value, display)
return offset + length, value
end
-- Calculate size of: Modify Order Message
nasdaq_equities_orders_ouch_v5_0_size_of.modify_order_message = function(buffer, offset)
local index = 0
index = index + nasdaq_equities_orders_ouch_v5_0_size_of.user_ref_num
index = index + nasdaq_equities_orders_ouch_v5_0_size_of.side
index = index + nasdaq_equities_orders_ouch_v5_0_size_of.quantity
return index
end
-- Display: Modify Order Message
nasdaq_equities_orders_ouch_v5_0_display.modify_order_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Modify Order Message
nasdaq_equities_orders_ouch_v5_0_dissect.modify_order_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- User Ref Num: 4 Byte Unsigned Fixed Width Integer
index, user_ref_num = nasdaq_equities_orders_ouch_v5_0_dissect.user_ref_num(buffer, index, packet, parent)
-- Side: 1 Byte Ascii String Enum with 4 values
index, side = nasdaq_equities_orders_ouch_v5_0_dissect.side(buffer, index, packet, parent)
-- Quantity: 4 Byte Unsigned Fixed Width Integer
index, quantity = nasdaq_equities_orders_ouch_v5_0_dissect.quantity(buffer, index, packet, parent)
return index
end
-- Dissect: Modify Order Message
nasdaq_equities_orders_ouch_v5_0_dissect.modify_order_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.modify_order_message then
local length = nasdaq_equities_orders_ouch_v5_0_size_of.modify_order_message(buffer, offset)
local range = buffer(offset, length)
local display = nasdaq_equities_orders_ouch_v5_0_display.modify_order_message(buffer, packet, parent)
parent = parent:add(nasdaq_equities_orders_ouch_v5_0.fields.modify_order_message, range, display)
end
return nasdaq_equities_orders_ouch_v5_0_dissect.modify_order_message_fields(buffer, offset, packet, parent)
end
-- Calculate size of: Cancel Order Message
nasdaq_equities_orders_ouch_v5_0_size_of.cancel_order_message = function(buffer, offset)
local index = 0
index = index + nasdaq_equities_orders_ouch_v5_0_size_of.user_ref_num
index = index + nasdaq_equities_orders_ouch_v5_0_size_of.quantity
return index
end
-- Display: Cancel Order Message
nasdaq_equities_orders_ouch_v5_0_display.cancel_order_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Cancel Order Message
nasdaq_equities_orders_ouch_v5_0_dissect.cancel_order_message_fields = function(buffer, offset, packet, parent)
local index = offset
-- User Ref Num: 4 Byte Unsigned Fixed Width Integer
index, user_ref_num = nasdaq_equities_orders_ouch_v5_0_dissect.user_ref_num(buffer, index, packet, parent)
-- Quantity: 4 Byte Unsigned Fixed Width Integer
index, quantity = nasdaq_equities_orders_ouch_v5_0_dissect.quantity(buffer, index, packet, parent)
return index
end
-- Dissect: Cancel Order Message
nasdaq_equities_orders_ouch_v5_0_dissect.cancel_order_message = function(buffer, offset, packet, parent)
-- Optionally add struct element to protocol tree
if show.cancel_order_message then
local length = nasdaq_equities_orders_ouch_v5_0_size_of.cancel_order_message(buffer, offset)
local range = buffer(offset, length)
local display = nasdaq_equities_orders_ouch_v5_0_display.cancel_order_message(buffer, packet, parent)
parent = parent:add(nasdaq_equities_orders_ouch_v5_0.fields.cancel_order_message, range, display)
end
return nasdaq_equities_orders_ouch_v5_0_dissect.cancel_order_message_fields(buffer, offset, packet, parent)
end
-- Size: Handle Inst
nasdaq_equities_orders_ouch_v5_0_size_of.handle_inst = 1
-- Display: Handle Inst
nasdaq_equities_orders_ouch_v5_0_display.handle_inst = function(value)
return "Handle Inst: "..value
end
-- Dissect: Handle Inst
nasdaq_equities_orders_ouch_v5_0_dissect.handle_inst = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.handle_inst
local range = buffer(offset, length)
local value = range:string()
local display = nasdaq_equities_orders_ouch_v5_0_display.handle_inst(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.handle_inst, range, value, display)
return offset + length, value
end
-- Size: Trade Now
nasdaq_equities_orders_ouch_v5_0_size_of.trade_now = 1
-- Display: Trade Now
nasdaq_equities_orders_ouch_v5_0_display.trade_now = function(value)
return "Trade Now: "..value
end
-- Dissect: Trade Now
nasdaq_equities_orders_ouch_v5_0_dissect.trade_now = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.trade_now
local range = buffer(offset, length)
local value = range:string()
local display = nasdaq_equities_orders_ouch_v5_0_display.trade_now(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.trade_now, range, value, display)
return offset + length, value
end
-- Size: Expire Time
nasdaq_equities_orders_ouch_v5_0_size_of.expire_time = 4
-- Display: Expire Time
nasdaq_equities_orders_ouch_v5_0_display.expire_time = function(value)
return "Expire Time: "..value
end
-- Dissect: Expire Time
nasdaq_equities_orders_ouch_v5_0_dissect.expire_time = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.expire_time
local range = buffer(offset, length)
local value = range:uint()
local display = nasdaq_equities_orders_ouch_v5_0_display.expire_time(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.expire_time, range, value, display)
return offset + length, value
end
-- Size: Post Only
nasdaq_equities_orders_ouch_v5_0_size_of.post_only = 1
-- Display: Post Only
nasdaq_equities_orders_ouch_v5_0_display.post_only = function(value)
return "Post Only: "..value
end
-- Dissect: Post Only
nasdaq_equities_orders_ouch_v5_0_dissect.post_only = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.post_only
local range = buffer(offset, length)
local value = range:string()
local display = nasdaq_equities_orders_ouch_v5_0_display.post_only(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.post_only, range, value, display)
return offset + length, value
end
-- Size: Price Type
nasdaq_equities_orders_ouch_v5_0_size_of.price_type = 1
-- Display: Price Type
nasdaq_equities_orders_ouch_v5_0_display.price_type = function(value)
return "Price Type: "..value
end
-- Dissect: Price Type
nasdaq_equities_orders_ouch_v5_0_dissect.price_type = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.price_type
local range = buffer(offset, length)
local value = range:string()
local display = nasdaq_equities_orders_ouch_v5_0_display.price_type(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.price_type, range, value, display)
return offset + length, value
end
-- Size: Max Floor
nasdaq_equities_orders_ouch_v5_0_size_of.max_floor = 4
-- Display: Max Floor
nasdaq_equities_orders_ouch_v5_0_display.max_floor = function(value)
return "Max Floor: "..value
end
-- Dissect: Max Floor
nasdaq_equities_orders_ouch_v5_0_dissect.max_floor = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.max_floor
local range = buffer(offset, length)
local value = range:uint()
local display = nasdaq_equities_orders_ouch_v5_0_display.max_floor(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.max_floor, range, value, display)
return offset + length, value
end
-- Size: Min Qty
nasdaq_equities_orders_ouch_v5_0_size_of.min_qty = 4
-- Display: Min Qty
nasdaq_equities_orders_ouch_v5_0_display.min_qty = function(value)
return "Min Qty: "..value
end
-- Dissect: Min Qty
nasdaq_equities_orders_ouch_v5_0_dissect.min_qty = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.min_qty
local range = buffer(offset, length)
local value = range:uint()
local display = nasdaq_equities_orders_ouch_v5_0_display.min_qty(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.min_qty, range, value, display)
return offset + length, value
end
-- Calculate runtime size of: Replace Order Optional Value
nasdaq_equities_orders_ouch_v5_0_size_of.replace_order_optional_value = function(buffer, offset, replace_order_optional_field)
-- Size of Min Qty
if replace_order_optional_field == 3 then
return nasdaq_equities_orders_ouch_v5_0_size_of.min_qty(buffer, offset)
end
-- Size of Max Floor
if replace_order_optional_field == 5 then
return nasdaq_equities_orders_ouch_v5_0_size_of.max_floor(buffer, offset)
end
-- Size of Price Type
if replace_order_optional_field == 6 then
return nasdaq_equities_orders_ouch_v5_0_size_of.price_type(buffer, offset)
end
-- Size of Post Only
if replace_order_optional_field == 12 then
return nasdaq_equities_orders_ouch_v5_0_size_of.post_only(buffer, offset)
end
-- Size of Expire Time
if replace_order_optional_field == 15 then
return nasdaq_equities_orders_ouch_v5_0_size_of.expire_time(buffer, offset)
end
-- Size of Trade Now
if replace_order_optional_field == 16 then
return nasdaq_equities_orders_ouch_v5_0_size_of.trade_now(buffer, offset)
end
-- Size of Handle Inst
if replace_order_optional_field == 17 then
return nasdaq_equities_orders_ouch_v5_0_size_of.handle_inst(buffer, offset)
end
return 0
end
-- Display: Replace Order Optional Value
nasdaq_equities_orders_ouch_v5_0_display.replace_order_optional_value = function(buffer, offset, packet, parent)
return ""
end
-- Dissect Branches: Replace Order Optional Value
nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_value_branches = function(buffer, offset, packet, parent, replace_order_optional_field)
-- Dissect Min Qty
if replace_order_optional_field == 3 then
return nasdaq_equities_orders_ouch_v5_0_dissect.min_qty(buffer, offset, packet, parent)
end
-- Dissect Max Floor
if replace_order_optional_field == 5 then
return nasdaq_equities_orders_ouch_v5_0_dissect.max_floor(buffer, offset, packet, parent)
end
-- Dissect Price Type
if replace_order_optional_field == 6 then
return nasdaq_equities_orders_ouch_v5_0_dissect.price_type(buffer, offset, packet, parent)
end
-- Dissect Post Only
if replace_order_optional_field == 12 then
return nasdaq_equities_orders_ouch_v5_0_dissect.post_only(buffer, offset, packet, parent)
end
-- Dissect Expire Time
if replace_order_optional_field == 15 then
return nasdaq_equities_orders_ouch_v5_0_dissect.expire_time(buffer, offset, packet, parent)
end
-- Dissect Trade Now
if replace_order_optional_field == 16 then
return nasdaq_equities_orders_ouch_v5_0_dissect.trade_now(buffer, offset, packet, parent)
end
-- Dissect Handle Inst
if replace_order_optional_field == 17 then
return nasdaq_equities_orders_ouch_v5_0_dissect.handle_inst(buffer, offset, packet, parent)
end
return offset
end
-- Dissect: Replace Order Optional Value
nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_value = function(buffer, offset, packet, parent, replace_order_optional_field)
if not show.replace_order_optional_value then
return nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_value_branches(buffer, offset, packet, parent, replace_order_optional_field)
end
-- Calculate size and check that branch is not empty
local size = nasdaq_equities_orders_ouch_v5_0_size_of.replace_order_optional_value(buffer, offset, replace_order_optional_field)
if size == 0 then
return offset
end
-- Dissect Element
local range = buffer(offset, size)
local display = nasdaq_equities_orders_ouch_v5_0_display.replace_order_optional_value(buffer, packet, parent)
local element = parent:add(nasdaq_equities_orders_ouch_v5_0.fields.replace_order_optional_value, range, display)
return nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_value_branches(buffer, offset, packet, parent, replace_order_optional_field)
end
-- Size: Replace Order Optional Field
nasdaq_equities_orders_ouch_v5_0_size_of.replace_order_optional_field = 1
-- Display: Replace Order Optional Field
nasdaq_equities_orders_ouch_v5_0_display.replace_order_optional_field = function(value)
if value == 3 then
return "Replace Order Optional Field: Min Qty (3)"
end
if value == 5 then
return "Replace Order Optional Field: Max Floor (5)"
end
if value == 6 then
return "Replace Order Optional Field: Price Type (6)"
end
if value == 12 then
return "Replace Order Optional Field: Post Only (12)"
end
if value == 15 then
return "Replace Order Optional Field: Expire Time (15)"
end
if value == 16 then
return "Replace Order Optional Field: Trade Now (16)"
end
if value == 17 then
return "Replace Order Optional Field: Handle Inst (17)"
end
return "Replace Order Optional Field: Unknown("..value..")"
end
-- Dissect: Replace Order Optional Field
nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_field = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.replace_order_optional_field
local range = buffer(offset, length)
local value = range:int()
local display = nasdaq_equities_orders_ouch_v5_0_display.replace_order_optional_field(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.replace_order_optional_field, range, value, display)
return offset + length, value
end
-- Size: Optional Field Length
nasdaq_equities_orders_ouch_v5_0_size_of.optional_field_length = 1
-- Display: Optional Field Length
nasdaq_equities_orders_ouch_v5_0_display.optional_field_length = function(value)
return "Optional Field Length: "..value
end
-- Dissect: Optional Field Length
nasdaq_equities_orders_ouch_v5_0_dissect.optional_field_length = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.optional_field_length
local range = buffer(offset, length)
local value = range:int()
local display = nasdaq_equities_orders_ouch_v5_0_display.optional_field_length(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.optional_field_length, range, value, display)
return offset + length, value
end
-- Display: Replace Order Appendage
nasdaq_equities_orders_ouch_v5_0_display.replace_order_appendage = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Replace Order Appendage
nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_appendage_fields = function(buffer, offset, packet, parent, size_of_replace_order_appendage)
local index = offset
-- Optional Field Length: 1 Byte Signed Fixed Width Integer
index, optional_field_length = nasdaq_equities_orders_ouch_v5_0_dissect.optional_field_length(buffer, index, packet, parent)
-- Replace Order Optional Field: 1 Byte Signed Fixed Width Integer Enum with 7 values
index, replace_order_optional_field = nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_field(buffer, index, packet, parent)
-- Replace Order Optional Value: Runtime Type with 7 branches
index = nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_optional_value(buffer, index, packet, parent, replace_order_optional_field)
return index
end
-- Dissect: Replace Order Appendage
nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_appendage = function(buffer, offset, packet, parent, size_of_replace_order_appendage)
-- Optionally add struct element to protocol tree
if show.replace_order_appendage then
local range = buffer(offset, size_of_replace_order_appendage)
local display = nasdaq_equities_orders_ouch_v5_0_display.replace_order_appendage(buffer, packet, parent)
parent = parent:add(nasdaq_equities_orders_ouch_v5_0.fields.replace_order_appendage, range, display)
end
nasdaq_equities_orders_ouch_v5_0_dissect.replace_order_appendage_fields(buffer, offset, packet, parent, size_of_replace_order_appendage)
return offset + size_of_replace_order_appendage
end
-- Size: Appendage Length
nasdaq_equities_orders_ouch_v5_0_size_of.appendage_length = 2
-- Display: Appendage Length
nasdaq_equities_orders_ouch_v5_0_display.appendage_length = function(value)
return "Appendage Length: "..value
end
-- Dissect: Appendage Length
nasdaq_equities_orders_ouch_v5_0_dissect.appendage_length = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.appendage_length
local range = buffer(offset, length)
local value = range:uint()
local display = nasdaq_equities_orders_ouch_v5_0_display.appendage_length(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.appendage_length, range, value, display)
return offset + length, value
end
-- Size: ClOrdId
nasdaq_equities_orders_ouch_v5_0_size_of.clordid = 14
-- Display: ClOrdId
nasdaq_equities_orders_ouch_v5_0_display.clordid = function(value)
return "ClOrdId: "..value
end
-- Dissect: ClOrdId
nasdaq_equities_orders_ouch_v5_0_dissect.clordid = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.clordid
local range = buffer(offset, length)
local value = trim_right_spaces(range:string())
local display = nasdaq_equities_orders_ouch_v5_0_display.clordid(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.clordid, range, value, display)
return offset + length, value
end
-- Size: Inter Market Sweep Eligibility
nasdaq_equities_orders_ouch_v5_0_size_of.inter_market_sweep_eligibility = 1
-- Display: Inter Market Sweep Eligibility
nasdaq_equities_orders_ouch_v5_0_display.inter_market_sweep_eligibility = function(value)
if value == "Y" then
return "Inter Market Sweep Eligibility: Eligible (Y)"
end
if value == "N" then
return "Inter Market Sweep Eligibility: Not Eligible (N)"
end
return "Inter Market Sweep Eligibility: Unknown("..value..")"
end
-- Dissect: Inter Market Sweep Eligibility
nasdaq_equities_orders_ouch_v5_0_dissect.inter_market_sweep_eligibility = function(buffer, offset, packet, parent)
local length = nasdaq_equities_orders_ouch_v5_0_size_of.inter_market_sweep_eligibility
local range = buffer(offset, length)
local value = range:string()
local display = nasdaq_equities_orders_ouch_v5_0_display.inter_market_sweep_eligibility(value, buffer, offset, packet, parent)
parent:add(nasdaq_equities_orders_ouch_v5_0.fields.inter_market_sweep_eligibility, range, value, display)
return offset + length, value
end
-- Size: Display
nasdaq_equities_orders_ouch_v5_0_size_of.display = 1
-- Display: Display
nasdaq_equities_orders_ouch_v5_0_display.display = function(value)
if value == "A" then
return "Display: Attributable (A)"
end
if value == "Y" then
return "Display: Visible (Y)"
end
if value == "N" then
return "Display: Hidden (N)"
end
if value == "P" then
return "Display: Post Only (P)"
end
if value == "I" then