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
Best Answer
-
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]
...0
Answers
-
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.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛