void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent ) { cout << endl << "Received: " << "UpdateMsg" << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl; if ( updateMsg.hasMsgKey() ) cout << "Item Name: " << updateMsg.getName() << endl << "Service Name: " << ( updateMsg.hasServiceName() ? updateMsg.getServiceName() : EmaString( "not set" ) ) << endl; decode( updateMsg ); }
void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent ) { cout << endl << "Received Update. Item Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl; if ( updateMsg.hasMsgKey() ) cout << endl << "Item Name: " << updateMsg.getName() << endl << "Service Name: " << updateMsg.getServiceName() << endl; if ( DataType::FieldListEnum == updateMsg.getPayload().getDataType() ) decode( updateMsg.getPayload().getFieldList() ); }
void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent ) { if ( updateMsg.hasMsgKey() ) cout << endl << "Item Name: " << updateMsg.getName() << endl << "Service Name: " << updateMsg.getServiceName() << endl; if ( DataType::FieldListEnum == updateMsg.getPayload().getDataType() ) decode( updateMsg.getPayload().getFieldList() ); // Close streaming request after receiving 3 update messages if ( ++numOfUpdates == 3 ) { cout << endl << "Close Item request" << endl; _pOmmConsumer->unregister( ommEvent.getHandle() ); } }