EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Friends
thomsonreuters::ema::access::UpdateMsg Class Reference

UpdateMsg conveys changes to item data. More...

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

Public Member Functions

Constructor
 UpdateMsg ()
 
 UpdateMsg (const UpdateMsg &other)
 
virtual ~UpdateMsg ()
 
Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
bool hasSeqNum () const
 
bool hasPermissionData () const
 
bool hasConflated () const
 
bool hasPublisherId () const
 
bool hasServiceName () const
 
UInt8 getUpdateTypeNum () const
 
UInt32 getSeqNum () const
 
const EmaBuffergetPermissionData () const
 
UInt16 getConflatedTime () const
 
UInt16 getConflatedCount () const
 
UInt32 getPublisherIdUserId () const
 
UInt32 getPublisherIdUserAddress () const
 
bool getDoNotCache () const
 
bool getDoNotConflate () const
 
bool getDoNotRipple () const
 
const EmaStringgetServiceName () const
 
Operations
UpdateMsgclear ()
 
UpdateMsgstreamId (Int32 streamId)
 
UpdateMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
 
UpdateMsgname (const EmaString &name)
 
UpdateMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
 
UpdateMsgserviceName (const EmaString &serviceName)
 
UpdateMsgserviceId (UInt32 serviceId)
 
UpdateMsgid (Int32 id)
 
UpdateMsgfilter (UInt32 filter)
 
UpdateMsgupdateTypeNum (UInt8 updateTypeNum)
 
UpdateMsgseqNum (UInt32 seqNum)
 
UpdateMsgpermissionData (const EmaBuffer &permissionData)
 
UpdateMsgconflated (UInt16 count=0, UInt16 time=0)
 
UpdateMsgpublisherId (UInt32 userId, UInt32 userAddress)
 
UpdateMsgattrib (const ComplexType &data)
 
UpdateMsgpayload (const ComplexType &data)
 
UpdateMsgextendedHeader (const EmaBuffer &buffer)
 
UpdateMsgdoNotCache (bool doNotCache=false)
 
UpdateMsgdoNotConflate (bool doNotConflate=false)
 
UpdateMsgdoNotRipple (bool doNotRipple=false)
 
- Public Member Functions inherited from thomsonreuters::ema::access::Msg
bool hasMsgKey () const
 
bool hasName () const
 
bool hasNameType () const
 
bool hasServiceId () const
 
bool hasId () const
 
bool hasFilter () const
 
bool hasExtendedHeader () const
 
Int32 getStreamId () const
 
UInt16 getDomainType () const
 
const EmaStringgetName () const
 
UInt8 getNameType () const
 
UInt32 getServiceId () const
 
Int32 getId () const
 
UInt32 getFilter () const
 
const EmaBuffergetExtendedHeader () const
 
const AttribgetAttrib () const
 
const PayloadgetPayload () const
 
virtual ~Msg ()
 
- Public Member Functions inherited from thomsonreuters::ema::access::ComplexType
virtual ~ComplexType ()
 
- Public Member Functions inherited from thomsonreuters::ema::access::Data
const EmaStringgetCodeAsString () const
 
 operator const char * () const
 
virtual ~Data ()
 

Friends

class ItemCallbackClient
 

Additional Inherited Members

- Public Types inherited from thomsonreuters::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0,
  BlankEnum = 1
}
 
- Protected Member Functions inherited from thomsonreuters::ema::access::Msg
const Encoder & getEncoder () const
 
bool hasDecoder () const
 
bool hasEncoder () const
 
 Msg ()
 
void setDecoder (MsgDecoder *)
 
- Protected Member Functions inherited from thomsonreuters::ema::access::ComplexType
 ComplexType ()
 
- Protected Member Functions inherited from thomsonreuters::ema::access::Data
 Data ()
 
- Protected Attributes inherited from thomsonreuters::ema::access::Msg
Attrib _attrib
 
Payload _payload
 
MsgDecoder_pDecoder
 
MsgEncoder * _pEncoder
 

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 71 of file UpdateMsg.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::UpdateMsg::UpdateMsg ( )

Constructs UpdateMsg.

thomsonreuters::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.
virtual thomsonreuters::ema::access::UpdateMsg::~UpdateMsg ( )
virtual

Destructor.

Member Function Documentation

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

Specifies Attrib.

Parameters
[in]attriban object of ComplexType
Returns
reference to this object
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::extendedHeader ( const EmaBuffer buffer)

Specifies ExtendedHeader.

Parameters
[in]bufferan EmaBuffer containing extendedHeader information
Returns
reference to this object
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::filter ( UInt32  filter)

Specifies Filter.

Parameters
[in]filterspecifies filter
Returns
reference to this object
const EmaBuffer& thomsonreuters::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 thomsonreuters::ema::access::Data.

Data::DataCode thomsonreuters::ema::access::UpdateMsg::getCode ( ) const
virtual

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

Returns
Data::NoCodeEnum

Implements thomsonreuters::ema::access::Data.

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

Returns ConflatedCount.

Exceptions
OmmInvalidUsageExceptionif hasConflated() returns false
Returns
number of conflated updates
UInt16 thomsonreuters::ema::access::UpdateMsg::getConflatedTime ( ) const

Returns ConflatedTime.

Exceptions
OmmInvalidUsageExceptionif hasConflated() returns false
Returns
time conflation was on
DataType::DataTypeEnum thomsonreuters::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 thomsonreuters::ema::access::Data.

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

Returns DoNotCache.

Returns
true if this update must not be cached; false otherwise
bool thomsonreuters::ema::access::UpdateMsg::getDoNotConflate ( ) const

Returns DoNotConflate.

Returns
true if this update must not be conflated; false otherwise
bool thomsonreuters::ema::access::UpdateMsg::getDoNotRipple ( ) const

Returns DoNotRipple.

Returns
true if this update does not ripple; false otherwise
const EmaBuffer& thomsonreuters::ema::access::UpdateMsg::getPermissionData ( ) const

Returns PermissionData.

Exceptions
OmmInvalidUsageExceptionif hasPermissionData() returns false
Returns
EmaBuffer containing permission data
UInt32 thomsonreuters::ema::access::UpdateMsg::getPublisherIdUserAddress ( ) const

Returns PublisherIdUserAddress.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user address
UInt32 thomsonreuters::ema::access::UpdateMsg::getPublisherIdUserId ( ) const

Returns PublisherIdUserId.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user Id
UInt32 thomsonreuters::ema::access::UpdateMsg::getSeqNum ( ) const

Returns SeqNum.

Exceptions
OmmInvalidUsageExceptionif hasSeqNum() returns false
Returns
sequence number
const EmaString& thomsonreuters::ema::access::UpdateMsg::getServiceName ( ) const

Returns the ServiceName within the MsgKey.

Exceptions
OmmInvalidUsageExceptionif hasServiceName() returns false
Returns
EmaString containing service name
UInt8 thomsonreuters::ema::access::UpdateMsg::getUpdateTypeNum ( ) const

Returns UpdateTypeNum.

Returns
update type number (e.g., rdm::INSTRUMENT_UPDATE_QUOTE)
bool thomsonreuters::ema::access::UpdateMsg::hasConflated ( ) const

Indicates presence of Conflated.

Returns
true if update contains conflated data; false otherwise
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::id ( Int32  id)

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::name ( const EmaString name)

Specifies Name.

Parameters
[in]namespecifies item name
Returns
reference to this object
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::payload ( const ComplexType data)

Specifies Payload.

Parameters
[in]payloadan object of ComplexType
Returns
reference to this object
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::permissionData ( const EmaBuffer permissionData)

Specifies PermissionData.

Parameters
[in]permissionDataan EmaBuffer object with permission data information
Returns
reference to this object
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::seqNum ( UInt32  seqNum)

Specifies SeqNum.

Parameters
[in]seqNumspecifies sequence number
Returns
reference to this object
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::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
UpdateMsg& thomsonreuters::ema::access::UpdateMsg::streamId ( Int32  streamId)

Specifies StreamId.

Parameters
[in]streamIdspecifies stream id
Returns
reference to this object
const EmaString& thomsonreuters::ema::access::UpdateMsg::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements thomsonreuters::ema::access::Data.

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

Specifies UpdateTypeNum.

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

Friends And Related Function Documentation

friend class ItemCallbackClient
friend

Definition at line 338 of file UpdateMsg.h.