读取 QuickFixGo 中的 MD 组。

huangapple go评论145阅读模式
英文:

Read MD groups in QuickFixGo

问题

你可以使用以下步骤来使用该函数:

  1. 首先,确保你已经安装了 quickfix 包。你可以通过运行 go get github.com/quickfixgo/quickfix 命令来安装它。

  2. 导入 quickfix 包到你的代码中:import "github.com/quickfixgo/quickfix"

  3. 在你的代码中,使用 FieldMap 类型的变量来调用该函数。例如:fm := quickfix.NewFieldMap()

  4. 使用 fm 变量调用 SetField 方法来设置字段的值。例如:fm.SetField(35, "D")

  5. 使用 fm 变量调用 GetField 方法来获取字段的值。例如:value := fm.GetField(35)

  6. 根据你的需求,可以根据函数的返回值进行相应的处理。

关于 FieldGroupReader 接口的实现示例代码片段,你可以在 quickfix 的 GitHub 仓库中找到。具体来说,你可以查看 field_map_test.go 文件中的代码示例。该文件位于 github.com/quickfixgo/quickfix 仓库的 field 目录下。

希望对你有所帮助!

英文:

How can I use the function:

https://github.com/quickfixgo/quickfix/blob/master/field_map.go#L150

Has anybody got an example code snippet showing how to implement the FieldGroupReader interface?

Many thanks

答案1

得分: 1

很可能你应该使用预定义的实现之一。例如 https://godoc.org/github.com/quickfixgo/quickfix/fix44/massquote#NoPartyIDsRepeatingGroup

如果你想实现一个非标准的组,你可以参考 https://github.com/quickfixgo/quickfix/blob/102166066b60662e45cc963e405d281cd3e20101/fix44/massquote/MassQuote.generated.go#L3895

英文:

Most likely you should be using one of the pre-defined implementation. Such as https://godoc.org/github.com/quickfixgo/quickfix/fix44/massquote#NoPartyIDsRepeatingGroup

If you want to implement a non-standard group you can follow e.g. https://github.com/quickfixgo/quickfix/blob/102166066b60662e45cc963e405d281cd3e20101/fix44/massquote/MassQuote.generated.go#L3895

huangapple
  • 本文由 发表于 2017年9月20日 00:40:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/46305687.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定