question

Upvotes
Accepted
5 0 3 2

Creating and using Ema objects

I have written a linux C++ client which consumes EMA objects streamed from a Reuters feed, this all works fine. However, I am having trouble creating EMA objects.

The code below fails with:

memory access violation at address: 0x000004c9: no mapping at fault address

I must be missing something obvious. Any ideas on what that might be?

FieldList fields;
fields.addInt (1, 100)
      .addInt (2, 200)
      .complete ();
while (fields.forth ())
{ }
elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apic++
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.

Monitored by @moragodkrit

@marketdata

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
7.6k 15 6 9

@marketdata

This should be the restriction of EMA C++ mentioned in section 3.2.3 Data Class from EMA Developer Guide. Below is information from Deve Guide

The EMA does not support immediately retrieving data from freshly created OMM containers or messages. The following code snippet demonstrates this restriction:

FieldList fieldList;
fieldList.addAscii( 1, "ascii" ).addInt( 10, 20 ).complete();
while ( fieldList.forth() )
{
const FieldEntry& fieldEntry = fieldList.getEntry();
...
}
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.

Upvotes
5 0 3 2

The reason I didn't tag the posted response as resolving my query is because it doesn't say how to use actually create and use an EMA object. This would be useful in order to drive unit tests.

After some scanning of Ema source code it seems the only way to do this is to serialise objects into a Reuters transport layer and then retrieve them back again again through callbacks.

Please let me know if my understanding is not correct.

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.