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 nishikarale · Jul 26, 2017 at 12:53 AM · configurationconfigema programmatic config

How to make my parameter Configurable by taking its value from config file?

Example:

ifstream ricFile("E:\\RicCodeFile.txt");

string ricCode;

OmmArray ricArray;

// read RICS from file into Array

if (ricFile.is_open())

{

while (getline(ricFile, ricCode)) ricArray.addAscii(ricCode.c_str()); ricArray.complete();

ricFile.close();

}

// Encode array into ReqMsg

UInt64 handle = consumer.registerClient( ReqMsg() .serviceName( "IDN_SELECTFEED" ) .payload( ElementList().addArray( ":ItemList", ricArray ).complete() ).interestAfterRefresh(true), client );

---------------------------

Currently I am hard coding file path, service Name, but I want to make it configurable using config file. please help..

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.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by moragodkrit.chumsri_1 · Jul 26, 2017 at 02:16 AM

@nishikarale

As far as I know, currently EMA C++ does not provide interface to read custom configuration from EMA configuration file.

You have to implementation your own configuration using text file or set your config in your application config using xml or json file and then use 3rd party C++ lib to read the file. Other solution might be environment variable which you can read the value from your application using getenv() from standard library. But you have to set the environment variable when you install the application on the new machine.

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 >
6 People are following this question.

Related Questions

configure channel set using programmatically

EMA C++ uses unexpected XmlTrace parameters in EmaConfig.xml configuration file

How do I set GuaranteedOutputBuffer programatically?

How to access values from OmmConsumerConfig object?

EMA programmatic configuration

  • 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