EMA C++ Edition
List of all members
refinitiv::ema::access::UpdateMsg Class Reference

UpdateMsg conveys changes to item data. More...

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

Public Member Functions

Constructor
 UpdateMsg ()
  More...
 
 UpdateMsg (const UpdateMsg &other)
  More...
 
virtual ~UpdateMsg ()
  More...
 
Accessors
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 hasSeqNum () const
  More...
 
bool hasPermissionData () const
  More...
 
bool hasConflated () const
  More...
 
bool hasPublisherId () const
  More...
 
bool hasServiceName () const
  More...
 
UInt8 getUpdateTypeNum () const
  More...
 
UInt32 getSeqNum () const
  More...
 
const EmaBuffergetPermissionData () const
  More...
 
UInt16 getConflatedTime () const
  More...
 
UInt16 getConflatedCount () const
  More...
 
UInt32 getPublisherIdUserId () const
  More...
 
UInt32 getPublisherIdUserAddress () const
  More...
 
bool getDoNotCache () const
  More...
 
bool getDoNotConflate () const
  More...
 
bool getDoNotRipple () 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 ItemCallbackClient
 
UpdateMsgclear ()
  More...
 
UpdateMsgstreamId (Int32 streamId)
  More...
 
UpdateMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
  More...
 
UpdateMsgname (const EmaString &name)
  More...
 
UpdateMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
  More...
 
UpdateMsgserviceName (const EmaString &serviceName)
  More...
 
UpdateMsgserviceId (UInt32 serviceId)
  More...
 
UpdateMsgid (Int32 id)
  More...
 
UpdateMsgfilter (UInt32 filter)
  More...
 
UpdateMsgupdateTypeNum (UInt8 updateTypeNum)
  More...
 
UpdateMsgseqNum (UInt32 seqNum)
  More...
 
UpdateMsgpermissionData (const EmaBuffer &permissionData)
  More...
 
UpdateMsgconflated (UInt16 count=0, UInt16 time=0)
  More...
 
UpdateMsgpublisherId (UInt32 userId, UInt32 userAddress)
  More...
 
UpdateMsgattrib (const ComplexType &data)
  More...
 
UpdateMsgpayload (const ComplexType &data)
  More...
 
UpdateMsgextendedHeader (const EmaBuffer &buffer)
  More...
 
UpdateMsgdoNotCache (bool doNotCache=false)
  More...
 
UpdateMsgdoNotConflate (bool doNotConflate=false)
  More...
 
UpdateMsgdoNotRipple (bool doNotRipple=false)
  More...
 

Additional Inherited Members

- Public Types inherited from refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 
- 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

The following code snippet shows receiving and processing of UpdateMsg.

class AppClient ; public OmmConsumerClient
{
...
void onUpdateMsg( const UpdateMsg& , const OmmConsumerEvent& );
};
void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& event )
{
cout << "Item's handle = " << event.getHandle() << "\n";
if ( updateMsg.hasName() )
cout << "Item's name = " << updateMsg.getName() << "\n";
if ( updateMsg.hasServiceName() )
cout << "Item's name = " << updateMsg.getServiceName() << "\n";
switch ( updateMsg.getPayload().getDataTyoe() )
{
decode( updateMsg.getPayload().getFieldList() );
break;
break;
}
}
Remarks
Calling get***() method on an optional member of UpdateMsg 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 UpdateMsg.
Objects of this class are not cache-able.
Decoding of just encoded UpdateMsg 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 72 of file UpdateMsg.h.

Constructor & Destructor Documentation

◆ UpdateMsg() [1/2]

refinitiv::ema::access::UpdateMsg::UpdateMsg ( )

Constructs UpdateMsg.

◆ UpdateMsg() [2/2]

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

Copy constructor.

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

◆ ~UpdateMsg()

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

Destructor.

Member Function Documentation

◆ attrib()

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

Specifies Attrib.

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

◆ clear()

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

Clears the UpdateMsg.

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

◆ conflated()

UpdateMsg& refinitiv::ema::access::UpdateMsg::conflated ( UInt16  count = 0,
UInt16  time = 0 
)

Specifies Conflated.

Parameters
[in]countspecifies how many updates were conflated
[in]timespecifies how long the conflation was on
Returns
reference to this object

◆ domainType()

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

Specifies DomainType.

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

◆ doNotCache()

UpdateMsg& refinitiv::ema::access::UpdateMsg::doNotCache ( bool  doNotCache = false)

Specifies DoNotCache.

Parameters
[in]doNotCachetrue if this update must not be cached; false otherwise (default value is false)
Returns
reference to this object

◆ doNotConflate()

UpdateMsg& refinitiv::ema::access::UpdateMsg::doNotConflate ( bool  doNotConflate = false)

Specifies DoNotConflate.

Parameters
[in]doNotConflatetrue if this update must not be conflated; false otherwise (default value is false)
Returns
reference to this object

◆ doNotRipple()

UpdateMsg& refinitiv::ema::access::UpdateMsg::doNotRipple ( bool  doNotRipple = false)

Specifies DoNotRipple.

Parameters
[in]doNotRippletrue if this update does not ripple; false otherwise (default value is false)
Returns
reference to this object

◆ extendedHeader()

UpdateMsg& refinitiv::ema::access::UpdateMsg::extendedHeader ( const EmaBuffer buffer)

Specifies ExtendedHeader.

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

◆ filter()

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

Specifies Filter.

Parameters
[in]filterspecifies filter
Returns
reference to this object

◆ getAsHex()

const EmaBuffer& refinitiv::ema::access::UpdateMsg::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::UpdateMsg::getCode ( ) const
virtual

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

Returns
Data::NoCodeEnum

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

◆ getConflatedCount()

UInt16 refinitiv::ema::access::UpdateMsg::getConflatedCount ( ) const

Returns ConflatedCount.

Exceptions
OmmInvalidUsageExceptionif hasConflated() returns false
Returns
number of conflated updates

◆ getConflatedTime()

UInt16 refinitiv::ema::access::UpdateMsg::getConflatedTime ( ) const

Returns ConflatedTime.

Exceptions
OmmInvalidUsageExceptionif hasConflated() returns false
Returns
time conflation was on

◆ getDataType()

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

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

Returns
DataType::UpdateMsgEnum

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

◆ getDoNotCache()

bool refinitiv::ema::access::UpdateMsg::getDoNotCache ( ) const

Returns DoNotCache.

Returns
true if this update must not be cached; false otherwise

◆ getDoNotConflate()

bool refinitiv::ema::access::UpdateMsg::getDoNotConflate ( ) const

Returns DoNotConflate.

Returns
true if this update must not be conflated; false otherwise

◆ getDoNotRipple()

bool refinitiv::ema::access::UpdateMsg::getDoNotRipple ( ) const

Returns DoNotRipple.

Returns
true if this update does not ripple; false otherwise

◆ getPermissionData()

const EmaBuffer& refinitiv::ema::access::UpdateMsg::getPermissionData ( ) const

Returns PermissionData.

Exceptions
OmmInvalidUsageExceptionif hasPermissionData() returns false
Returns
EmaBuffer containing permission data

◆ getPublisherIdUserAddress()

UInt32 refinitiv::ema::access::UpdateMsg::getPublisherIdUserAddress ( ) const

Returns PublisherIdUserAddress.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user address

◆ getPublisherIdUserId()

UInt32 refinitiv::ema::access::UpdateMsg::getPublisherIdUserId ( ) const

Returns PublisherIdUserId.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user Id

◆ getSeqNum()

UInt32 refinitiv::ema::access::UpdateMsg::getSeqNum ( ) const

Returns SeqNum.

Exceptions
OmmInvalidUsageExceptionif hasSeqNum() returns false
Returns
sequence number

◆ getServiceName()

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

Returns the ServiceName within the MsgKey.

Exceptions
OmmInvalidUsageExceptionif hasServiceName() returns false
Returns
EmaString containing service name

◆ getUpdateTypeNum()

UInt8 refinitiv::ema::access::UpdateMsg::getUpdateTypeNum ( ) const

Returns UpdateTypeNum.

Returns
update type number (e.g., rdm::INSTRUMENT_UPDATE_QUOTE)

◆ hasConflated()

bool refinitiv::ema::access::UpdateMsg::hasConflated ( ) const

Indicates presence of Conflated.

Returns
true if update contains conflated data; false otherwise

◆ hasPermissionData()

bool refinitiv::ema::access::UpdateMsg::hasPermissionData ( ) const

Indicates presence of PermissionData.

Remarks
permission data is an optional member of UpdateMsg
Returns
true if permission data is set; false otherwise

◆ hasPublisherId()

bool refinitiv::ema::access::UpdateMsg::hasPublisherId ( ) const

Indicates presence of PublisherId.

Remarks
publisher id is an optional member of UpdateMsg
Returns
true if publisher id is set; false otherwise

◆ hasSeqNum()

bool refinitiv::ema::access::UpdateMsg::hasSeqNum ( ) const

Indicates presence of SeqNum.

Remarks
sequence number is an optional member of UpdateMsg
Returns
true if sequence number is set; false otherwise

◆ hasServiceName()

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

Indicates presence of the ServiceName within the MsgKey.

Remarks
service name is an optional member of UpdateMsg
Returns
true if service name is set; false otherwise

◆ id()

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

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object

◆ name()

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

Specifies Name.

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

◆ nameType()

UpdateMsg& refinitiv::ema::access::UpdateMsg::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

◆ payload()

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

Specifies Payload.

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

◆ permissionData()

UpdateMsg& refinitiv::ema::access::UpdateMsg::permissionData ( const EmaBuffer permissionData)

Specifies PermissionData.

Parameters
[in]permissionDataan EmaBuffer object with permission data information
Returns
reference to this object

◆ publisherId()

UpdateMsg& refinitiv::ema::access::UpdateMsg::publisherId ( UInt32  userId,
UInt32  userAddress 
)

Specifies PublisherId.

Parameters
[in]UserIdspecifies publisher's user id
[in]UserAddressspecifies publisher's user address
Returns
reference to this object

◆ seqNum()

UpdateMsg& refinitiv::ema::access::UpdateMsg::seqNum ( UInt32  seqNum)

Specifies SeqNum.

Parameters
[in]seqNumspecifies sequence number
Returns
reference to this object

◆ serviceId()

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

Specifies ServiceId.

Exceptions
OmmInvalidUsageExceptionif service name is already set
Parameters
[in]serviceIdspecifies service id
Returns
reference to this object

◆ serviceName()

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

Specifies ServiceName.

Exceptions
OmmInvalidUsageExceptionif service id is already set
Parameters
[in]serviceNamespecifies service name
Returns
reference to this object

◆ streamId()

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

Specifies StreamId.

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

◆ toString() [1/2]

const EmaString& refinitiv::ema::access::UpdateMsg::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::UpdateMsg::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

◆ updateTypeNum()

UpdateMsg& refinitiv::ema::access::UpdateMsg::updateTypeNum ( UInt8  updateTypeNum)

Specifies UpdateTypeNum.

Parameters
[in]updateTypeNumspecifies update type number (e.g., rdm::INSTRUMENT_UPDATE_QUOTE)