本文整理汇总了C++中OmmConsumerEvent::getHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ OmmConsumerEvent::getHandle方法的具体用法?C++ OmmConsumerEvent::getHandle怎么用?C++ OmmConsumerEvent::getHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OmmConsumerEvent
的用法示例。
在下文中一共展示了OmmConsumerEvent::getHandle方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onUpdateMsg
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 );
}
示例2: onUpdateMsg
void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
cout << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;
cout << endl << "Item Name: " << ( updateMsg.hasName() ? updateMsg.getName() : EmaString( "<not set>" ) ) << endl
<< "Service Name: " << (updateMsg.hasServiceName() ? updateMsg.getServiceName() : EmaString( "<not set>" ) ) << endl;
decode( updateMsg );
}
示例3: onStatusMsg
void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& ommEvent )
{
cout << endl << "Item Name: " << ( statusMsg.hasName() ? statusMsg.getName() : EmaString( "<not set>" ) ) << endl
<< "Service Name: " << (statusMsg.hasServiceName() ? statusMsg.getServiceName() : EmaString( "<not set>" ) );
if ( statusMsg.hasState() )
cout << endl << "Item State: " << statusMsg.getState().toString() << endl;
cout << "Item Handle: " << ommEvent.getHandle() << endl << "Item Closure: " << ommEvent.getClosure() << endl;
}
示例4: onUpdateMsg
void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
cout << endl << "Item Name: " << ( updateMsg.hasName() ? updateMsg.getName() : EmaString( "<not set>" ) ) << endl
<< "Service Name: " << (updateMsg.hasServiceName() ? updateMsg.getServiceName() : EmaString( "<not set>" ) );
cout << endl << "Item Handle: " << ommEvent.getHandle() << endl << "Item Closure: " << ommEvent.getClosure() << endl;
if ( DataType::FieldListEnum == updateMsg.getPayload().getDataType() )
decode( updateMsg.getPayload().getFieldList() );
}
示例5: onStatusMsg
void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& ommEvent )
{
cout << "Received Status. Item Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;
if ( statusMsg.hasMsgKey() )
cout << endl << "Item Name: " << statusMsg.getName() << endl << "Service Name: " << statusMsg.getServiceName();
if ( statusMsg.hasState() )
cout << endl << "Item State: " << statusMsg.getState().toString() << endl;
}
示例6: onUpdateMsg
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() );
}
示例7: onRefreshMsg
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
cout << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;
cout << endl << "Item Name: " << ( refreshMsg.hasName() ? refreshMsg.getName() : EmaString( "<not set>" ) ) << endl
<< "Service Name: " << (refreshMsg.hasServiceName() ? refreshMsg.getServiceName() : EmaString( "<not set>" ) );
cout << endl << "Item State: " << refreshMsg.getState().toString() << endl;
decode(refreshMsg, refreshMsg.getComplete());
}
示例8: onRefreshMsg
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
cout << endl << "Item Name: " << ( refreshMsg.hasName() ? refreshMsg.getName() : EmaString( "<not set>" ) ) << endl
<< "Service Name: " << (refreshMsg.hasServiceName() ? refreshMsg.getServiceName() : EmaString( "<not set>" ) );
cout << endl << "Item State: " << refreshMsg.getState().toString() << endl;
cout << "Item Handle: " << ommEvent.getHandle() << endl << "Item Closure: " << ommEvent.getClosure() << endl;
if ( DataType::FieldListEnum == refreshMsg.getPayload().getDataType() )
decode( refreshMsg.getPayload().getFieldList() );
}
示例9: onRefreshMsg
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
cout << "Received Refresh. Item Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;
if ( refreshMsg.hasMsgKey() )
cout << endl << "Item Name: " << refreshMsg.getName() << endl << "Service Name: " << refreshMsg.getServiceName();
cout << endl << "Item State: " << refreshMsg.getState().toString() << endl;
if ( DataType::FieldListEnum == refreshMsg.getPayload().getDataType() )
decode( refreshMsg.getPayload().getFieldList() );
// Reissue item's priority after receiving the first refresh message
if ( refreshMsg.getState().getStreamState() == OmmState::OpenEnum &&
refreshMsg.getState().getDataState() == OmmState::OkEnum &&
!hasFirstRefresh )
{
_pOmmConsumer->reissue( ReqMsg().priority( 2, 2 ), ommEvent.getHandle() );
hasFirstRefresh = true;
}
}
示例10: onRefreshMsg
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
cout << endl << "Received: " << "RefreshMsg" << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;
if ( refreshMsg.hasMsgKey() )
cout << "Item Name: " << refreshMsg.getName() << endl << "Service Name: " << ( refreshMsg.hasServiceName() ? refreshMsg.getServiceName() : EmaString( "not set" ) ) << endl;
cout << "Item State: " << refreshMsg.getState().toString() << endl;
if ( refreshMsg.getDomainType() == MMT_LOGIN &&
refreshMsg.getState().getStreamState() == OmmState::OpenEnum &&
refreshMsg.getState().getDataState() == OmmState::OkEnum )
{
_pOmmConsumer->submit( PostMsg().postId( 1 ).serviceId( 1501 ).name( "TRI.N" ).solicitAck( true ).complete().payload(
RefreshMsg().payload( FieldList().addReal( 25, 35, OmmReal::ExponentPos1Enum ).complete() ).complete() ), ommEvent.getHandle() );
}
decode( refreshMsg );
}
示例11: onAckMsg
void AppClient::onAckMsg( const AckMsg& ackMsg, const OmmConsumerEvent& event )
{
cout << endl << "Received: AckMsg" << endl << "Item Handle: " << event.getHandle() << endl << "Closure: " << event.getClosure() << endl;
decode( ackMsg );
}