Warm tip: This article is reproduced from serverfault.com, please click

c#-如何对 char 字段中的两个符号使用 quickfix

(c# - How to use quickfix for two symbols in char field)

发布于 2021-07-13 13:36:05

我注意到在 Fix 4.4 版中,他们对 char 字段使用了两个符号

下面的例子:

FIX 4.4 : MiscFeeType <139> field
Type: char

那么让我们看看为这些字段定义了哪些值

https://www.onixs.biz/fix-dictionary/4.4/tagnum_139.html

10 = Per transaction
11 = Conversion
12 = Agent

但是 char 根据定义只有一个字符

https://www.onixs.biz/fix-dictionary/4.4/index.html#char

因此,当我提供 fix44.xml 字典文件并生成 C# 代码时,我最终会遇到如下错误

错误 CS1012:字符文字中的字符过多

public const Char PER_TRANSACTION = '10';
Questioner
Captain Comic
Viewed
11
Grant Birchmeier 2021-07-14 23:49:45

简单:在 DD 中将 139 的类型更改为字符串。

在 QuickFIX/n 中,自 2011 年以来已将 139 作为 StringField 生成。请参阅源代码