本文整理汇总了C++中APDU::isResponse方法的典型用法代码示例。如果您正苦于以下问题:C++ APDU::isResponse方法的具体用法?C++ APDU::isResponse怎么用?C++ APDU::isResponse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类APDU
的用法示例。
在下文中一共展示了APDU::isResponse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
APDU *
Layer7_Individual::Request_Response (APDU * r)
{
APDU *a;
CArray *c;
l4->Send (r->ToPacket ());
pth_event_t t = pth_event (PTH_EVENT_RTIME, pth_time (6, 100));
while (pth_event_status (t) != PTH_STATUS_OCCURRED)
{
c = l4->Get (t);
if (c)
{
if (c->len () == 0)
{
delete c;
pth_event_free (t, PTH_FREE_THIS);
return 0;
}
a = APDU::fromPacket (*c, this->t);
delete c;
if (a->isResponse (r))
{
pth_event_free (t, PTH_FREE_THIS);
return a;
}
delete a;
pth_event_free (t, PTH_FREE_THIS);
return 0;
}
}
pth_event_free (t, PTH_FREE_THIS);
return 0;
}
示例2: while
Array < eibaddr_t >
Layer7_Broadcast::A_IndividualAddress_Read (unsigned timeout)
{
Array < eibaddr_t > addrs;
A_IndividualAddress_Read_PDU r;
APDU *a;
l4->Send (r.ToPacket ());
pth_event_t t = pth_event (PTH_EVENT_RTIME, pth_time (timeout, 0));
while (pth_event_status (t) != PTH_STATUS_OCCURRED)
{
BroadcastComm *c = l4->Get (t);
if (c)
{
a = APDU::fromPacket (c->data);
if (a->isResponse (&r))
{
addrs.resize (addrs () + 1);
addrs[addrs () - 1] = c->src;
}
delete a;
delete c;
}
}
pth_event_free (t, PTH_FREE_THIS);
return addrs;
}