question

Upvotes
Accepted
3 0 1 3

Example of working with views in C++ EMA

I am interested in consuming a subset of the available market data. I could find an example of the concept in Java here https://developers.thomsonreuters.com/article/simple-marketprice-object-part-1

Is there a working example in C++ EMA that demonstrates the concept and the use of view data?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-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.

Upvote
Accepted
25k 87 11 23

Hi @ioannis.mademlis

If you have installed the Elektron SDK C++, you can refer to the 360__MarketPrice__View example which can be found in the Ema\Examples\Training\Consumer\300_Series sub-folder.

You will note that after allowing for C++ / Java differences, the mechanism for making a View request in EMA C++ is very similar to EMA Java

consumer.registerClient( ReqMsg().serviceName( "DIRECT_FEED" ).name( "IBM.N" )
	.payload( ElementList().addUInt( ENAME_VIEW_TYPE, 1 ).
	addArray( ENAME_VIEW_DATA, OmmArray().fixedWidth( 2 )
	.addInt( 22 ).addInt( 25 )
	.complete() ).complete() ), client );

Hope this helps.

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
3 0 1 3

Hi @Umer Nalla

Many thanks! Somehow I missed the particular example. Do you know if the particular view feature could be tested properly using data replayed from the sink_driven_src application? I tried and I get a lot more fields than those requested. e.g

Item Name: DTEGn.DE Service Name: DIRECT_FEED Name: ASK Value: 15.35 Name: SRC_SEQNM Value: 63778 Name: NO_ASKORD1 Value: 12 Name: MID_PRICE1 Value: 15.3475 Name: MID_PRICE Value: 15.3475 Name: QUOTIM Value: 12:23:9:0 Name: ASK_TONE1 Value: Name: ASK_TONE Value: Name: QUOTIM_MS Value: 44589643 Name: NA_MSG_TYP Value: X Name: EXCHTIM Value: 12:23:9:0 Name: TIMACT Value: 12:23:9:0 Name: QUOTIM_NS Value: 12:23:9:643 Name: ASKSIZE Value: 13314

Is this normal behavior? As a side note, I am wondering if the frequency of the update callbacks reflects only the changes on the data included in the view or not. In other words: are updates getting delivered if and only if any of the data associated with the FID included in the view has changed? Any idea?

Thank you

Ioannis

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.

Upvote
25k 87 11 23

Hi @ioannis.mademlis

The View functionality is implemented by the ADS server - so I would not expect sink_driven_src which is a test tool to provide the same functionality.

The other thing to bear in mind is that a View request is just that - a request. If the ADS server is too busy to filter the Fields for you, it may well send an unfiltered fuller field list during busy periods.

Assuming the ADS is able to filter your Fields, then you should only receive Update Callbacks as and when one or more of the fields specified in your view changes.

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.

Makes sense. Thank you.

Upvotes
18 1 1 2

Is there a provider example or tool that supports View to verify that my consumer correctly implemented view functionality? I need to build automatic test for it and using live connections is not an option. Thanks.

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.