-
Notifications
You must be signed in to change notification settings - Fork 293
/
tag.go
131 lines (122 loc) · 3.52 KB
/
tag.go
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
// Copyright (c) quickfixengine.org All rights reserved.
//
// This file may be distributed under the terms of the quickfixengine.org
// license as defined by quickfixengine.org and appearing in the file
// LICENSE included in the packaging of this file.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
// THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE.
//
// See http://www.quickfixengine.org/LICENSE for licensing information.
//
// Contact [email protected] if any conditions of this licensing
// are not clear to you.
package quickfix
// Tag is a typed int representing a FIX tag.
type Tag int
const (
tagBeginString Tag = 8
tagBodyLength Tag = 9
tagMsgType Tag = 35
tagSenderCompID Tag = 49
tagTargetCompID Tag = 56
tagOnBehalfOfCompID Tag = 115
tagDeliverToCompID Tag = 128
tagSecureDataLen Tag = 90
tagMsgSeqNum Tag = 34
tagSenderSubID Tag = 50
tagSenderLocationID Tag = 142
tagTargetSubID Tag = 57
tagTargetLocationID Tag = 143
tagOnBehalfOfSubID Tag = 116
tagOnBehalfOfLocationID Tag = 144
tagDeliverToSubID Tag = 129
tagDeliverToLocationID Tag = 145
tagPossDupFlag Tag = 43
tagPossResend Tag = 97
tagSendingTime Tag = 52
tagOrigSendingTime Tag = 122
tagXMLDataLen Tag = 212
tagXMLData Tag = 213
tagMessageEncoding Tag = 347
tagLastMsgSeqNumProcessed Tag = 369
tagNextExpectedMsgSeqNum Tag = 789
tagOnBehalfOfSendingTime Tag = 370
tagApplVerID Tag = 1128
tagCstmApplVerID Tag = 1129
tagNoHops Tag = 627
tagApplExtID Tag = 1156
tagSecureData Tag = 91
tagHopCompID Tag = 628
tagHopSendingTime Tag = 629
tagHopRefID Tag = 630
tagHeartBtInt Tag = 108
tagBusinessRejectReason Tag = 380
tagSessionRejectReason Tag = 373
tagRefMsgType Tag = 372
tagBusinessRejectRefID Tag = 379
tagRefTagID Tag = 371
tagRefSeqNum Tag = 45
tagEncryptMethod Tag = 98
tagResetSeqNumFlag Tag = 141
tagDefaultApplVerID Tag = 1137
tagText Tag = 58
tagTestReqID Tag = 112
tagGapFillFlag Tag = 123
tagNewSeqNo Tag = 36
tagBeginSeqNo Tag = 7
tagEndSeqNo Tag = 16
tagSignatureLength Tag = 93
tagSignature Tag = 89
tagCheckSum Tag = 10
)
// IsTrailer returns true if tag belongs in the message trailer.
func (t Tag) IsTrailer() bool {
switch t {
case tagSignatureLength, tagSignature, tagCheckSum:
return true
}
return false
}
// IsHeader returns true if tag belongs in the message header.
func (t Tag) IsHeader() bool {
switch t {
case tagBeginString,
tagBodyLength,
tagMsgType,
tagSenderCompID,
tagTargetCompID,
tagOnBehalfOfCompID,
tagDeliverToCompID,
tagSecureDataLen,
tagMsgSeqNum,
tagSenderSubID,
tagSenderLocationID,
tagTargetSubID,
tagTargetLocationID,
tagOnBehalfOfSubID,
tagOnBehalfOfLocationID,
tagDeliverToSubID,
tagDeliverToLocationID,
tagPossDupFlag,
tagPossResend,
tagSendingTime,
tagOrigSendingTime,
tagXMLDataLen,
tagXMLData,
tagMessageEncoding,
tagLastMsgSeqNumProcessed,
tagOnBehalfOfSendingTime,
tagApplVerID,
tagCstmApplVerID,
tagNoHops,
tagApplExtID,
tagSecureData,
tagHopCompID,
tagHopSendingTime,
tagHopRefID:
return true
}
return false
}