【文章內(nèi)容簡介】
成消息模板和消息內(nèi)容。 – 消息模板在雙方通信之前就確定,實際只需要傳輸消息內(nèi)容 Field Encoding ? 常用數(shù)據(jù)類型 Data type Description string String data type int32 integer data type int64 long data type sequence repeating group Field Encoding Field Encoding Operator Entry Description Constant Constant value Default Default value if not specified Copy Copy previous value if not specified Increment Increment previous value if not specified Delta Delta value from previous value Tail Tail value from previous value Field Encoding Operator ? Constant Value 用途:主要用于表示模板中的固定數(shù)據(jù) constant value value in stream output value ―VALUE‖ N/A ―VALUE‖ Field Encoding Operator ? Default Value 用途:主要用于表示默認值 default value value in stream output value ―VALUE‖ N/A ―VALUE‖ ―VALUE‖ ―HELLO‖ ―HELLO‖ Field Encoding Operator ? Copy Value 用途:主要用于表達相鄰數(shù)據(jù)相同的情況 previous value value in stream output value ―VALUE‖ N/A ―VALUE‖ ―VALUE‖ ―HELLO‖ ―HELLO‖ Field Encoding Operator ? Increment Value 用途:主要用于表示前后數(shù)據(jù)有規(guī)律的遞增的情況 previous value value in stream output value 5 N/A 6 5 10 10 Field Encoding Field EncodingTemplate ? 定義和語法,包括: – Field( Message Structure) – Field Encoding Operator – Data Type ? 如何表示: – XML語言 Field EncodingTemplate ? XML格式的模板示例 template name=ExampleOrder messageRef name=NewOrderSingle/ string name=BeginStr constant value=/ /string u32 name=SeqNum