FIX 4.0 Demo 1.0
Loading...
Searching...
No Matches
fix_messages.hpp File Reference

FIX 会话层消息工厂函数 More...

#include "fix/fix_codec.hpp"
#include "fix/fix_tags.hpp"
#include "base/config.hpp"
Include dependency graph for fix_messages.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fix40
 

Functions

FixMessage fix40::create_logon_message (const std::string &sender, const std::string &target, int seq_num=1, int heart_bt=Config::instance().get_int("fix_session", "default_heartbeat_interval", 30), bool reset_seq_num=false)
 创建 Logon 消息
 
FixMessage fix40::create_heartbeat_message (const std::string &sender, const std::string &target, int seq_num, const std::string &test_req_id="")
 创建 Heartbeat 消息
 
FixMessage fix40::create_test_request_message (const std::string &sender, const std::string &target, int seq_num, const std::string &test_req_id)
 创建 TestRequest 消息
 
FixMessage fix40::create_logout_message (const std::string &sender, const std::string &target, int seq_num, const std::string &text="")
 创建 Logout 消息
 
FixMessage fix40::create_resend_request_message (const std::string &sender, const std::string &target, int seq_num, int begin_seq_no, int end_seq_no)
 创建 ResendRequest 消息
 
FixMessage fix40::create_sequence_reset_message (const std::string &sender, const std::string &target, int seq_num, int new_seq_no, bool gap_fill=true)
 创建 SequenceReset 消息
 
bool fix40::is_admin_message (const std::string &msg_type)
 判断消息类型是否为管理消息
 

Detailed Description

FIX 会话层消息工厂函数

提供创建标准 FIX 会话层消息的便捷函数,包括:

  • Logon (A) - 登录
  • Heartbeat (0) - 心跳
  • TestRequest (1) - 测试请求
  • Logout (5) - 登出