Skip to content

Commit 62ef08b

Browse files
committed
Better distinction between encoding type and field #35 #31 #44
1 parent 9d045b7 commit 62ef08b

File tree

6 files changed

+121
-135
lines changed

6 files changed

+121
-135
lines changed

v2-0-RC1/doc/01Introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ and data examples.
137137
This is a sample encoding specification
138138

139139
```xml
140-
<type name="short" primitiveType="int16" semanticType="int" />
140+
<type name="short" primitiveType="int16"/>
141141
```
142142

143143
This is sample data as it would be transmitted on the wire
@@ -149,7 +149,7 @@ References
149149

150150
### Related FIX Standards
151151

152-
*Simple Open Framing Header*, FIX Protocol, Limited. Release Candidate 1
152+
*Simple Open Framing Header*, FIX Protocol, Limited. Version 1.0 Draft Standard
153153
specification has been published at
154154
<http://www.fixtradingcommunity.org/>
155155

v2-0-RC1/doc/02FieldEncoding.md

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ FIX Qty data type is a float type, but a decimal may be constrained to
378378
integer values by setting exponent to zero.
379379

380380
```xml
381-
<composite name="intQty32" semanticType="Qty">
381+
<composite name="intQty32">
382382
<type name="mantissa" primitiveType="int32" />
383383
<type name="exponent" primitiveType="int8"
384384
presence="constant">0</type>
@@ -507,7 +507,7 @@ control character (code 0).
507507
This is the standard encoding for char type.
508508

509509
```xml
510-
<type name="char" primitiveType="char" semanticType="char" />
510+
<type name="char" primitiveType="char"/>
511511
```
512512

513513
Wire format of char encoding of "A" (ASCII value 65, hexadecimal 41)
@@ -545,10 +545,9 @@ encoding.
545545
A typical string encoding specification
546546

547547
```xml
548-
<type name="string6" primitiveType="char" semanticType="String"
549-
length="6" />
548+
<type name="string6" primitiveType="char" length="6" />
550549

551-
<field type="string6" name="Symbol" id="55" />
550+
<field type="string6" name="Symbol" id="55" semanticType="String"/>
552551
```
553552

554553
Wire format of a character array in character and hexadecimal formats
@@ -560,11 +559,10 @@ M S F T
560559
A character array constant specification
561560

562561
```xml
563-
<type name="EurexMarketID" semanticType="Exchange"
564-
primitiveType="char" length="4" description="MIC code"
562+
<type name="EurexMarketID" primitiveType="char" length="4" description="MIC code"
565563
presence="constant">XEUR</type>
566564

567-
<field type="EurexMarketID" name="MarketID" id="1301" />
565+
<field type="EurexMarketID" name="MarketID" id="1301" semanticType="Exchange"/>
568566
```
569567

570568
### Variable-length string encoding
@@ -620,9 +618,9 @@ Encoding specification for variable length data up to 65535 octets
620618

621619
```xml
622620
<composite name="varString" description="Variable-length string">
623-
<type name="length" primitiveType="uint16" semanticType="Length"/>
621+
<type name="length" primitiveType="uint16"/>
624622
<type name="data" length="0" primitiveType="uint8"
625-
semanticType="data" characterEncoding="UTF-16"/>
623+
characterEncoding="UTF-16"/>
626624
</composite>
627625

628626
<data name="SecurityDesc" id="107" type="varString"/>
@@ -735,8 +733,8 @@ Encoding specification for variable length data up to 65535 octets
735733

736734
```xml
737735
<composite name="DATA" description="Variable-length data">
738-
<type name="length" primitiveType="uint16" semanticType="Length"/>
739-
<type name="data" length="0" primitiveType="uint8" semanticType="data" />
736+
<type name="length" primitiveType="uint16"/>
737+
<type name="data" length="0" primitiveType="uint8"/>
740738
</composite>
741739

742740
<data name="RawData" id="96" type="DATA"/>
@@ -789,7 +787,7 @@ required and optional elements.
789787
The standard encoding specification for MonthYear
790788

791789
```xml
792-
<composite name="monthYear" semanticType="MonthYear">
790+
<composite name="monthYear">
793791
<type name="year" primitiveType="uint16" presence="optional"
794792
nullValue="65536" />
795793
<type name="month" primitiveType="uint8" minValue="1" maxValue="12" />
@@ -802,7 +800,9 @@ The standard encoding specification for MonthYear
802800

803801
Example MonthYear field specification
804802

805-
<field type="monthYear" name="MaturityMonthYear" id="200" />
803+
```xml
804+
<field type="monthYear" name="MaturityMonthYear" id="200" semanticType="MonthYear"/>
805+
```
806806

807807
Wire format of MonthYear 2014 June week 3 as hexadecimal
808808

@@ -870,7 +870,7 @@ Timestamp with variable time units:
870870
Timestamp with constant time unit:
871871

872872
```xml
873-
<composite name="UTCTimestampNanos" description="UTC timestamp with nanosecond precision" semanticType="UTCTimestamp" >
873+
<composite name="UTCTimestampNanos" description="UTC timestamp with nanosecond precision">
874874
<type name="time" primitiveType="uint64" />
875875
<type name="unit" primitiveType="uint8" presence="constant" valueRef="TimeUnit.nanosecond" />
876876
</composite>
@@ -879,7 +879,7 @@ Timestamp with constant time unit:
879879
Time only with variable time units:
880880

881881
```xml
882-
<composite name="UTCTime" description="Time of day with precision on the wire" semanticType="UTCTimeOnly" >
882+
<composite name="UTCTime" description="Time of day with precision on the wire">
883883
<type name="time" primitiveType="uint64" />
884884
<type name="unit" primitiveType="uint8" />
885885
</composite>
@@ -888,7 +888,7 @@ Time only with variable time units:
888888
Time only with constant time unit:
889889

890890
```xml
891-
<composite name="UTCTimeNanos" description="Time of day with millisecond precision" semanticType="UTCTimeOnly" >
891+
<composite name="UTCTimeNanos" description="Time of day with millisecond precision">
892892
<type name="time" primitiveType="uint64" />
893893
<type name="unit" primitiveType="uint8" presence="constant" valueRef="TimeUnit.millisecond" />
894894
</composite>
@@ -897,7 +897,7 @@ Time only with constant time unit:
897897
Date only specification:
898898

899899
```xml
900-
<type name="date" primitiveType="uint16" semanticType="UTCDateOnly" />
900+
<type name="date" primitiveType="uint16"/>
901901
```
902902

903903
### Examples of date/time fields
@@ -907,7 +907,7 @@ hours, 17 minutes and 22 seconds since the UNIX epoch) with default
907907
schema attributes
908908

909909
```xml
910-
<composite name="UTCTimestampNanos" description="UTC timestamp with nanosecond precision" semanticType="UTCTimestamp" >
910+
<composite name="UTCTimestampNanos" description="UTC timestamp with nanosecond precision">
911911
<type name="time" primitiveType="uint64" />
912912
<type name="unit" primitiveType="uint8" presence="constant" valueRef="TimeUnit.nanosecond" />
913913
</composite>
@@ -922,7 +922,7 @@ byte order
922922
since midnight UTC) with default schema attributes
923923

924924
```xml
925-
<composite name="UTCTimeOnlyNanos" description="UTC time of day with nanosecond precision" semanticType="UTCTimeOnly" >
925+
<composite name="UTCTimeOnlyNanos" description="UTC time of day with nanosecond precision">
926926
<type name="time" primitiveType="uint64" />
927927
<type name="unit" primitiveType="uint8" presence="constant" valueRef="TimeUnit.nanosecond" />
928928
</composite>
@@ -936,7 +936,7 @@ Wire format of UTCTimeOnly
936936
default schema attributes
937937

938938
```xml
939-
<type name="date" primitiveType="uint16" semanticType="UTCDateOnly" />
939+
<type name="date" primitiveType="uint16"/>
940940
```
941941

942942
Wire format of UTCDateOnly
@@ -989,7 +989,7 @@ elements within the composite encoding. See section 4.4.4.3 below.
989989
Standard TZTimestamp encoding specification
990990

991991
```xml
992-
<composite name="tzTimestamp" semanticType="TZTimestamp">
992+
<composite name="tzTimestamp">
993993
<type name="time" primitiveType="uint64" />
994994
<type name="unit" primitiveType="uint8" />
995995
<!-- Sign of timezone offset is on hour subfield -->
@@ -1028,7 +1028,7 @@ elements within the composite encoding. See section 4.4.4.3 below.
10281028
Standard TZTimeOnly encoding specification
10291029

10301030
```xml
1031-
<composite name="tzTimeOnly" semanticType="TZTimeOnly">
1031+
<composite name="tzTimeOnly">
10321032
<type name="time" primitiveType="uint64" />
10331033
<type name="unit" primitiveType="uint8" />
10341034
<!-- Sign of timezone offset is on hour subfield -->
@@ -1161,13 +1161,7 @@ Standard encoding specifications for required and optional Boolean
11611161
fields
11621162

11631163
```xml
1164-
<enum name="booleanEnum" encodingType="uint8" semanticType="Boolean">
1165-
<validValue name="false">0</validValue>
1166-
<validValue name="true">1</validValue>
1167-
</enum>
1168-
1169-
<enum name="optionalBoolean" encodingType="uint8" presence="optional"
1170-
nullValue="255" semanticType="Boolean">
1164+
<enum name="booleanEnum" encodingType="uint8">
11711165
<validValue name="false">0</validValue>
11721166
<validValue name="true">1</validValue>
11731167
</enum>
@@ -1176,7 +1170,9 @@ fields
11761170
Example optional Boolean field
11771171

11781172
```xml
1179-
<field type="optionalBoolean" name="SolicitedFlag" id="377" />
1173+
<field type="requiredBoolean" name="SolicitedFlag" id="377" presence="required" semanticType="Boolean" />
1174+
1175+
<field type="optionalBoolean" name="SolicitedFlag" id="377" presence="optional" nullValue="255" semanticType="Boolean" />
11801176
```
11811177

11821178
Wire format of true value as hexadecimal

v2-0-RC1/doc/03MessageStructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ Recommended encoding of repeating group dimensions
439439
```xml
440440
<composite name="groupSizeEncoding">
441441
<type name="blockLength" primitiveType="uint16"/>
442-
<type name="numInGroup" primitiveType="uint16" semanticType="NumInGroup"/>
442+
<type name="numInGroup" primitiveType="uint16"/>
443443
<type name="numGroups" primitiveType="uint16" />
444444
<type name="numVarDataFields" primitiveType="uint16" />
445445
</composite>

v2-0-RC1/doc/04MessageSchema.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ The element value represents a constant if attribute
143143
| length | Number of elements of the primitive data type | nonnegativeInteger | default = 1 | Value “0” represents variable length. |
144144
| offset | If a member of a composite type, tells the offset from the beginning of the composite. By default, the offset is the sum of preceding element sizes, but it may be increased to effect byte alignment. | unsignedInt | optional | See section 4.4.4.3 below |
145145
| primitiveType | The primitive data type that backs the encoding | token | required | char int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double |
146-
| semanticType | Represents a FIX data type | token | optional | Same as field semanticType – see below. |
147146
| sinceVersion | Documents the version of a schema in which a type was added | nonnegativeInteger | default = 0 | Must be less than or equal to the version of the message schema. |
148147
| deprecated | Documents the version of a schema in which a type was deprecated. It should no longer be used in new messages. | nonnegativeInteger | optional | Must be less than or equal to the version of the message schema. |
149148

0 commit comments

Comments
 (0)