question

Upvotes
Accepted
5 0 1 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-sdkrrtema-apielektron-message-apic++
icon clock
10 |1500

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

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 5.0 MiB each and 10.0 MiB total.

Upvotes
5 0 1 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea