File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ namespace abb :: rws :: v1_0 :: rw :: ctrl
2121 RWSResult rws_result = parseXml (client.httpGet (uri.str ()).content ());
2222
2323 SafetyViolationInfo result;
24- result.unsynchronized = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " unsynchronized" ))) == 1 ;
25- result.toolPosViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " tool-pos-violation-status" ))) == 1 ;
26- result.armViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " upper-arm-violation-status" ))) == 1 ;
27- result.axisRangeViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " axis-range-violation-status" ))) == 1 ;
24+ result.unsynchronized = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " unsynchronized" ))) != 0 ;
25+ result.toolPosViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " tool-pos-violation-status" )))!= 0 ;
26+ result.armViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " upper-arm-violation-status" ))) != 0 ;
27+ result.axisRangeViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " axis-range-violation-status" ))) != 0 ;
2828
2929 return result;
3030 }
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ namespace abb :: rws :: v2_0 :: rw :: ctrl
2424 RWSResult rws_result = parseXml (client.httpGet (uri.str ()).content ());
2525
2626 SafetyViolationInfo result;
27- result.unsynchronized = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " unsynchronized" ))) == 1 ;
28- result.toolPosViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " tool-pos-violation-status" ))) == 1 ;
29- result.armViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " upper-arm-violation-status" ))) == 1 ;
30- result.axisRangeViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " axis-range-violation-status" ))) == 1 ;
27+ result.unsynchronized = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " unsynchronized" ))) != 0 ;
28+ result.toolPosViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " tool-pos-violation-status" ))) != 0 ;
29+ result.armViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " upper-arm-violation-status" ))) != 0 ;
30+ result.axisRangeViolation = std::stoi (xmlFindTextContent (rws_result, XMLAttribute (Identifiers::CLASS, " axis-range-violation-status" ))) != 0 ;
3131
3232 return result;
3333 }
You can’t perform that action at this time.
0 commit comments