/
Siac.Cqs.Snapshot.Cta.v1.0.Script.Dissector.lua
3002 lines (2437 loc) · 123 KB
/
Siac.Cqs.Snapshot.Cta.v1.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
-----------------------------------------------------------------------
-- Siac Cqs Snapshot Cta 1.0 Protocol
local siac_cqs_snapshot_cta_v1_0 = Proto("Siac.Cqs.Snapshot.Cta.v1.0.Lua", "Siac Cqs Snapshot Cta 1.0")
-- Component Tables
local show = {}
local format = {}
local siac_cqs_snapshot_cta_v1_0_display = {}
local siac_cqs_snapshot_cta_v1_0_dissect = {}
local siac_cqs_snapshot_cta_v1_0_size_of = {}
local verify = {}
local translate = {}
-----------------------------------------------------------------------
-- Declare Protocol Fields
-----------------------------------------------------------------------
-- Siac Cqs Snapshot Cta 1.0 Fields
siac_cqs_snapshot_cta_v1_0.fields.auction_collar_lower_threshold_price = ProtoField.new("Auction Collar Lower Threshold Price", "siac.cqs.snapshot.cta.v1.0.auctioncollarlowerthresholdprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.auction_collar_reference_price = ProtoField.new("Auction Collar Reference Price", "siac.cqs.snapshot.cta.v1.0.auctioncollarreferenceprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.auction_collar_upper_threshold_price = ProtoField.new("Auction Collar Upper Threshold Price", "siac.cqs.snapshot.cta.v1.0.auctioncollarupperthresholdprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.bid_price = ProtoField.new("Bid Price", "siac.cqs.snapshot.cta.v1.0.bidprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.bid_size = ProtoField.new("Bid Size", "siac.cqs.snapshot.cta.v1.0.bidsize", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.block_checksum = ProtoField.new("Block Checksum", "siac.cqs.snapshot.cta.v1.0.blockchecksum", ftypes.UINT16)
siac_cqs_snapshot_cta_v1_0.fields.block_header = ProtoField.new("Block Header", "siac.cqs.snapshot.cta.v1.0.blockheader", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.block_pad_byte = ProtoField.new("Block Pad Byte", "siac.cqs.snapshot.cta.v1.0.blockpadbyte", ftypes.UINT8)
siac_cqs_snapshot_cta_v1_0.fields.block_sequence_number = ProtoField.new("Block Sequence Number", "siac.cqs.snapshot.cta.v1.0.blocksequencenumber", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.block_size = ProtoField.new("Block Size", "siac.cqs.snapshot.cta.v1.0.blocksize", ftypes.UINT16)
siac_cqs_snapshot_cta_v1_0.fields.consolidated_snapshot_message = ProtoField.new("Consolidated Snapshot Message", "siac.cqs.snapshot.cta.v1.0.consolidatedsnapshotmessage", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.delivery_flag = ProtoField.new("Delivery Flag", "siac.cqs.snapshot.cta.v1.0.deliveryflag", ftypes.UINT8)
siac_cqs_snapshot_cta_v1_0.fields.financial_status_indicator = ProtoField.new("Financial Status Indicator", "siac.cqs.snapshot.cta.v1.0.financialstatusindicator", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.finra_bbo_luld_indicator = ProtoField.new("Finra Bbo Luld Indicator", "siac.cqs.snapshot.cta.v1.0.finrabboluldindicator", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_market_maker_id = ProtoField.new("Finra Best Bid Market Maker Id", "siac.cqs.snapshot.cta.v1.0.finrabestbidmarketmakerid", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_price = ProtoField.new("Finra Best Bid Price", "siac.cqs.snapshot.cta.v1.0.finrabestbidprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_quote_condition = ProtoField.new("Finra Best Bid Quote Condition", "siac.cqs.snapshot.cta.v1.0.finrabestbidquotecondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_size = ProtoField.new("Finra Best Bid Size", "siac.cqs.snapshot.cta.v1.0.finrabestbidsize", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_market_maker_id = ProtoField.new("Finra Best Offer Market Maker Id", "siac.cqs.snapshot.cta.v1.0.finrabestoffermarketmakerid", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_price = ProtoField.new("Finra Best Offer Price", "siac.cqs.snapshot.cta.v1.0.finrabestofferprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_quote_condition = ProtoField.new("Finra Best Offer Quote Condition", "siac.cqs.snapshot.cta.v1.0.finrabestofferquotecondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_size = ProtoField.new("Finra Best Offer Size", "siac.cqs.snapshot.cta.v1.0.finrabestoffersize", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.finra_snapshot_message = ProtoField.new("Finra Snapshot Message", "siac.cqs.snapshot.cta.v1.0.finrasnapshotmessage", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.future = ProtoField.new("Future", "siac.cqs.snapshot.cta.v1.0.future", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.halt_reason = ProtoField.new("Halt Reason", "siac.cqs.snapshot.cta.v1.0.haltreason", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.high_indication_price = ProtoField.new("High Indication Price", "siac.cqs.snapshot.cta.v1.0.highindicationprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.instrument_type = ProtoField.new("Instrument Type", "siac.cqs.snapshot.cta.v1.0.instrumenttype", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.last_seq_num = ProtoField.new("Last Seq Num", "siac.cqs.snapshot.cta.v1.0.lastseqnum", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.line_integrity_message = ProtoField.new("Line Integrity Message", "siac.cqs.snapshot.cta.v1.0.lineintegritymessage", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.low_indication_price = ProtoField.new("Low Indication Price", "siac.cqs.snapshot.cta.v1.0.lowindicationprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.lower_limit_price_band = ProtoField.new("Lower Limit Price Band", "siac.cqs.snapshot.cta.v1.0.lowerlimitpriceband", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.luld_indicator = ProtoField.new("Luld Indicator", "siac.cqs.snapshot.cta.v1.0.luldindicator", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.market_condition = ProtoField.new("Market Condition", "siac.cqs.snapshot.cta.v1.0.marketcondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.market_wide_circuit_breaker_decline_level_status_snapshot_message = ProtoField.new("Market Wide Circuit Breaker Decline Level Status Snapshot Message", "siac.cqs.snapshot.cta.v1.0.marketwidecircuitbreakerdeclinelevelstatussnapshotmessage", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.message = ProtoField.new("Message", "siac.cqs.snapshot.cta.v1.0.message", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.message_category = ProtoField.new("Message Category", "siac.cqs.snapshot.cta.v1.0.messagecategory", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.message_header = ProtoField.new("Message Header", "siac.cqs.snapshot.cta.v1.0.messageheader", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.message_length = ProtoField.new("Message Length", "siac.cqs.snapshot.cta.v1.0.messagelength", ftypes.UINT16)
siac_cqs_snapshot_cta_v1_0.fields.messages_in_block = ProtoField.new("Messages In Block", "siac.cqs.snapshot.cta.v1.0.messagesinblock", ftypes.UINT8)
siac_cqs_snapshot_cta_v1_0.fields.mwcb_level_2 = ProtoField.new("Mwcb Level 2", "siac.cqs.snapshot.cta.v1.0.mwcblevel2", ftypes.INT64)
siac_cqs_snapshot_cta_v1_0.fields.mwcb_level_3 = ProtoField.new("Mwcb Level 3", "siac.cqs.snapshot.cta.v1.0.mwcblevel3", ftypes.INT64)
siac_cqs_snapshot_cta_v1_0.fields.nanoseconds = ProtoField.new("Nanoseconds", "siac.cqs.snapshot.cta.v1.0.nanoseconds", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.national_bbo_luld_indicator = ProtoField.new("National Bbo Luld Indicator", "siac.cqs.snapshot.cta.v1.0.nationalbboluldindicator", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.national_best_bid_participant_id = ProtoField.new("National Best Bid Participant Id", "siac.cqs.snapshot.cta.v1.0.nationalbestbidparticipantid", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.national_best_bid_price = ProtoField.new("National Best Bid Price", "siac.cqs.snapshot.cta.v1.0.nationalbestbidprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.national_best_bid_quote_condition = ProtoField.new("National Best Bid Quote Condition", "siac.cqs.snapshot.cta.v1.0.nationalbestbidquotecondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.national_best_bid_size = ProtoField.new("National Best Bid Size", "siac.cqs.snapshot.cta.v1.0.nationalbestbidsize", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.national_best_offer_participant_id = ProtoField.new("National Best Offer Participant Id", "siac.cqs.snapshot.cta.v1.0.nationalbestofferparticipantid", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.national_best_offer_price = ProtoField.new("National Best Offer Price", "siac.cqs.snapshot.cta.v1.0.nationalbestofferprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.national_best_offer_quote_condition = ProtoField.new("National Best Offer Quote Condition", "siac.cqs.snapshot.cta.v1.0.nationalbestofferquotecondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.national_best_offer_size = ProtoField.new("National Best Offer Size", "siac.cqs.snapshot.cta.v1.0.nationalbestoffersize", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.number_of_extensions = ProtoField.new("Number Of Extensions", "siac.cqs.snapshot.cta.v1.0.numberofextensions", ftypes.UINT8)
siac_cqs_snapshot_cta_v1_0.fields.offer_price = ProtoField.new("Offer Price", "siac.cqs.snapshot.cta.v1.0.offerprice", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.packet = ProtoField.new("Packet", "siac.cqs.snapshot.cta.v1.0.packet", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.participant_id = ProtoField.new("Participant Id", "siac.cqs.snapshot.cta.v1.0.participantid", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.participant_snapshot_message = ProtoField.new("Participant Snapshot Message", "siac.cqs.snapshot.cta.v1.0.participantsnapshotmessage", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.payload = ProtoField.new("Payload", "siac.cqs.snapshot.cta.v1.0.payload", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.primary_listing_market_participant_id = ProtoField.new("Primary Listing Market Participant Id", "siac.cqs.snapshot.cta.v1.0.primarylistingmarketparticipantid", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.quote_condition = ProtoField.new("Quote Condition", "siac.cqs.snapshot.cta.v1.0.quotecondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.reserved = ProtoField.new("Reserved", "siac.cqs.snapshot.cta.v1.0.reserved", ftypes.UINT8)
siac_cqs_snapshot_cta_v1_0.fields.retail_interest_indicator = ProtoField.new("Retail Interest Indicator", "siac.cqs.snapshot.cta.v1.0.retailinterestindicator", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.seconds = ProtoField.new("Seconds", "siac.cqs.snapshot.cta.v1.0.seconds", ftypes.UINT32)
siac_cqs_snapshot_cta_v1_0.fields.security_symbol = ProtoField.new("Security Symbol", "siac.cqs.snapshot.cta.v1.0.securitysymbol", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.settlement_condition = ProtoField.new("Settlement Condition", "siac.cqs.snapshot.cta.v1.0.settlementcondition", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.short_sale_restriction_indicator = ProtoField.new("Short Sale Restriction Indicator", "siac.cqs.snapshot.cta.v1.0.shortsalerestrictionindicator", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.sip_block_timestamp = ProtoField.new("Sip Block Timestamp", "siac.cqs.snapshot.cta.v1.0.sipblocktimestamp", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.snapshot = ProtoField.new("Snapshot", "siac.cqs.snapshot.cta.v1.0.snapshot", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.snapshot_message_type = ProtoField.new("Snapshot Message Type", "siac.cqs.snapshot.cta.v1.0.snapshotmessagetype", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.snapshot_payload = ProtoField.new("Snapshot Payload", "siac.cqs.snapshot.cta.v1.0.snapshotpayload", ftypes.STRING)
siac_cqs_snapshot_cta_v1_0.fields.tot_pub_seq_rollover = ProtoField.new("Tot Pub Seq Rollover", "siac.cqs.snapshot.cta.v1.0.totpubseqrollover", ftypes.UINT8)
siac_cqs_snapshot_cta_v1_0.fields.upper_limit_price_band = ProtoField.new("Upper Limit Price Band", "siac.cqs.snapshot.cta.v1.0.upperlimitpriceband", ftypes.DOUBLE)
siac_cqs_snapshot_cta_v1_0.fields.version = ProtoField.new("Version", "siac.cqs.snapshot.cta.v1.0.version", ftypes.UINT8)
-----------------------------------------------------------------------
-- Declare Dissection Options
-----------------------------------------------------------------------
-- Siac Cqs Snapshot Cta 1.0 Element Dissection Options
show.block_header = true
show.consolidated_snapshot_message = true
show.finra_snapshot_message = true
show.line_integrity_message = true
show.market_wide_circuit_breaker_decline_level_status_snapshot_message = true
show.message = true
show.message_header = true
show.packet = true
show.participant_snapshot_message = true
show.sip_block_timestamp = true
show.snapshot = true
show.payload = false
show.snapshot_payload = false
-- Register Siac Cqs Snapshot Cta 1.0 Show Options
siac_cqs_snapshot_cta_v1_0.prefs.show_block_header = Pref.bool("Show Block Header", show.block_header, "Parse and add Block Header to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_consolidated_snapshot_message = Pref.bool("Show Consolidated Snapshot Message", show.consolidated_snapshot_message, "Parse and add Consolidated Snapshot Message to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_finra_snapshot_message = Pref.bool("Show Finra Snapshot Message", show.finra_snapshot_message, "Parse and add Finra Snapshot Message to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_line_integrity_message = Pref.bool("Show Line Integrity Message", show.line_integrity_message, "Parse and add Line Integrity Message to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_market_wide_circuit_breaker_decline_level_status_snapshot_message = Pref.bool("Show Market Wide Circuit Breaker Decline Level Status Snapshot Message", show.market_wide_circuit_breaker_decline_level_status_snapshot_message, "Parse and add Market Wide Circuit Breaker Decline Level Status Snapshot Message to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_message = Pref.bool("Show Message", show.message, "Parse and add Message to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_message_header = Pref.bool("Show Message Header", show.message_header, "Parse and add Message Header to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_packet = Pref.bool("Show Packet", show.packet, "Parse and add Packet to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_participant_snapshot_message = Pref.bool("Show Participant Snapshot Message", show.participant_snapshot_message, "Parse and add Participant Snapshot Message to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_sip_block_timestamp = Pref.bool("Show Sip Block Timestamp", show.sip_block_timestamp, "Parse and add Sip Block Timestamp to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_snapshot = Pref.bool("Show Snapshot", show.snapshot, "Parse and add Snapshot to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_payload = Pref.bool("Show Payload", show.payload, "Parse and add Payload to protocol tree")
siac_cqs_snapshot_cta_v1_0.prefs.show_snapshot_payload = Pref.bool("Show Snapshot Payload", show.snapshot_payload, "Parse and add Snapshot Payload to protocol tree")
-- Handle changed preferences
function siac_cqs_snapshot_cta_v1_0.prefs_changed()
local changed = false
-- Check if show options have changed
if show.block_header ~= siac_cqs_snapshot_cta_v1_0.prefs.show_block_header then
show.block_header = siac_cqs_snapshot_cta_v1_0.prefs.show_block_header
changed = true
end
if show.consolidated_snapshot_message ~= siac_cqs_snapshot_cta_v1_0.prefs.show_consolidated_snapshot_message then
show.consolidated_snapshot_message = siac_cqs_snapshot_cta_v1_0.prefs.show_consolidated_snapshot_message
changed = true
end
if show.finra_snapshot_message ~= siac_cqs_snapshot_cta_v1_0.prefs.show_finra_snapshot_message then
show.finra_snapshot_message = siac_cqs_snapshot_cta_v1_0.prefs.show_finra_snapshot_message
changed = true
end
if show.line_integrity_message ~= siac_cqs_snapshot_cta_v1_0.prefs.show_line_integrity_message then
show.line_integrity_message = siac_cqs_snapshot_cta_v1_0.prefs.show_line_integrity_message
changed = true
end
if show.market_wide_circuit_breaker_decline_level_status_snapshot_message ~= siac_cqs_snapshot_cta_v1_0.prefs.show_market_wide_circuit_breaker_decline_level_status_snapshot_message then
show.market_wide_circuit_breaker_decline_level_status_snapshot_message = siac_cqs_snapshot_cta_v1_0.prefs.show_market_wide_circuit_breaker_decline_level_status_snapshot_message
changed = true
end
if show.message ~= siac_cqs_snapshot_cta_v1_0.prefs.show_message then
show.message = siac_cqs_snapshot_cta_v1_0.prefs.show_message
changed = true
end
if show.message_header ~= siac_cqs_snapshot_cta_v1_0.prefs.show_message_header then
show.message_header = siac_cqs_snapshot_cta_v1_0.prefs.show_message_header
changed = true
end
if show.packet ~= siac_cqs_snapshot_cta_v1_0.prefs.show_packet then
show.packet = siac_cqs_snapshot_cta_v1_0.prefs.show_packet
changed = true
end
if show.participant_snapshot_message ~= siac_cqs_snapshot_cta_v1_0.prefs.show_participant_snapshot_message then
show.participant_snapshot_message = siac_cqs_snapshot_cta_v1_0.prefs.show_participant_snapshot_message
changed = true
end
if show.sip_block_timestamp ~= siac_cqs_snapshot_cta_v1_0.prefs.show_sip_block_timestamp then
show.sip_block_timestamp = siac_cqs_snapshot_cta_v1_0.prefs.show_sip_block_timestamp
changed = true
end
if show.snapshot ~= siac_cqs_snapshot_cta_v1_0.prefs.show_snapshot then
show.snapshot = siac_cqs_snapshot_cta_v1_0.prefs.show_snapshot
changed = true
end
if show.payload ~= siac_cqs_snapshot_cta_v1_0.prefs.show_payload then
show.payload = siac_cqs_snapshot_cta_v1_0.prefs.show_payload
changed = true
end
if show.snapshot_payload ~= siac_cqs_snapshot_cta_v1_0.prefs.show_snapshot_payload then
show.snapshot_payload = siac_cqs_snapshot_cta_v1_0.prefs.show_snapshot_payload
changed = true
end
-- Reload on changed preference
if changed then
reload()
end
end
-----------------------------------------------------------------------
-- Protocol Functions
-----------------------------------------------------------------------
-- Is value not even?
uneven = function(value)
return (value % 2 == 1)
end
-----------------------------------------------------------------------
-- Dissect Siac Cqs Snapshot Cta 1.0
-----------------------------------------------------------------------
-- Size: Block Pad Byte
siac_cqs_snapshot_cta_v1_0_size_of.block_pad_byte = 1
-- Display: Block Pad Byte
siac_cqs_snapshot_cta_v1_0_display.block_pad_byte = function(value)
return "Block Pad Byte: "..value
end
-- Dissect: Block Pad Byte
siac_cqs_snapshot_cta_v1_0_dissect.block_pad_byte = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.block_pad_byte
local range = buffer(offset, length)
local value = range:uint()
local display = siac_cqs_snapshot_cta_v1_0_display.block_pad_byte(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.block_pad_byte, range, value, display)
return offset + length, value
end
-- Size: Halt Reason
siac_cqs_snapshot_cta_v1_0_size_of.halt_reason = 1
-- Display: Halt Reason
siac_cqs_snapshot_cta_v1_0_display.halt_reason = function(value)
if value == " " then
return "Halt Reason: Not Applicable (<whitespace>)"
end
if value == "A" then
return "Halt Reason: Additional Information Requested (A)"
end
if value == "C" then
return "Halt Reason: Regulatory Concern (C)"
end
if value == "D" then
return "Halt Reason: News Released (D)"
end
if value == "E" then
return "Halt Reason: Merger Effective (E)"
end
if value == "F" then
return "Halt Reason: Etf Component Prices Not Available (F)"
end
if value == "I" then
return "Halt Reason: Order Imbalance (I)"
end
if value == "M" then
return "Halt Reason: Limit Up Limit Down Trading Pause (M)"
end
if value == "N" then
return "Halt Reason: Corporate Action (N)"
end
if value == "O" then
return "Halt Reason: New Security Offering (O)"
end
if value == "P" then
return "Halt Reason: News Pending (P)"
end
if value == "V" then
return "Halt Reason: Intraday Indicative Value Not Available (V)"
end
if value == "X" then
return "Halt Reason: Operational (X)"
end
if value == "Y" then
return "Halt Reason: Subpenny Trading (Y)"
end
if value == "1" then
return "Halt Reason: Market Wide Circuit Breaker Level 1 Breached (1)"
end
if value == "2" then
return "Halt Reason: Market Wide Circuit Breaker Level 2 Breached (2)"
end
if value == "3" then
return "Halt Reason: Market Wide Circuit Breaker Level 3 Breached (3)"
end
return "Halt Reason: Unknown("..value..")"
end
-- Dissect: Halt Reason
siac_cqs_snapshot_cta_v1_0_dissect.halt_reason = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.halt_reason
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.halt_reason(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.halt_reason, range, value, display)
return offset + length, value
end
-- Size: Low Indication Price
siac_cqs_snapshot_cta_v1_0_size_of.low_indication_price = 8
-- Display: Low Indication Price
siac_cqs_snapshot_cta_v1_0_display.low_indication_price = function(value)
return "Low Indication Price: "..value
end
-- Translate: Low Indication Price
translate.low_indication_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Low Indication Price
siac_cqs_snapshot_cta_v1_0_dissect.low_indication_price = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.low_indication_price
local range = buffer(offset, length)
local raw = range:uint64()
local value = translate.low_indication_price(raw)
local display = siac_cqs_snapshot_cta_v1_0_display.low_indication_price(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.low_indication_price, range, value, display)
return offset + length, value
end
-- Size: High Indication Price
siac_cqs_snapshot_cta_v1_0_size_of.high_indication_price = 8
-- Display: High Indication Price
siac_cqs_snapshot_cta_v1_0_display.high_indication_price = function(value)
return "High Indication Price: "..value
end
-- Translate: High Indication Price
translate.high_indication_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: High Indication Price
siac_cqs_snapshot_cta_v1_0_dissect.high_indication_price = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.high_indication_price
local range = buffer(offset, length)
local raw = range:uint64()
local value = translate.high_indication_price(raw)
local display = siac_cqs_snapshot_cta_v1_0_display.high_indication_price(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.high_indication_price, range, value, display)
return offset + length, value
end
-- Size: Finra Bbo Luld Indicator
siac_cqs_snapshot_cta_v1_0_size_of.finra_bbo_luld_indicator = 1
-- Display: Finra Bbo Luld Indicator
siac_cqs_snapshot_cta_v1_0_display.finra_bbo_luld_indicator = function(value)
if value == "" then
return "Finra Bbo Luld Indicator: Limit Up Limit Down Not Applicable (<whitespace>)"
end
if value == "A" then
return "Finra Bbo Luld Indicator: Finra Best Bid And Or Finra Best Offer Are Executable (A)"
end
if value == "B" then
return "Finra Bbo Luld Indicator: Finra Best Bid Below Lower Limit Price Band And Finra Best Bid Is Non Executable (B)"
end
if value == "C" then
return "Finra Bbo Luld Indicator: Finra Best Offer Above Upper Limit Price Band And Finra Best Offer Is Non Executable (C)"
end
if value == "D" then
return "Finra Bbo Luld Indicator: Best Bid Below Lower Limit Price Band And Best Offer Above Upper Limit Price Band Best Bid And Best Offer Are Non Executable For Finra (D)"
end
return "Finra Bbo Luld Indicator: Unknown("..value..")"
end
-- Dissect: Finra Bbo Luld Indicator
siac_cqs_snapshot_cta_v1_0_dissect.finra_bbo_luld_indicator = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_bbo_luld_indicator
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_bbo_luld_indicator(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_bbo_luld_indicator, range, value, display)
return offset + length, value
end
-- Size: Finra Best Offer Market Maker Id
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_market_maker_id = 4
-- Display: Finra Best Offer Market Maker Id
siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_market_maker_id = function(value)
return "Finra Best Offer Market Maker Id: "..value
end
-- Dissect: Finra Best Offer Market Maker Id
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_market_maker_id = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_market_maker_id
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_market_maker_id(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_market_maker_id, range, value, display)
return offset + length, value
end
-- Size: Finra Best Offer Size
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_size = 4
-- Display: Finra Best Offer Size
siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_size = function(value)
return "Finra Best Offer Size: "..value
end
-- Dissect: Finra Best Offer Size
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_size = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_size
local range = buffer(offset, length)
local value = range:uint()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_size(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_size, range, value, display)
return offset + length, value
end
-- Size: Finra Best Offer Price
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_price = 8
-- Display: Finra Best Offer Price
siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_price = function(value)
return "Finra Best Offer Price: "..value
end
-- Translate: Finra Best Offer Price
translate.finra_best_offer_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Finra Best Offer Price
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_price = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_price
local range = buffer(offset, length)
local raw = range:uint64()
local value = translate.finra_best_offer_price(raw)
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_price(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_price, range, value, display)
return offset + length, value
end
-- Size: Finra Best Offer Quote Condition
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_quote_condition = 1
-- Display: Finra Best Offer Quote Condition
siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_quote_condition = function(value)
if value == " " then
return "Finra Best Offer Quote Condition: Quote Condition Not Applicable (<whitespace>)"
end
if value == "A" then
return "Finra Best Offer Quote Condition: Slow Quote On Offer Side (A)"
end
if value == "B" then
return "Finra Best Offer Quote Condition: Slow Quote On Bid Side (B)"
end
if value == "C" then
return "Finra Best Offer Quote Condition: Closing (C)"
end
if value == "E" then
return "Finra Best Offer Quote Condition: Slow Quote Due To Lrp Or Gap Quote On The Bid Side (E)"
end
if value == "F" then
return "Finra Best Offer Quote Condition: Slow Quote Due To Lrp Or Gap Quote On The Offer Side (F)"
end
if value == "H" then
return "Finra Best Offer Quote Condition: Slow Quote On The Bid And Offer Sides (H)"
end
if value == "L" then
return "Finra Best Offer Quote Condition: Closed Market Maker (L)"
end
if value == "N" then
return "Finra Best Offer Quote Condition: Non Firm Quote (N)"
end
if value == "O" then
return "Finra Best Offer Quote Condition: Opening Quote (O)"
end
if value == "R" then
return "Finra Best Offer Quote Condition: Regular Finra Open (R)"
end
if value == "U" then
return "Finra Best Offer Quote Condition: Slow Quote Due To Liquidity Replenishment Point Or Gap Quote On Both The Bid And Offer Sides (U)"
end
if value == "W" then
return "Finra Best Offer Quote Condition: Slow Quote Due To Set Slow List On Both The Bid And Offer Sides (W)"
end
if value == "4" then
return "Finra Best Offer Quote Condition: On Demand Intra Day Auction (4)"
end
return "Finra Best Offer Quote Condition: Unknown("..value..")"
end
-- Dissect: Finra Best Offer Quote Condition
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_quote_condition = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_offer_quote_condition
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_offer_quote_condition(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_offer_quote_condition, range, value, display)
return offset + length, value
end
-- Size: Finra Best Bid Market Maker Id
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_market_maker_id = 4
-- Display: Finra Best Bid Market Maker Id
siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_market_maker_id = function(value)
return "Finra Best Bid Market Maker Id: "..value
end
-- Dissect: Finra Best Bid Market Maker Id
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_market_maker_id = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_market_maker_id
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_market_maker_id(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_market_maker_id, range, value, display)
return offset + length, value
end
-- Size: Finra Best Bid Size
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_size = 4
-- Display: Finra Best Bid Size
siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_size = function(value)
return "Finra Best Bid Size: "..value
end
-- Dissect: Finra Best Bid Size
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_size = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_size
local range = buffer(offset, length)
local value = range:uint()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_size(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_size, range, value, display)
return offset + length, value
end
-- Size: Finra Best Bid Price
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_price = 8
-- Display: Finra Best Bid Price
siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_price = function(value)
return "Finra Best Bid Price: "..value
end
-- Translate: Finra Best Bid Price
translate.finra_best_bid_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Finra Best Bid Price
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_price = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_price
local range = buffer(offset, length)
local raw = range:uint64()
local value = translate.finra_best_bid_price(raw)
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_price(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_price, range, value, display)
return offset + length, value
end
-- Size: Finra Best Bid Quote Condition
siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_quote_condition = 1
-- Display: Finra Best Bid Quote Condition
siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_quote_condition = function(value)
if value == " " then
return "Finra Best Bid Quote Condition: Quote Condition Not Applicable (<whitespace>)"
end
if value == "A" then
return "Finra Best Bid Quote Condition: Slow Quote On Offer Side (A)"
end
if value == "B" then
return "Finra Best Bid Quote Condition: Slow Quote On Bid Side (B)"
end
if value == "C" then
return "Finra Best Bid Quote Condition: Closing (C)"
end
if value == "E" then
return "Finra Best Bid Quote Condition: Slow Quote Due To Lrp Or Gap Quote On The Bid Side (E)"
end
if value == "F" then
return "Finra Best Bid Quote Condition: Slow Quote Due To Lrp Or Gap Quote On The Offer Side (F)"
end
if value == "H" then
return "Finra Best Bid Quote Condition: Slow Quote On The Bid And Offer Sides (H)"
end
if value == "L" then
return "Finra Best Bid Quote Condition: Closed Market Maker (L)"
end
if value == "N" then
return "Finra Best Bid Quote Condition: Non Firm Quote (N)"
end
if value == "O" then
return "Finra Best Bid Quote Condition: Opening Quote (O)"
end
if value == "R" then
return "Finra Best Bid Quote Condition: Regular Finra Open (R)"
end
if value == "U" then
return "Finra Best Bid Quote Condition: Slow Quote Due To Liquidity Replenishment Point Or Gap Quote On Both The Bid And Offer Sides (U)"
end
if value == "W" then
return "Finra Best Bid Quote Condition: Slow Quote Due To Set Slow List On Both The Bid And Offer Sides (W)"
end
if value == "4" then
return "Finra Best Bid Quote Condition: On Demand Intra Day Auction (4)"
end
return "Finra Best Bid Quote Condition: Unknown("..value..")"
end
-- Dissect: Finra Best Bid Quote Condition
siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_quote_condition = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.finra_best_bid_quote_condition
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.finra_best_bid_quote_condition(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_best_bid_quote_condition, range, value, display)
return offset + length, value
end
-- Size: Security Symbol
siac_cqs_snapshot_cta_v1_0_size_of.security_symbol = 11
-- Display: Security Symbol
siac_cqs_snapshot_cta_v1_0_display.security_symbol = function(value)
return "Security Symbol: "..value
end
-- Dissect: Security Symbol
siac_cqs_snapshot_cta_v1_0_dissect.security_symbol = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.security_symbol
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.security_symbol(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.security_symbol, range, value, display)
return offset + length, value
end
-- Size: Participant Id
siac_cqs_snapshot_cta_v1_0_size_of.participant_id = 1
-- Display: Participant Id
siac_cqs_snapshot_cta_v1_0_display.participant_id = function(value)
if value == "A" then
return "Participant Id: Nyse American (A)"
end
if value == "B" then
return "Participant Id: Nasdaq Bx (B)"
end
if value == "C" then
return "Participant Id: Nyse National (C)"
end
if value == "D" then
return "Participant Id: Adf (D)"
end
if value == "H" then
return "Participant Id: Miax (H)"
end
if value == "I" then
return "Participant Id: Ise (I)"
end
if value == "J" then
return "Participant Id: Cboe Edga (J)"
end
if value == "K" then
return "Participant Id: Cboe Edgx (K)"
end
if value == "L" then
return "Participant Id: Ltse (L)"
end
if value == "M" then
return "Participant Id: Nyse Chicago (M)"
end
if value == "N" then
return "Participant Id: Nyse (N)"
end
if value == "P" then
return "Participant Id: Nyse Arca (P)"
end
if value == "S" then
return "Participant Id: Cqs (S)"
end
if value == "T" then
return "Participant Id: Nasdaq (T)"
end
if value == "U" then
return "Participant Id: Memx (U)"
end
if value == "V" then
return "Participant Id: Iex (V)"
end
if value == "W" then
return "Participant Id: Cbsx (W)"
end
if value == "X" then
return "Participant Id: Nasdaq Psx (X)"
end
if value == "Y" then
return "Participant Id: Cboe Byx (Y)"
end
if value == "Z" then
return "Participant Id: Cboe Bzx (Z)"
end
return "Participant Id: Unknown("..value..")"
end
-- Dissect: Participant Id
siac_cqs_snapshot_cta_v1_0_dissect.participant_id = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.participant_id
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.participant_id(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.participant_id, range, value, display)
return offset + length, value
end
-- Read runtime size of: Finra Snapshot Message
siac_cqs_snapshot_cta_v1_0_size_of.finra_snapshot_message = function(buffer, offset)
local index = offset
-- Dependency element: Message Length
local message_length = buffer(offset - 4, 2):uint()
return message_length - 4
end
-- Display: Finra Snapshot Message
siac_cqs_snapshot_cta_v1_0_display.finra_snapshot_message = function(buffer, offset, size, packet, parent)
return ""
end
-- Dissect Fields: Finra Snapshot Message
siac_cqs_snapshot_cta_v1_0_dissect.finra_snapshot_message_fields = function(buffer, offset, packet, parent, size_of_finra_snapshot_message)
local index = offset
-- Participant Id: 1 Byte Ascii String Enum with 20 values
index, participant_id = siac_cqs_snapshot_cta_v1_0_dissect.participant_id(buffer, index, packet, parent)
-- Security Symbol: 11 Byte Ascii String
index, security_symbol = siac_cqs_snapshot_cta_v1_0_dissect.security_symbol(buffer, index, packet, parent)
-- Finra Best Bid Quote Condition: 1 Byte Ascii String Enum with 14 values
index, finra_best_bid_quote_condition = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_quote_condition(buffer, index, packet, parent)
-- Finra Best Bid Price: 8 Byte Unsigned Fixed Width Integer
index, finra_best_bid_price = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_price(buffer, index, packet, parent)
-- Finra Best Bid Size: 4 Byte Unsigned Fixed Width Integer
index, finra_best_bid_size = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_size(buffer, index, packet, parent)
-- Finra Best Bid Market Maker Id: 4 Byte Ascii String
index, finra_best_bid_market_maker_id = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_bid_market_maker_id(buffer, index, packet, parent)
-- Finra Best Offer Quote Condition: 1 Byte Ascii String Enum with 14 values
index, finra_best_offer_quote_condition = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_quote_condition(buffer, index, packet, parent)
-- Finra Best Offer Price: 8 Byte Unsigned Fixed Width Integer
index, finra_best_offer_price = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_price(buffer, index, packet, parent)
-- Finra Best Offer Size: 4 Byte Unsigned Fixed Width Integer
index, finra_best_offer_size = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_size(buffer, index, packet, parent)
-- Finra Best Offer Market Maker Id: 4 Byte Ascii String
index, finra_best_offer_market_maker_id = siac_cqs_snapshot_cta_v1_0_dissect.finra_best_offer_market_maker_id(buffer, index, packet, parent)
-- Finra Bbo Luld Indicator: 1 Byte Ascii String Enum with 5 values
index, finra_bbo_luld_indicator = siac_cqs_snapshot_cta_v1_0_dissect.finra_bbo_luld_indicator(buffer, index, packet, parent)
-- High Indication Price: 8 Byte Unsigned Fixed Width Integer
index, high_indication_price = siac_cqs_snapshot_cta_v1_0_dissect.high_indication_price(buffer, index, packet, parent)
-- Low Indication Price: 8 Byte Unsigned Fixed Width Integer
index, low_indication_price = siac_cqs_snapshot_cta_v1_0_dissect.low_indication_price(buffer, index, packet, parent)
-- Halt Reason: 1 Byte Ascii String Enum with 17 values
index, halt_reason = siac_cqs_snapshot_cta_v1_0_dissect.halt_reason(buffer, index, packet, parent)
return index
end
-- Dissect: Finra Snapshot Message
siac_cqs_snapshot_cta_v1_0_dissect.finra_snapshot_message = function(buffer, offset, packet, parent)
-- Parse runtime size
local size_of_finra_snapshot_message = siac_cqs_snapshot_cta_v1_0_size_of.finra_snapshot_message(buffer, offset)
-- Optionally add struct element to protocol tree
if show.finra_snapshot_message then
local range = buffer(offset, size_of_finra_snapshot_message)
local display = siac_cqs_snapshot_cta_v1_0_display.finra_snapshot_message(buffer, packet, parent)
parent = parent:add(siac_cqs_snapshot_cta_v1_0.fields.finra_snapshot_message, range, display)
end
siac_cqs_snapshot_cta_v1_0_dissect.finra_snapshot_message_fields(buffer, offset, packet, parent, size_of_finra_snapshot_message)
return offset + size_of_finra_snapshot_message
end
-- Size: Luld Indicator
siac_cqs_snapshot_cta_v1_0_size_of.luld_indicator = 1
-- Display: Luld Indicator
siac_cqs_snapshot_cta_v1_0_display.luld_indicator = function(value)
if value == " " then
return "Luld Indicator: Limit Up Limit Down Not Applicable (<whitespace>)"
end
if value == "A" then
return "Luld Indicator: Bid Is Non Executable (A)"
end
if value == "B" then
return "Luld Indicator: Offer Is Non Executable (B)"
end
return "Luld Indicator: Unknown("..value..")"
end
-- Dissect: Luld Indicator
siac_cqs_snapshot_cta_v1_0_dissect.luld_indicator = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.luld_indicator
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.luld_indicator(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.luld_indicator, range, value, display)
return offset + length, value
end
-- Size: Market Condition
siac_cqs_snapshot_cta_v1_0_size_of.market_condition = 1
-- Display: Market Condition
siac_cqs_snapshot_cta_v1_0_display.market_condition = function(value)
if value == " " then
return "Market Condition: Normal Auction Market (<whitespace>)"
end
if value == "A" then
return "Market Condition: Crossed Market (A)"
end
if value == "B" then
return "Market Condition: Locked Market (B)"
end
return "Market Condition: Unknown("..value..")"
end
-- Dissect: Market Condition
siac_cqs_snapshot_cta_v1_0_dissect.market_condition = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.market_condition
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.market_condition(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.market_condition, range, value, display)
return offset + length, value
end
-- Size: Settlement Condition
siac_cqs_snapshot_cta_v1_0_size_of.settlement_condition = 1
-- Display: Settlement Condition
siac_cqs_snapshot_cta_v1_0_display.settlement_condition = function(value)
if value == " " then
return "Settlement Condition: Regular Way Settlement (<whitespace>)"
end
if value == "A" then
return "Settlement Condition: Cash Only Settlement (A)"
end
if value == "B" then
return "Settlement Condition: Next Day Only Settlement (B)"
end
return "Settlement Condition: Unknown("..value..")"
end
-- Dissect: Settlement Condition
siac_cqs_snapshot_cta_v1_0_dissect.settlement_condition = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.settlement_condition
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.settlement_condition(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.settlement_condition, range, value, display)
return offset + length, value
end
-- Size: Retail Interest Indicator
siac_cqs_snapshot_cta_v1_0_size_of.retail_interest_indicator = 1
-- Display: Retail Interest Indicator
siac_cqs_snapshot_cta_v1_0_display.retail_interest_indicator = function(value)
if value == " " then
return "Retail Interest Indicator: Not Applicable (<whitespace>)"
end
if value == "A" then
return "Retail Interest Indicator: Retail Interest On Bid Quote (A)"
end
if value == "B" then
return "Retail Interest Indicator: Retail Interest On Offer Quote (B)"
end
if value == "C" then
return "Retail Interest Indicator: Retail Interest On Both The Bid And Offer Quotes (C)"
end
return "Retail Interest Indicator: Unknown("..value..")"
end
-- Dissect: Retail Interest Indicator
siac_cqs_snapshot_cta_v1_0_dissect.retail_interest_indicator = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.retail_interest_indicator
local range = buffer(offset, length)
local value = range:string()
local display = siac_cqs_snapshot_cta_v1_0_display.retail_interest_indicator(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.retail_interest_indicator, range, value, display)
return offset + length, value
end
-- Size: Offer Price
siac_cqs_snapshot_cta_v1_0_size_of.offer_price = 8
-- Display: Offer Price
siac_cqs_snapshot_cta_v1_0_display.offer_price = function(value)
return "Offer Price: "..value
end
-- Translate: Offer Price
translate.offer_price = function(raw)
return raw:tonumber()/1000000
end
-- Dissect: Offer Price
siac_cqs_snapshot_cta_v1_0_dissect.offer_price = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.offer_price
local range = buffer(offset, length)
local raw = range:uint64()
local value = translate.offer_price(raw)
local display = siac_cqs_snapshot_cta_v1_0_display.offer_price(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.offer_price, range, value, display)
return offset + length, value
end
-- Size: Bid Size
siac_cqs_snapshot_cta_v1_0_size_of.bid_size = 4
-- Display: Bid Size
siac_cqs_snapshot_cta_v1_0_display.bid_size = function(value)
return "Bid Size: "..value
end
-- Dissect: Bid Size
siac_cqs_snapshot_cta_v1_0_dissect.bid_size = function(buffer, offset, packet, parent)
local length = siac_cqs_snapshot_cta_v1_0_size_of.bid_size
local range = buffer(offset, length)
local value = range:uint()
local display = siac_cqs_snapshot_cta_v1_0_display.bid_size(value, buffer, offset, packet, parent)
parent:add(siac_cqs_snapshot_cta_v1_0.fields.bid_size, range, value, display)
return offset + length, value
end
-- Size: Bid Price
siac_cqs_snapshot_cta_v1_0_size_of.bid_price = 8