本文整理汇总了C++中APDU::WriteContiguous方法的典型用法代码示例。如果您正苦于以下问题:C++ APDU::WriteContiguous方法的具体用法?C++ APDU::WriteContiguous怎么用?C++ APDU::WriteContiguous使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类APDU
的用法示例。
在下文中一共展示了APDU::WriteContiguous方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConfigureRequest
void FreeFormPoll::ConfigureRequest(APDU& arAPDU)
{
LOG_BLOCK(LEV_DEBUG, "FreeFormPoll::ConfigureRequest");
if (this->GetClassMask() == PC_INVALID) {
throw InvalidStateException(LOCATION, "Class mask has not been set");
}
arAPDU.Set(FC_READ);
std::lock_guard<std::mutex> guard{ffInputPoints_mutex_};
if ((this->GetClassMask() & PC_CLASS_0) && ffInputPoints.size() > 0) {
for (std::pair<apl::DataTypes, std::vector<uint32_t>> element : ffInputPoints)
{
if (element.second.size() <= 0)
continue; //should not come here
if (element.first == apl::DataTypes::DT_ANALOG) {
for (int ind=0; ind<element.second.size(); ++ind) {
size_t index = element.second.at(ind);
ObjectWriteIterator i = arAPDU.WriteContiguous(Group30Var1::Inst(), index, index, QC_1B_START_STOP );
}
}
if (element.first == apl::DataTypes::DT_BINARY) {
for (int ind=0; ind<element.second.size(); ++ind) {
size_t index = element.second.at(ind);
ObjectWriteIterator i = arAPDU.WriteContiguous(Group1Var2::Inst(), index, index, QC_1B_START_STOP );
}
}
if (element.first == apl::DataTypes::DT_COUNTER) {
for (int ind=0; ind<element.second.size(); ++ind) {
size_t index = element.second.at(ind);
ObjectWriteIterator i = arAPDU.WriteContiguous(Group20Var1::Inst(), index, index, QC_1B_START_STOP );
}
}
if (element.first == apl::DataTypes::DT_CONTROL_STATUS) {
for (int ind=0; ind<element.second.size(); ++ind) {
size_t index = element.second.at(ind);
ObjectWriteIterator i = arAPDU.WriteContiguous(Group10Var2::Inst(), index, index, QC_1B_START_STOP );
}
}
if (element.first == apl::DataTypes::DT_SETPOINT_STATUS) {
for (int ind=0; ind<element.second.size(); ++ind) {
size_t index = element.second.at(ind);
ObjectWriteIterator i = arAPDU.WriteContiguous(Group40Var1::Inst(), index, index, QC_1B_START_STOP );
}
}
}
}
}
示例2: ConfigureRequest
void ClearRestartIIN::ConfigureRequest(APDU& arAPDU)
{
arAPDU.Set(FC_WRITE);
Group80Var1* pObj = Group80Var1::Inst(); // Internal indications object
ObjectWriteIterator i = arAPDU.WriteContiguous(pObj, 7, 7); // index 7 == device restart
pObj->Write(*i, 7, 7, false);
}