本文整理汇总了C++中QSimCommand::setQualifier方法的典型用法代码示例。如果您正苦于以下问题:C++ QSimCommand::setQualifier方法的具体用法?C++ QSimCommand::setQualifier怎么用?C++ QSimCommand::setQualifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSimCommand
的用法示例。
在下文中一共展示了QSimCommand::setQualifier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testDeliverProvideLocalInformation
void tst_QSimToolkit::testDeliverProvideLocalInformation()
{
QFETCH( QByteArray, data );
QFETCH( QByteArray, resp );
QFETCH( QByteArray, info );
QFETCH( int, resptype );
QFETCH( int, localtype );
QFETCH( int, options );
// Output a dummy line to give some indication of which test we are currently running.
qDebug() << "";
// Clear the client/server state.
server->clear();
deliveredCommand = QSimCommand();
// Compose and send the command.
QSimCommand cmd;
cmd.setType( QSimCommand::ProvideLocalInformation );
cmd.setQualifier( localtype );
server->emitCommand( cmd );
// Wait for the command to arrive in the client.
QVERIFY( QFutureSignal::wait( this, SIGNAL(commandSeen()), 100 ) );
// Verify that the command was delivered exactly as we asked.
QVERIFY( deliveredCommand.type() == cmd.type() );
QVERIFY( deliveredCommand.qualifier() == cmd.qualifier() );
QCOMPARE( deliveredCommand.toPdu( (QSimCommand::ToPduOptions)options ), data );
// The response should have been sent immediately.
QCOMPARE( server->responseCount(), 1 );
QCOMPARE( server->envelopeCount(), 0 );
QSimTerminalResponse resp2 = QSimTerminalResponse::fromPdu( server->lastResponse() );
QVERIFY( resp2.result() == (QSimTerminalResponse::Result)resptype );
QVERIFY( resp2.cause() == QSimTerminalResponse::NoSpecificCause );
}