1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!--
3+ Licensed to the Apache Software Foundation (ASF) under one
4+ or more contributor license agreements. See the NOTICE file
5+ distributed with this work for additional information
6+ regarding copyright ownership. The ASF licenses this file
7+ to you under the Apache License, Version 2.0 (the
8+ "License"); you may not use this file except in compliance
9+ with the License. You may obtain a copy of the License at
10+
11+ https://www.apache.org/licenses/LICENSE-2.0
12+
13+ Unless required by applicable law or agreed to in writing,
14+ software distributed under the License is distributed on an
15+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+ KIND, either express or implied. See the License for the
17+ specific language governing permissions and limitations
18+ under the License.
19+ -->
20+ <test : driver-testsuite xmlns : test =" https://plc4x.apache.org/schemas/driver-testsuite.xsd"
21+ byteOrder =" LITTLE_ENDIAN" >
22+
23+ <name >CANOpen SDO Segmentation</name >
24+
25+ <protocolName >canopen</protocolName >
26+ <outputFlavor >read-write</outputFlavor >
27+
28+ <driver-name >canopen</driver-name >
29+
30+ <driver-parameters >
31+ <parameter >
32+ <name >nodeId</name >
33+ <value >15</value >
34+ </parameter >
35+ <parameter >
36+ <name >request-timeout</name >
37+ <value >5000</value >
38+ </parameter >
39+ </driver-parameters >
40+
41+ <testcase >
42+ <name >Send NMT write request</name >
43+ <description >
44+ Trigger write using CANOpen NMT requesting specific node to change its state.
45+ </description >
46+ <steps >
47+ <api-request name =" Request node 1 to enter PRE_OPERATIONAL state" >
48+ <TestWriteRequest >
49+ <tags isList =" true" >
50+ <tag className =" org.apache.plc4x.test.driver.internal.api.TestValueTag" >
51+ <name >boot_up_request</name >
52+ <address >NMT:1</address >
53+ <value >
54+ <PlcUSINT >128</PlcUSINT >
55+ </value >
56+ </tag >
57+ </tags >
58+ </TestWriteRequest >
59+ </api-request >
60+ <outgoing-plc-message name =" Send NMT Request" >
61+ <CANOpenFrame >
62+ <nodeId dataType =" uint" bitLength =" 8" >0</nodeId >
63+ <service >
64+ <CANOpenService dataType =" uint" bitLength =" 4" stringRepresentation =" NMT" >0</CANOpenService >
65+ </service >
66+ <alignment dataType =" uint" bitLength =" 4" >0</alignment >
67+ <payload >
68+ <CANOpenPayload >
69+ <CANOpenNetworkPayload >
70+ <request >
71+ <NMTStateRequest dataType =" uint" bitLength =" 8" stringRepresentation =" PRE_OPERATIONAL" >128</NMTStateRequest >
72+ </request >
73+ <reserved dataType =" uint" bitLength =" 1" >0</reserved >
74+ <node dataType =" uint" bitLength =" 7" >1</node >
75+ </CANOpenNetworkPayload >
76+ </CANOpenPayload >
77+ </payload >
78+ <padding isList =" true" >
79+ <value dataType =" uint" bitLength =" 8" >0</value >
80+ <value dataType =" uint" bitLength =" 8" >0</value >
81+ <value dataType =" uint" bitLength =" 8" >0</value >
82+ <value dataType =" uint" bitLength =" 8" >0</value >
83+ <value dataType =" uint" bitLength =" 8" >0</value >
84+ <value dataType =" uint" bitLength =" 8" >0</value >
85+ </padding >
86+ </CANOpenFrame >
87+ </outgoing-plc-message >
88+ <api-response name =" Report Write Response to application" >
89+ <PlcWriteResponse >
90+ <request >
91+ <PlcWriteRequest >
92+ <PlcTagRequest >
93+ <tags isList =" true" >
94+ <boot_up_request >
95+ <PlcTagValueItem >
96+ <tag >
97+ <CANOpenNMTTag >
98+ <service dataType =" string" bitLength =" 24" encoding =" UTF-8" >NMT</service >
99+ <node dataType =" int" bitLength =" 64" >1</node >
100+ </CANOpenNMTTag >
101+ </tag >
102+ <value >
103+ <PlcUSINT dataType =" int" bitLength =" 8" >128</PlcUSINT >
104+ </value >
105+ </PlcTagValueItem >
106+ </boot_up_request >
107+ </tags >
108+ </PlcTagRequest >
109+ </PlcWriteRequest >
110+ </request >
111+ <responseCodes isList =" true" >
112+ <boot_up_request >
113+ <ResponseCode dataType =" uint" bitLength =" 8" stringRepresentation =" OK" >1</ResponseCode >
114+ </boot_up_request >
115+ </responseCodes >
116+ </PlcWriteResponse >
117+ </api-response >
118+ <delay >1000</delay >
119+ </steps >
120+ </testcase >
121+
122+ </test : driver-testsuite >
0 commit comments