question

Upvotes
Accepted
321 1 0 9

我怎样才能保存实时发送的原始事件?

怎样以最好方式来保存RespMsg(来自RFA C++ API)原始事件到内存/磁盘,并在需要时再解码?我们的想法是尽可能少地处理这些信息,并在需要时对其进行解析/解码(像重放一样)。谢谢

treprfa
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
321 1 0 9

rfa::message::RespMsg提供了getEncodedBuffer和setEncodedBuffer方法,分别用来获取和设置与响应信息相关的编码缓冲区。

你可以使用setEncodedBuffer()从你从getEncodedBuffer()得到的缓冲区创建响应信息。

因此,在你的记录器应用程序中,你可以保存编码后的缓冲区。

1654937452876.png

这样当你想回放的时候:

1654937478965.png

从RFA跟踪文件中回放是比较麻烦的。

API没有任何功能可以帮助你读取XML跟踪文件。你必须解析XML跟踪文件并自己构建消息。


1654937452876.png (8.7 KiB)
1654937478965.png (11.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.