本文整理汇总了C++中APDU::GetFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ APDU::GetFunction方法的具体用法?C++ APDU::GetFunction怎么用?C++ APDU::GetFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类APDU
的用法示例。
在下文中一共展示了APDU::GetFunction方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendRequest
void AppLayer::SendRequest(APDU& arAPDU)
{
this->Validate(arAPDU.GetControl(), true, true, false, false);
if(!IsRequest(arAPDU.GetFunction()))
throw ArgumentException(LOCATION, "Non-request function code");
mSolicited.Send(arAPDU, this->GetRetries(arAPDU.GetFunction()));
}
示例2: Send
void ACS_Idle::Send(AppLayerChannel* c, APDU& arAPDU, size_t aNumRetry)
{
AppControlField acf = arAPDU.GetControl();
FunctionCodes func = arAPDU.GetFunction();
acf.SEQ = (acf.FIR && func == FC_RESPONSE) ? c->Sequence() : c->IncrSequence();
arAPDU.SetControl(acf);
c->ChangeState(NextState(c, arAPDU.GetFunction(), acf.CON));
c->SetRetry(aNumRetry);
c->QueueSend(arAPDU);
}
示例3: SwitchOnFunction
void AS_Base::SwitchOnFunction(Slave* c, AS_Base* apNext, const APDU& arRequest, SequenceInfo aSeqInfo)
{
switch (arRequest.GetFunction()) {
case (FC_READ): {
ChangeState(c, apNext);
c->mRspContext.Reset();
IINField iin = c->mRspContext.Configure(arRequest);
c->mRspContext.LoadResponse(c->mResponse);
c->Send(c->mResponse, iin);
break;
}
case (FC_WRITE):
ChangeState(c, apNext);
if(aSeqInfo != SI_PREV) c->HandleWrite(arRequest);
c->ConfigureAndSendSimpleResponse();
break;
case (FC_PROPRIETARY_VTO_TRANSFER):
ChangeState(c, apNext);
if(aSeqInfo != SI_PREV) c->HandleVtoTransfer(arRequest);
c->ConfigureAndSendSimpleResponse();
break;
case (FC_SELECT):
ChangeState(c, apNext);
c->HandleSelect(arRequest, aSeqInfo);
c->Send(c->mResponse);
break;
case (FC_OPERATE):
ChangeState(c, apNext);
c->HandleOperate(arRequest, aSeqInfo);
c->Send(c->mResponse);
break;
case (FC_DIRECT_OPERATE):
ChangeState(c, apNext);
c->HandleDirectOperate(arRequest, aSeqInfo);
c->Send(c->mResponse);
break;
case (FC_DIRECT_OPERATE_NO_ACK):
c->HandleDirectOperate(arRequest, aSeqInfo);
break;
case (FC_ENABLE_UNSOLICITED):
ChangeState(c, apNext);
c->HandleEnableUnsolicited(arRequest, true);
c->Send(c->mResponse);
break;
case (FC_DISABLE_UNSOLICITED):
ChangeState(c, apNext);
c->HandleEnableUnsolicited(arRequest, false);
c->Send(c->mResponse);
break;
case (FC_DELAY_MEASURE):
ChangeState(c, apNext);
c->ConfigureDelayMeasurement(arRequest);
c->Send(c->mResponse);
break;
default:
MACRO_THROW_EXCEPTION_COMPLEX_WITH_CODE(NotSupportedException, "Function not supported: " << arRequest.GetFunction() , SERR_FUNC_NOT_SUPPORTED);
}
}
示例4: SendUnsolicited
void AppLayer::SendUnsolicited(APDU& arAPDU)
{
this->Validate(arAPDU.GetControl(), false, true, true, true);
if(arAPDU.GetFunction() != FC_UNSOLICITED_RESPONSE )
throw ArgumentException(LOCATION, "Non-unsolicited function code");
mUnsolicited.Send(arAPDU, this->GetRetries(FC_UNSOLICITED_RESPONSE));
}
示例5: SendResponse
void AppLayer::SendResponse(APDU& arAPDU)
{
this->Validate(arAPDU.GetControl(), false, false, true, false);
if(arAPDU.GetFunction() != FC_RESPONSE)
throw ArgumentException(LOCATION, "Non-response function code");
mSolicited.Send(arAPDU, this->GetRetries(FC_RESPONSE));
}