Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auto lines = SafeArrayPtr<IProfibusLinePtr>(profiMaster->GetProfibusLines());
- if(lines.size() != 1) {
- ASSERT(false); //< We only support one line at the moment.
- return nullptr;
- }
- auto line = lines.at(0);
- auto slaves = SafeArrayPtr<IProfibusSlavePtr>(line->GetProfibusSlaves());
- for_each(begin(slaves), end(slaves), [&](IProfibusSlavePtr slave) {
- if(auto found = searchInProfiSlave( slave, id )) {
- retDevice = found;
- break;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement