EMA C++ Edition
List of all members | Public Types
refinitiv::ema::access::ReqMsg Class Reference

ReqMsg allows consumer application to express its interest in an item. More...

Inheritance diagram for refinitiv::ema::access::ReqMsg:
refinitiv::ema::access::Msg refinitiv::ema::access::ComplexType refinitiv::ema::access::Data

Public Types

enum  Rate {
  TickByTickEnum = 0 ,
  JustInTimeConflatedEnum = 0xFFFFFF00 ,
  BestConflatedRateEnum = 0xFFFFFFFF ,
  BestRateEnum = 0xFFFFFFFE
}
 
enum  Timeliness {
  RealTimeEnum = 0 ,
  BestDelayedTimelinessEnum = 0xFFFFFFFF ,
  BestTimelinessEnum = 0xFFFFFFFE
}
 
- Public Types inherited from refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 

Public Member Functions

Constructor
 ReqMsg ()
  More...
 
 ReqMsg (const ReqMsg &other)
  More...
 
Destructor
virtual ~ReqMsg ()
  More...
 
Accessors
const EmaStringgetRateAsString () const
  More...
 
const EmaStringgetTimelinessAsString () const
  More...
 
DataType::DataTypeEnum getDataType () const
  More...
 
Data::DataCode getCode () const
  More...
 
const EmaBuffergetAsHex () const
  More...
 
const EmaStringtoString () const
  More...
 
const EmaStringtoString (const refinitiv::ema::rdm::DataDictionary &dictionary) const
  More...
 
bool hasPriority () const
  More...
 
bool hasQos () const
  More...
 
bool hasView () const
  More...
 
bool hasBatch () const
  More...
 
bool hasServiceName () const
  More...
 
UInt8 getPriorityClass () const
  More...
 
UInt16 getPriorityCount () const
  More...
 
UInt32 getQosTimeliness () const
  More...
 
UInt32 getQosRate () const
  More...
 
bool getInitialImage () const
  More...
 
bool getInterestAfterRefresh () const
  More...
 
bool getConflatedInUpdates () const
  More...
 
bool getPause () const
  More...
 
bool getPrivateStream () const
  More...
 
const EmaStringgetServiceName () const
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::Msg
bool hasMsgKey () const
  More...
 
bool hasName () const
  More...
 
bool hasNameType () const
  More...
 
bool hasServiceId () const
  More...
 
bool hasId () const
  More...
 
bool hasFilter () const
  More...
 
bool hasExtendedHeader () const
  More...
 
Int32 getStreamId () const
  More...
 
UInt16 getDomainType () const
  More...
 
const EmaStringgetName () const
  More...
 
UInt8 getNameType () const
  More...
 
UInt32 getServiceId () const
  More...
 
Int32 getId () const
  More...
 
UInt32 getFilter () const
  More...
 
const EmaBuffergetExtendedHeader () const
  More...
 
const AttribgetAttrib () const
  More...
 
const PayloadgetPayload () const
  More...
 
virtual ~Msg ()
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::ComplexType
virtual ~ComplexType ()
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::Data
const EmaStringgetCodeAsString () const
  More...
 
 operator const char * () const
  More...
 
virtual ~Data ()
  More...
 

Operations

class MarketItemHandler
 
class DirectoryHandler
 
class DictionaryHandler
 
ReqMsgclear ()
  More...
 
ReqMsgstreamId (Int32 streamId)
  More...
 
ReqMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
  More...
 
ReqMsgname (const EmaString &name)
  More...
 
ReqMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
  More...
 
ReqMsgserviceName (const EmaString &serviceName)
  More...
 
ReqMsgserviceId (UInt32 serviceId)
  More...
 
ReqMsgid (Int32 id)
  More...
 
ReqMsgfilter (UInt32 filter)
  More...
 
ReqMsgpriority (UInt8 priorityClass=1, UInt16 priorityCount=1)
  More...
 
ReqMsgqos (UInt32 timeliness=BestTimelinessEnum, UInt32 rate=BestRateEnum)
  More...
 
ReqMsgattrib (const ComplexType &data)
  More...
 
ReqMsgpayload (const ComplexType &data)
  More...
 
ReqMsgextendedHeader (const EmaBuffer &Buffer)
  More...
 
ReqMsginitialImage (bool initialImage=true)
  More...
 
ReqMsginterestAfterRefresh (bool interestAfterRefresh=true)
  More...
 
ReqMsgpause (bool pause=false)
  More...
 
ReqMsgconflatedInUpdates (bool conflatedInUpdates=false)
  More...
 
ReqMsgprivateStream (bool privateStream=false)
  More...
 

Additional Inherited Members

- Protected Member Functions inherited from refinitiv::ema::access::Msg
 Msg ()
 
const Encoder & getEncoder () const
  More...
 
bool hasEncoder () const
  More...
 
void setDecoder (MsgDecoder *)
 
bool hasDecoder () const
  More...
 
- Protected Member Functions inherited from refinitiv::ema::access::ComplexType
 ComplexType ()
 
- Protected Member Functions inherited from refinitiv::ema::access::Data
 Data ()
 
- Protected Attributes inherited from refinitiv::ema::access::Msg
MsgDecoder_pDecoder
 
MsgEncoder * _pEncoder
 
Attrib _attrib
 
Payload _payload
 

Detailed Description

Among other attributes, ReqMsg conveys item's name, service, domain type, and desired quality of service. ReqMsg may also be used to: specify application interest in a dynamic view, open a batch of items, or request a symbol list item with its data.

The following code snippet shows specification of ReqMsg and registration of interest in this item.

class AppClient : public OmmConsumerClient { ... }
AppClient client;
OmmConsumer consumer( OmmConsumerConfig().host( "1.1.1.1:14002" ) );
ReqMsg reqMsg;
reqMsg.name( "IBM.N" ).serviceName( "DIRECT_FEED" ).priority( 2, 1 );
UInt64 itemHandle = consumer.registerClient( reqMsg, appClient );
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
Remarks
Calling get***() method on an optional member of ReqMsg must be preceded by a call to respective has***() method.
Objects of this class are intended to be short lived or rather transitional.
This class is designed to efficiently perform setting and getting of information from ReqMsg.
Objects of this class are not cache-able.
Decoding of just encoded ReqMsg in the same application is not supported.
All methods in this class are Lock-free Method.
See also
Data, Msg, EmaString, EmaBuffer

Definition at line 59 of file ReqMsg.h.

Member Enumeration Documentation

◆ Rate

An enumeration representing Qos Rate.

Enumerator
TickByTickEnum 

Rate is Tick By Tick, indicates every change to information is conveyed

JustInTimeConflatedEnum 

Rate is Just In Time Conflated, indicates extreme bursts of data may be conflated

BestConflatedRateEnum 

Request Rate with range from 1 millisecond conflation to maximum conflation.

BestRateEnum 

Request Rate with range from tick-by-tick to maximum conflation.

Definition at line 66 of file ReqMsg.h.

◆ Timeliness

An enumeration representing Qos Timeliness.

Enumerator
RealTimeEnum 

Timeliness is RealTime, indicates information is updated as soon as new information becomes available

BestDelayedTimelinessEnum 

Request Timeliness with range from one second delay to maximum delay.

BestTimelinessEnum 

Request Timeliness with range from real-time to maximum delay.

Definition at line 82 of file ReqMsg.h.

Constructor & Destructor Documentation

◆ ReqMsg() [1/2]

refinitiv::ema::access::ReqMsg::ReqMsg ( )

Constructs ReqMsg.

◆ ReqMsg() [2/2]

refinitiv::ema::access::ReqMsg::ReqMsg ( const ReqMsg other)

Copy constructor.

Remarks
this is used to copy and process ReqMsg outside of EMA's callback methods.
this method does not support passing in just encoded ReqMsg in the application space.

◆ ~ReqMsg()

virtual refinitiv::ema::access::ReqMsg::~ReqMsg ( )
virtual

Destructor.

Member Function Documentation

◆ attrib()

ReqMsg& refinitiv::ema::access::ReqMsg::attrib ( const ComplexType data)

Specifies Attrib.

Parameters
[in]attriban object of ComplexType
Returns
reference to this object

◆ clear()

ReqMsg& refinitiv::ema::access::ReqMsg::clear ( )

Clears the ReqMsg.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object

◆ conflatedInUpdates()

ReqMsg& refinitiv::ema::access::ReqMsg::conflatedInUpdates ( bool  conflatedInUpdates = false)

Specifies ConflatedInUpdates.

Parameters
[in]conflatedInUpdatesspecifies if conflated update is requested (default value is false)
Returns
reference to this object

◆ domainType()

ReqMsg& refinitiv::ema::access::ReqMsg::domainType ( UInt16  domainType = rdm::MMT_MARKET_PRICE)

Specifies DomainType.

Exceptions
OmmUnsupportedDomainTypeExceptionif domainType is greater than 255
Parameters
[in]domainTypespecifies RDM Message Model Type (default value is rdm::MMT_MARKET_PRICE)
Returns
reference to this object

◆ extendedHeader()

ReqMsg& refinitiv::ema::access::ReqMsg::extendedHeader ( const EmaBuffer Buffer)

Specifies ExtendedHeader.

Parameters
[in]bufferan EmaBuffer containing extendedHeader information
Returns
reference to this object

◆ filter()

ReqMsg& refinitiv::ema::access::ReqMsg::filter ( UInt32  filter)

Specifies Filter.

Parameters
[in]filterspecifies filter
Returns
reference to this object

◆ getAsHex()

const EmaBuffer& refinitiv::ema::access::ReqMsg::getAsHex ( ) const
virtual

Returns a buffer that in turn provides an alphanumeric null-terminated hexadecimal string representation.

Returns
a buffer with the message hex information

Implements refinitiv::ema::access::Data.

◆ getCode()

Data::DataCode refinitiv::ema::access::ReqMsg::getCode ( ) const
virtual

Returns the Code, which indicates a special state of a DataType.

Returns
Data::NoCodeEnum

Implements refinitiv::ema::access::Data.

◆ getConflatedInUpdates()

bool refinitiv::ema::access::ReqMsg::getConflatedInUpdates ( ) const

Returns ConflatedInUpdates.

Returns
true if conflation is requested; false otherwise

◆ getDataType()

DataType::DataTypeEnum refinitiv::ema::access::ReqMsg::getDataType ( ) const
virtual

Returns the DataType, which is the type of Omm data. Results in this class type.

Returns
DataType::ReqMsgEnum

Implements refinitiv::ema::access::Data.

◆ getInitialImage()

bool refinitiv::ema::access::ReqMsg::getInitialImage ( ) const

Returns InitialImage.

Returns
true if an initial image is requested; false otherwise

◆ getInterestAfterRefresh()

bool refinitiv::ema::access::ReqMsg::getInterestAfterRefresh ( ) const

Returns InterestAfterRefresh.

Returns
true if an interest after refresh is requested; false otherwise

◆ getPause()

bool refinitiv::ema::access::ReqMsg::getPause ( ) const

Returns Pause.

Returns
true if pause is requested; false otherwise

◆ getPriorityClass()

UInt8 refinitiv::ema::access::ReqMsg::getPriorityClass ( ) const

Returns PriorityClass.

Exceptions
OmmInvalidUsageExceptionif hasPriority() returns false
Returns
priority class

◆ getPriorityCount()

UInt16 refinitiv::ema::access::ReqMsg::getPriorityCount ( ) const

Returns PriorityCount.

Exceptions
OmmInvalidUsageExceptionif hasPriority() returns false
Returns
priority count

◆ getPrivateStream()

bool refinitiv::ema::access::ReqMsg::getPrivateStream ( ) const

Returns PrivateStream.

Returns
true if private stream is requested; false otherwise

◆ getQosRate()

UInt32 refinitiv::ema::access::ReqMsg::getQosRate ( ) const

Returns QosRate.

Exceptions
OmmInvalidUsageExceptionif hasQos() returns false
Returns
Qos Rate

◆ getQosTimeliness()

UInt32 refinitiv::ema::access::ReqMsg::getQosTimeliness ( ) const

Returns QosTimeliness.

Exceptions
OmmInvalidUsageExceptionif hasQos() returns false
Returns
Qos Timeliness

◆ getRateAsString()

const EmaString& refinitiv::ema::access::ReqMsg::getRateAsString ( ) const

Returns the Rate value as a string format.

Returns
string representation of Qos Rate

◆ getServiceName()

const EmaString& refinitiv::ema::access::ReqMsg::getServiceName ( ) const

Returns the ServiceName within the MsgKey.

Exceptions
OmmInvalidUsageExceptionif hasServiceName() returns false
Returns
service name

◆ getTimelinessAsString()

const EmaString& refinitiv::ema::access::ReqMsg::getTimelinessAsString ( ) const

Returns the Timeliness value as a string format.

Returns
string representation of Qos Timeliness

◆ hasBatch()

bool refinitiv::ema::access::ReqMsg::hasBatch ( ) const

Indicates presence of Batch.

Remarks
Batch specification is an optional member of ReqMsg
Returns
true if Batch specification is set; false otherwise

◆ hasPriority()

bool refinitiv::ema::access::ReqMsg::hasPriority ( ) const

Indicates presence of Priority.

Remarks
Priority is an optional member of ReqMsg
Returns
true if priority is set; false otherwise

◆ hasQos()

bool refinitiv::ema::access::ReqMsg::hasQos ( ) const

Indicates presence of Qos.

Remarks
Qos is an optional member of ReqMsg
Returns
true if Qos is set; false otherwise

◆ hasServiceName()

bool refinitiv::ema::access::ReqMsg::hasServiceName ( ) const

Indicates presence of the ServiceName within the MsgKey.

Remarks
ServiceName is an optional member of ReqMsg.
Returns
true if service name is set; false otherwise

◆ hasView()

bool refinitiv::ema::access::ReqMsg::hasView ( ) const

Indicates presence of View.

Remarks
View specification is an optional member of ReqMsg
Returns
true if View is set; false otherwise

◆ id()

ReqMsg& refinitiv::ema::access::ReqMsg::id ( Int32  id)

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object

◆ initialImage()

ReqMsg& refinitiv::ema::access::ReqMsg::initialImage ( bool  initialImage = true)

Specifies InitialImage.

Parameters
[in]initialImagespecifies if initial image / refresh is requested (default value is true)
Returns
reference to this object

◆ interestAfterRefresh()

ReqMsg& refinitiv::ema::access::ReqMsg::interestAfterRefresh ( bool  interestAfterRefresh = true)

Specifies InterestAfterRefresh.

Parameters
[in]interestAfterRefreshspecifies if streaming or snapshot item is requested default value is true / streaming item)
Returns
reference to this object

◆ name()

ReqMsg& refinitiv::ema::access::ReqMsg::name ( const EmaString name)

Specifies Name.

Parameters
[in]namespecifies item name
Returns
reference to this object

◆ nameType()

ReqMsg& refinitiv::ema::access::ReqMsg::nameType ( UInt8  nameType = rdm::INSTRUMENT_NAME_RIC)

Specifies NameType.

Parameters
[in]nameTypespecifies RDM Instrument NameType (default value is rdm::INSTRUMENT_NAME_RIC)
Returns
reference to this object

◆ pause()

ReqMsg& refinitiv::ema::access::ReqMsg::pause ( bool  pause = false)

Specifies Pause.

Parameters
[in]pausespecifies if pause is requested (default value is false)
Returns
reference to this object

◆ payload()

ReqMsg& refinitiv::ema::access::ReqMsg::payload ( const ComplexType data)

Specifies Payload.

Parameters
[in]payloadan object of ComplexType
Returns
reference to this object

◆ priority()

ReqMsg& refinitiv::ema::access::ReqMsg::priority ( UInt8  priorityClass = 1,
UInt16  priorityCount = 1 
)

Specifies Priority.

Parameters
[in]priorityClassspecifies priority class
[in]priorityCountspecifies priority count within priority class
Returns
reference to this object

◆ privateStream()

ReqMsg& refinitiv::ema::access::ReqMsg::privateStream ( bool  privateStream = false)

Specifies PrivateStream.

Parameters
[in]privateStreamspecifies if private stream is requested (default value is false)
Returns
reference to this object

◆ qos()

ReqMsg& refinitiv::ema::access::ReqMsg::qos ( UInt32  timeliness = BestTimelinessEnum,
UInt32  rate = BestRateEnum 
)

Specifies Qos as timeliness and rate.

Parameters
[in]timelinessspecifies Qos Timeliness (default value is BestTimelinessEnum)
[in]ratespecifies Qos rate (default value is BestRateEnum)
Returns
reference to this object

◆ serviceId()

ReqMsg& refinitiv::ema::access::ReqMsg::serviceId ( UInt32  serviceId)

Specifies ServiceId.

Remarks
One service identification must be set, either id or name.
Exceptions
OmmInvalidUsageExceptionif service name is already set
Parameters
[in]serviceIdspecifies service id
Returns
reference to this object

◆ serviceName()

ReqMsg& refinitiv::ema::access::ReqMsg::serviceName ( const EmaString serviceName)

Specifies ServiceName.

Remarks
One service identification must be set, either id or name.
Exceptions
OmmInvalidUsageExceptionif service id is already set
Parameters
[in]serviceNamespecifies service name
Returns
reference to this object

◆ streamId()

ReqMsg& refinitiv::ema::access::ReqMsg::streamId ( Int32  streamId)

Specifies StreamId.

Parameters
[in]streamIdspecifies stream id
Returns
reference to this object

◆ toString() [1/2]

const EmaString& refinitiv::ema::access::ReqMsg::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements refinitiv::ema::access::Data.

◆ toString() [2/2]

const EmaString& refinitiv::ema::access::ReqMsg::toString ( const refinitiv::ema::rdm::DataDictionary dictionary) const

Returns a string representation of the class instance for just encoded object.

Parameters
[in]dictionaryuse for toString() conversion
Returns
string representation of the class instance