Module Full_messages

Implementation of the 'full' FIX messages.

type full_msg_data =
| Full_FIX_Admin_Msg of Full_admin_messages.full_admin_msg_data
| Full_FIX_App_Msg of Full_app_messages.full_app_msg_data

Full FIX message data may be of 2 types: Admin and Application.

val get_full_msg_tag : full_msg_data -> Full_message_tags.full_msg_tag

We maintain a type 'Full_Msg_Tag' that represents

type session_rejected_msg_data = {
srej_msg_msg_seq_num : Imandra_prelude.int;
srej_msg_field_tag : Full_message_tags.full_field_tag option;
srej_msg_msg_type : Full_message_tags.full_msg_tag option;
srej_msg_reject_reason : Full_admin_enums.fix_session_reject_reason option;
srej_text : Imandra_prelude.string option;
srej_encoded_text_len : Imandra_prelude.int option;
srej_encoded_text : Imandra_prelude.string option;
}

Note that information contained in the data structures for Business and Session Rejected messages should be enough to send out the 'Reject' and 'BusinessReject' messages.

Reject message

45 RefSeqNum - Required - MsgSeqNum <34> of rejected message 371 RefTagID - Optional - The tag number of the FIX field being referenced. 372 RefMsgType - Optional - The MsgType <35> of the FIX message being referenced. 373 SessionRejectReason - Optional - Code to identify reason for a session-level Reject <3> message. 58 Text - Optional - Where possible, message to explain reason for rejection 354 EncodedTextLen - Optional - Must be set if EncodedText <355> field is specified and must immediately precede it. 355 EncodedText - Optional - Encoded (non-ASCII characters) representation of the Text <58> field in the encoded format specified via the MessageEncoding <347> field.

type biz_rejected_msg_data = {
brej_msg_ref_seq_num : Imandra_prelude.int;
brej_msg_msg_tag : Full_message_tags.full_msg_tag;
brej_msg_reject_reason : Full_admin_enums.fix_business_reject_reason;
brej_msg_field_tag : Full_message_tags.full_field_tag option;
brej_msg_text : Imandra_prelude.string option;
brej_msg_encoded_text : Imandra_prelude.string option;
}

Business Reject message data.

45 RefSeqNum - Optional - MsgSeqNum <34> of rejected message 372 RefMsgType Y - Required - The MsgType <35> of the FIX message being referenced. 379 BusinessRejectRefID - Optional - The value of the business-level 'ID' field on the message being referenced. Required unless the corresponding ID field (see list above) was not specified. 380 BusinessRejectReason - Required - Code to identify reason for a Business Message Reject <j> message. 58 Text - Optional - Where possible, message to explain reason for rejection 354 EncodedTextLen - Optional - Must be set if EncodedText <355> field is specified and must immediately precede it. 355 EncodedText - Optional - Encoded (non-ASCII characters) representation of the Text <58> field in the encoded format specified via the MessageEncoding <347> field.

type fix_header = {
h_begin_string : Imandra_prelude.string;
h_body_length : Imandra_prelude.int;
h_sender_comp_id : Imandra_prelude.string;
h_target_comp_id : Imandra_prelude.string;
h_msg_seq_num : Imandra_prelude.int;
h_on_behalf_of_comp_id : Imandra_prelude.string option;
h_deliver_to_comp_id : Imandra_prelude.string option;
h_secure_data_len : Imandra_prelude.int option;
h_secure_data : Imandra_prelude.int option;
h_sender_sub_id : Imandra_prelude.string option;
h_sender_location_id : Imandra_prelude.string option;
h_target_sub_id : Imandra_prelude.string option;
h_target_location_id : Imandra_prelude.string option;
h_on_behalf_of_sub_id : Imandra_prelude.string option;
h_on_behalf_of_location_id : Imandra_prelude.string option;
h_deliver_to_sub_id : Imandra_prelude.string option;
h_deliver_to_location_id : Imandra_prelude.string option;
h_poss_dup_flag : bool option;
h_poss_resend : bool option;
h_sending_time : TimeDefaults.fix_utctimestamp;
h_orig_sending_time : TimeDefaults.fix_utctimestamp option;
h_xml_data_len : Imandra_prelude.int option;
h_xml_data : Imandra_prelude.int option;
h_message_enconding : Imandra_prelude.int option;
h_last_msg_seq_num_processed : Imandra_prelude.int option;
h_no_hops : Imandra_prelude.int option;
}

Standard FIX header. Note that the standard header has tag Tag 35 that is the message type. We do not need this tag as message type is explicit.

type fix_trailer = {
signature_length : Imandra_prelude.int option;
signature : Imandra_prelude.int option;
check_sum : Imandra_prelude.int;
}

Standard FIX trailer

type full_valid_fix_msg = {
full_msg_header : fix_header;
full_msg_data : full_msg_data;
full_msg_trailer : fix_trailer;
}

Full FIX valid message data.

type full_top_level_msg =
| ValidMsg of full_valid_fix_msg
| SessionRejectedMsg of session_rejected_msg_data
| BusinessRejectedMsg of biz_rejected_msg_data
| Garbled

Union 'full' message type.