Commit f2b7eea5 authored by Marcus Nordenberg's avatar Marcus Nordenberg Committed by Claes Sjöfors

Profinet: Subslot fix

parent 93795b97
...@@ -445,13 +445,16 @@ void pack_download_req(T_PNAK_SERVICE_REQ_RES* ServiceReqRes, ...@@ -445,13 +445,16 @@ void pack_download_req(T_PNAK_SERVICE_REQ_RES* ServiceReqRes,
break; break;
} }
// Ignore Interface subslots as they break the device configuration // Third time's a charm, only subslots up to 0x7FFF are included in the AR
for (ii = 0; ii < num_modules; ii++) { // according to an old picture i found :)
for (std::vector<GsdmlSubslotData*>::iterator it for (ii = 0; ii < num_modules; ii++)
= dev_data->slot_data[ii]->subslot_data.begin(); {
it != dev_data->slot_data[ii]->subslot_data.end();) { for (std::vector<GsdmlSubslotData*>::iterator it =
// Don't add expectedsubmoduleblock if there's no IOCR dev_data->slot_data[ii]->subslot_data.begin();
if ((*it)->data_record.empty() && ((*it)->io_input_length == 0 && (*it)->io_output_length == 0)) { it != dev_data->slot_data[ii]->subslot_data.end();)
{
if ((*it)->subslot_number > 0x7FFF)
{
delete *it; delete *it;
it = dev_data->slot_data[ii]->subslot_data.erase(it); it = dev_data->slot_data[ii]->subslot_data.erase(it);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment