Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by Akechi Sato · May 04, 2017 at 12:44 AM · emac++dictionarydatadictionary

New Data Dictionary interface in EMA C++

I just downloaded latest Elektron SDK 1.1.0 with EMA3.1.0 and found below information from EMA README but can't find details about the new interface mentioned in the README in Developer Guide.

Do you have details about Dictionary interfaces and how to use it?

2.1.2 Service Requests Resolved In This Release

[EMA-779] - CaseId: 04874840 Provide interface for user access of the internal EMA dictionary

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by moragodkrit.chumsri_1 · May 04, 2017 at 01:33 AM

@Akechi Sato

There are several improvements in EMA 3.1.0. In term of Data Dictionary, I found new classes from EMA Reference Manual (<EMA Install Folder>\Docs\refman\ema). You should be able to use below classes to access EMA data dictionary

  • DataDictionary (thomsonreuters::ema::rdm)
  • DictionaryEntry (thomsonreuters::ema::rdm)
  • DictionaryUtility (thomsonreuters::ema::rdm)

Also in this version, FieldEntry class provide method to get Enum display by using getEnumDisplay() method.

The new version implements features which allow you to get access to the internal EMA dictionary via the thomsonreuters::ema::rdm::DataDictioanry class. The EMA’s DataDictionary is the Dictionary utility which provides the same capability as same as the RsslDataDictionary in ETA C. The example "332__Dictionary__Streaming" also update to use the class to decode downloaded Data Dictionary.

Moreover application can extract a DataDictionary object used by FieldList when decoding it via the DictionaryUtility::dataDictionary() static method. But The DataDictionary is valid only in the context of a callback method according to EMA Reference Manual.

DataDictionary and DictionaryEntry class also provide interfaces to get Dictionary information such as EnumTables, DictionaryID, FieldVersion, EnumRecordTemplateVersion.

Below is snippet of codes I used to access Dictionary data such as Fid ID, Fid Acronym and print Enum table in case that the Fid is Enumerate field. I have tested the codes with 332_Dictionary_Streaming example and change codes in AppClient::decode to print dictionary after it received both RWFFld and RWFEnum dictionary.

if (fldDictComplete && enumTypeComplete)
{
    const EmaVector<DictionaryEntry>& dictEntries =
dataDictionary.getEntries();
    for (int index=0; index < dictEntries.size(); index++)
    { 
               int fidID = dictEntries[index].getFid();
               std::cout<< "FID[" << fidID << "][" <<
dictEntries[index].getAcronym() << "]" << endl;

               if(dictEntries[index].hasEnumTypeTable())
               {
                   const EnumTypeTable& enumTable = dictEntries[index].getEnumTypeTable();
		   const EmaVector<EnumType>& enumType = enumTable.getEnumTypes();
                   for(int i = 0; i < enumType.size(); i++)
                   {
		      EmaString displayTxt;
                      displayTxt.append(enumType[i].getDisplay());
                      cout<< "\t Enum [" << enumType[i].getValue() << "]
Display[" << displayTxt << "]" << endl;
                    }
               }
     }
}

And below is output when running the example with modified codes

…


FID[12][HIGH_1]
FID[13][LOW_1]
FID[14][PRCTCK_1]
                Enum [0] Display[ ]
                Enum [1] Display[Þ]
                Enum [2] Display[þ]
                Enum [3] Display[ ]
                Enum [4] Display[0]
                Enum [5] Display[U]
                Enum [6] Display[D]
                Enum [7] Display[+]
                Enum [8] Display[-]
FID[15][CURRENCY]
                Enum [0] Display[   ]
                Enum [4] Display[AFA]
                Enum [8] Display[ALL]
                Enum [12] Display[DZD]
                Enum [20] Display[ADP]
                Enum [24] Display[AON]
                Enum [32] Display[ARS]
                Enum [36] Display[AUD]
                Enum [37] Display[AUc]
                Enum [40] Display[ATS]
                Enum [44] Display[BSD]
                Enum [48] Display[BHD]
                Enum [50] Display[BDT]
                Enum [51] Display[AMD]
                Enum [52] Display[BBD]
                Enum [56] Display[BEF]
                Enum [60] Display[BMD]
                Enum [64] Display[BTN]
                Enum [68] Display[BOB]
                Enum [70] Display[BAD]
                Enum [72] Display[BWP]
                Enum [76] Display[BRL]
...
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by soranat.thiarachow · May 04, 2017 at 11:57 AM


EMA provides the dictionary streaming feature for applications to create dictionary request to receive dictionary response messages internally used by EMA or from the network. The internal dictionary used by EMA can be loaded either from the file or network dictionary. The 332__Dictionary__Streaming example shows how to create two dictionary request messages to access the internal EMA dictionary as follows:

UInt64 fldHandle = consumer.registerClient(ReqMsg().name("RWFFld").filter(DICTIONARY_NORMAL).domainType(MMT_DICTIONARY),client,closure);
UInt64 enumHandle = consumer.registerClient(ReqMsg().name("RWFEnum").filter(DICTIONARY_NORMAL).domainType(MMT_DICTIONARY),client,closure);

For requesting dictionary from network, applications must specify either service name or Id to explicitly request dictionary from a provider.

UInt64 fldHandle = consumer.registerClient(ReqMsg().name("RWFFld").filter(DICTIONARY_NORMAL).domainType(MMT_DICTIONARY).serviceName("ELEKTRON_DD"),client,closure);
UInt64 enumHandle = consumer.registerClient(ReqMsg().name("RWFEnum").filter(DICTIONARY_NORMAL).domainType(MMT_DICTIONARY).serviceName("ELEKTRON_DD"),client,closure);

For handling dictionary response messages, applications can use an instance of DataDictionary object to store the payload of the messages and use DataDictionary to retrieve dictionary information such as dictionary version, iterate all dictionary entry and enumerated type definition, search for a dictionary entry with a field name or Id, search for an enumerated type definition.

Furthermore, the DataDictionary class can be used to load dictionary from file and encode the dictionary payload. Please see IProvider 332__Dictionary_UserControl that demonstrates how to use these functionalities.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

How to get FieldID from a FieldName?

Is OmmConsumer::unregister a synchronous call?

How to Post with EMA C++

When does a handle returned by thomsonreuters::ema::access::OmmConsumer::registerClient become invalid?

Migrating from RFA to EMA - Dictionary management and access

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges