|FIX Repeating Groups|
In general, FIX message represents a sequence of the fields whose values are associated with unique numbers (tags).
A common way of presenting a FIX message is called the
tag-value FIX message format. In such a format, all fields are presented as tag=value pairs and are delimited by special <SOH> symbol.
The following image depicts the structure of the FIX message in the tag-value format:
To create a blank FIX Message object, the OnixS::FIX::Message constructor must be used. It initializes a message of the specified type and FIX protocol version with no fields, presented except a couple of service fields, like those which identify a type and version of the FIX protocol which this constructed message belongs to.
The OnixS::FIX::Message constructor is available to construct a message instance from its raw (tag-value) representation.
Several overloads of the OnixS::FIX::Message::toString method are available to build the tag-value presentation of a message instance. These overloads also simplify debugging and monitoring.
In addition to the presence of a particular field in the message of a certain type, the FIX protocol also defines whether the presence of fields are strictly required in the message, whether they are required under certain conditions, or whether they are optional. To check for the presence of all required fields, the OnixS::FIX::Message::validate method must be used. This process is called "message validation" in the C++ FIX Engine terminology.
The following example demonstrates how messages can be created and parsed from the raw representation.