Conformance Test specification dlmsdeviceData Link Layer languagemessagespecification
Project: COSEM conformance testing - Data Link Layer
DLMS-UA WG Conformance testing Author:
V1.1 Version:
for review [in work, for review, released] Status:
27.07.2001 Revision Date:
? Copyright 1997-2001 Copyright:
DLMS User Association use only Classification:
Conftest DLL V1.1_GK010727.doc Filename:
V1.0 Replace Doc
Updates based on IEC 62056-46 FDIS and HDLC test routines Comment:
implemented in Pack 1 (V0.5) of the test tool
by Gyozo Kmethy
Compiled: DLMS UA Mika Makinen, Gyozo Kmethy
Responsibility: CTWG DLMS UA - 1/19 en Release: 1.1
Form. 9.221.1
COSEM Conformance testing
Data Link Layer test plan
Table of Contents
1 Scope of the document ............................................................................................. 3 2 Introduction.............................................................................................................. 4
2.1 Referenced documents ..................................................................................... 4
2.2 Terms, Definitions and Abbreviations ................................................................. 4
2.3 Revision History ............................................................................................... 4 3 Testing of COSEM MAC Layer ................................................................................... 5
3.1 General test cases ........................................................................................... 5
3.2 NDM Test Cases ............................................................................................ 13
3.3 NRM Test Cases ............................................................................................ 15 4 Testing of COSEM LLC Layer .................................................................................. 17
DLMS UA WG CT Release: 1.1 2/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
Foreword
Copyright
? Copyright 1997-2001 DLMS User Association.
This document is confidential. It may not be copied, nor handed over to persons outside the standardisation environment.
The copyright is enforced by national and international law. The "Berne Convention for the Protection of Literary and Artistic Works", which is signed by 121 countries world-wide, and other treaties apply.
1 Scope of the document
This document specifies the tests to be performed in order to ensure conformance on COSEM data link level between equipment of different manufacturers. The tests are based on the data link layer specifications [1], [2] and [3].
Version 1.1. includes the V1.0 test plans and the test plans implemented in Pack 1 of the test tool (test routines V0.5).
This document will be updated after each release of the test tool.
The final test plan will be issued when the test tool will have been validated. DLMS UA WG CT Release: 1.1 3/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
2 Introduction
2.1 Referenced documents
Ref. Title
13/XXXX/FDIS, draft IEC 62056-46 Electricity metering - Data exchange for meter reading, [1]
tariff and load control - Part 46: Data link layer using HDLC protocol,
ISO/IEC 13239:2000 Information Technology – Telecommunications and information [2]
exchange between systems - High-level data link control (HDLC) procedures, Second
Edition
ISO/IEC 8802-2:1998 Information technology - Telecommunications and information [3]
exchange between systems - Local and metropolitan area networks - Specific requirements -
Part 2: Logical link control
2.2 Terms, Definitions and Abbreviations Abbreviation Explanation
COSEM Companion Specification for Energy Metering
IEC International Electrotechnical Commission
PDU Protocol data unit
2.3 Revision History
Versions kept within the DLMS-UA WG on Conformance Testing
Version Date Author Comment
0.1 20.4.2000 M. Mäkinen initial version
0.2 22.5.2000 M. Mäkinen Modified the document to use new common test case format. Minor editorial changes.
0.3 24.5.2000 G. Kmethy Modified document and added comments in DLMS UA CT meeting. 0.4 7.7.2000 M. Mäkinen Editorial changes. Added new test cases. This version is not final because [1] contains errors. The final conformance test will be based on a new version of [1].
1.0 17.07.2000 G. Kmethy Release 1.0 Sent to tool providers
Intra-frame time-out test updated.
Server LLC PDU test added
Invalid frame test updated
1.1 27.07.2001 G. Kmethy Completed with test plans derived from Conformance Test Tool routines.
Updated to bring in line with 13/XXXX/FDIS 2001-04-24
(document sent to Geneva for circulation)
Index completed
DLMS UA WG CT Release: 1.1 4/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
3 Testing of COSEM MAC Layer
MAC layer has different modes and therefore testing of MAC layer can be divided into general type tests and mode specific tests. General type tests contain test cases that must be tested in all protocol modes and mode specific tests are tested only in the specified mode. 3.1 General test cases
Test Plan V1.0
Test Case Response delays
Reference [1], 6.4.4.10.1.
Test priority High
Purpose Making sure that the server sends responses always quickly enough.
Description During the conformance test, this timeout is controlled every time a response
is waited from the server. The time delay from client sending a frame (poll ==
1) to client receiving a frame from the server should never exceed “Response
time-out” time. Same time-out is used also to control the delays between two
sequential frames received from the server (must be final == 0 in the first
one).
Preconditions There is a physical connection between the client and the server.
Do Start timer, if a command frame with poll == 1 is sent to the server or if
response frame with final == 0 is received.
Check Check that next response frame is received before the timer expires.
Post-conditions -
Remark The length of the “Response time-out” is not explicitly defined in [2], but it will
be defined in [1]. The length of the “Response time-out” depends on the used
physical media, the communication speed and the maximum frame length.
The manufacturer has to inform the server’s RespTime length used in
calculating the maximum response time. Maximum time of the server’s
RespTime will be set to 6 seconds.
This test is not implemented in the Pack 1 test tool.
Test Plan V1.0
Test Case Intra-frame time-out
Reference [1] 6.4.4.10.4, [2], 4.6.3
Test priority High
Purpose Making sure that the server implements intra-frame time-out.
Description Server has to start scanning for new opening flag, if the receiving of the
previous frame has failed because of a time-out between bytes within a
frame.
Preconditions There is a physical connection between the client and the server.
Client has the send permission.
Do
Send a valid HDLC frame, but with the closing flag missing. After a certain
time, send the same HDLC frame correctly bounded with opening and closing
flags.
Check Check that response is not received for the first frame.. Check that server
responds after sending the second frame.
Post-conditions -
Remark The length of the “Intra-frame time-out” is not explicitly defined and this time-
out is also optional. The manufacturer has to inform about the server’s timer
length. Minimum and maximum times will be defined in [1].
DLMS UA WG CT Release: 1.1 5/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
Test routine HDLC_6 implemented in Pack 1 test tool
Test Case Intra-frame time-out
Precondition Take the time-out parameters from the PIXIT file.
Preamble Send an SNRM frame to the IUT to place it to NRM mode. The IUT shall send
an appropriate response. If there is no response, the Verdict is FAILED.
Do Send a DISC frame with the trailing flag skipped to the IUT, than wait 10%
more than the inter-frame time out.
Send an RR frame to the IUT.
Check Expect an RR frame as a response. If there is no response, or the response
frame is not of type RR, the Verdict is FAILED.
Postamble
Remark This test routine is different from the Test Plan V1.0, but it is correct. The first
SNRM frame places the IUT in the NRM mode, the DISC frame should be
disregarded due to the missing trailing flag, therefore the IUT should respond
to the RR frame received by a RR frame.
The textual test plan will be updated.
Test Plan V1.0
Test Case Physical connection abort
Reference [1], 6.2.2.
Test priority High
Purpose Making sure that the server can recover by itself if there is physical
connection abort.
Description The physical connection is aborted in different points of the connection.
Preconditions There is a physical connection between the client and the server.
Do Abort the physical connection.
Create new physical connection.
Check Make sure that Server has recovered from the earlier physical connection
abort by sending a DISC frame and checking if the answer is DM.
Post-conditions
Remark This test can be done together with the corresponding PL test.
This test is implemented in the Pack 1 test tool.
Test Plan V1.0
Test Case Long delay without any data exchange (Inactivity time-out)
Reference [1], 6.4.4.10.3.
Test priority High
Purpose Making sure that the server can recover by itself if there is some kind of
problem in the client side or in the physical channel.
Description Client checks that the Server implements the inactivity time-out. After long
time without any data exchange the server should assume that the physical
connection has expired. So if the client sends frames to the server after this
long time period, the server should be at the NDM state.
Preconditions There is a physical connection and a MAC connection between the client and
the server.
Client has the send permission.
Do Client waits long time without sending anything.
Check Server should be in NDM state. This can be tested with sending a DISC frame
and checking if the answer is DM.
Post-conditions -
Remark According to [1], the HDLC link does not have to be disconnected, the Data DLMS UA WG CT Release: 1.1 6/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
Link Layer shall only report the event to the layer management application.
The requirement and the test are under consideration.
Test routine HDLC_7 implemented in Pack 1 test tool Test Case Long delay without any data exchange (Inactivity time-out)
Precondition Takes the time-out parameters from the PIXIT file.
Preamble Send an SNRM frame to the IUT to place it to NRM mode. The IUT shall send
an appropriate response. If there is no response, or the response is not UA,
the test is failed.
Do Wait 10% more than the inactivity time out then send a DISC frame to the
IUT.
Check Expect a DM frame. If there is no response, or the response frame is not of
type DM, the Verdict is FAILED.
Postamble
Remark
Test Plan V1.0
Test Case Incorrect frame field values.
Reference [1], 6.4.1, 6.4.3.10, 6. 4.4.2.3.
Test priority High
Purpose Making sure that the Server checks always all HDLC frames and fields and
can act as specified, if frames are not correct.
Description Client sends erroneous HDLC frames to Server. Errors must be generated in
all modes to all frame types and to all frame fields.
Preconditions There is a physical connection between the client and the server.
Client has the send permission.
Do Client creates all types of HDLC frames with following errors and sends the
frames to the server.
1. The frame is not properly bounded by two flags
2. The frame is too short
3. Octet framing is violated
4. Unknown HDLC address [1] 6.4.2.
5. ALL_STATION or NO_STATION address in the Source and Destination
Address field [1] 6.4.2.3, 6.4.2.4
6. ALL_STATION address with poll = 1 [1] 6.4.2.4
7. Unknown value in format type sub-field of the Frame format field
8. Wrong value in frame length sub-field of the Frame format field
9. Unknown command identifier in control field [1] 6.4.3.2, 6.4.3.10
10. Wrong N(S) sequence number in control field [1] 6.4.3.3, 6.4.3.4, 6.4.3.5,
6.4.3.10
11. Wrong N(R) sequence number in control field [6.4.3.10[
12. Too long information field [1] 6.4.3.10.
Check Server’s answer (if any) must be:
1. No answer
2. No answer
3. No answer
4. No answer
5. No answer
6. No answer
7. No answer
8. No answer
9. FRMR response [2], Ch. 5.6.4]
10. No response [2, Ch. 5.6.2]
DLMS UA WG CT Release: 1.1 7/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
11. Server must send again previously sent but not confirmed I frames.
12. FRMR frame [2, Ch. 5.5.3.4.2]
Post-conditions -
Remark
Test routine HDLC_1 Subtest 0 implemented in Pack 1 test tool Test Case Incorrect frame field values - Make sure we have a connected device
Precondition Take the HDLC address parameters from the PIXIT.
Preamble
Do Send an SNRM frame to the IUT.
Check Check the response. If there is no response, the Verdict is FAILED(0).
Postamble
Remark
Test routine HDLC_1 Subtest 1 implemented in Pack 1 test tool Test Case Incorrect frame field values - Frame is not properly bounded by two flag
Precondition The meter is in NRM.
Preamble
Do Send an SNRM frame with leading flag, trailing flag and both missing.
Check In each case if the length if there is a response, the Verdict is FAILED(1),
FAILED(2) or FAILED(3) respectively.
Postamble Check if the device is still there, by sending an SNRM frame. If the IUT does
not respond, the Verdict is FAILED(4).
Remark
Test routine HDLC_1 Subtest 2 implemented in Pack 1 test tool Test Case Incorrect frame field values - Frame is too short
Precondition The meter is in NRM
Preamble
Do Send the first 1, 2….n bytes of the SNRM frame (without information field).
Check If the length of the response byte string is <>0, the Verdict is FAILED(5).
Postamble Check if the device is still there, by sending a correct SNRM frame. If the IUT
does not respond, the Verdict is FAILED(6).
Remark
Test routine HDLC_1 Subtest 3 implemented in Pack 1 test tool Test Case Incorrect frame field values - Octet framing is violated
Precondition This test is not implemented in V0.1
Preamble
DLMS UA WG CT Release: 1.1 8/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
Do
Check
Postamble
Remark
Test routine HDLC_1 Subtest 4 implemented in Pack 1 test tool
Test Case Incorrect frame field values - Unknown HDLC addresses
Precondition Instead of the HDLC addresses taken from the PIXIT file, the test tool uses
reserved server addresses on 1, 2 or 4 bytes (02, 0201, 00020001
respectively)
Preamble
Do Send SNRM frame with reserved addresses on one byte, two bytes and four
bytes respectively.
Check If the result is not NoResponse, the Verdict is FAILED(7), FAILED(8) or
FAILED (9) respectively.
Postamble Restore original HDLC addresses from the PIXIT.
Check if the device is still there, by sending a correct SNRM frame. If the IUT
does not respond, the Verdict is FAILED(10).
Remark
Test routine HDLC_1 Subtest 5 implemented in Pack 1 test tool
Test Case Incorrect frame field values - All_Station and No_Station addresses
Precondition Use HDLC addresses from PIXIT file.
Preamble
Do ; Set Source address to 7F (All-Station) and send an SNRM frame.
; Set Source Address to 00 (No_Station) and send an SNRM frame.
; Reset Source Address and set Destination Address to 7F (All-Station) and
send an SNRM frame
; Set Destination Address to 00 (No_Station) and send an SNRM frame.
Check In all cases, if the result is not NoResponse, then the Verdict is FAILED(11),
FAILED(12), FAILED(13) and FAILED (14) respectively.
Postamble Check if the device is still there, by sending a correct SNRM frame. If the IUT
does not respond, the Verdict is FAILED(15).
Remark This test need to be improved.
In the PIXIT, the server lower and upper HDLC addresses shall be entered in
an explicit form (1 byte or 2 bytes).
The test tool shall send the destination address in a format which is
acceptable by the server.
The tool shall also test if the server treats inopportune address lengths
correctly.
Test routine HDLC_1 Subtest 6 implemented in Pack 1 test tool
Test Case Incorrect frame field values - All_Station address with poll = 1
Precondition This test is not implemented
Preamble
Do
Check
DLMS UA WG CT Release: 1.1 9/19 en
? Copyright 1997-2001 DLMS User Association
COSEM Conformance testing
Data Link Layer test plan
Postamble
Remark
Test routine HDLC_1 Subtest 7 implemented in Pack 1 test tool Test Case Incorrect frame field values - Unknown value in format type sub-field of
the Frame format field
Precondition
Preamble
Do Send an SNRM frame with a wrong value in the frame type field.
Check If the result is not NoResponse, the Verdict is FAILED(16).
Postamble Reset frame type. Check if the device is still there, by sending a correct
SNRM frame. If the IUT does not respond, the Verdict is FAILED(17).
Remark
Test routine HDLC_1 Subtest 8 implemented in Pack 1 test tool Test Case Incorrect frame field values - Wrong value in the frame length sub-field
of the Frame format field
Precondition
Preamble
Do Send an SNRM frame with a wrong value in the frame length field.
Check If the result is not NoResponse, the Verdict is FAILED(18).
Postamble Reset the value of the length sub-field. Check if the device is still there, by
sending a correct SNRM frame. If the IUT does not respond, the Verdict is
FAILED(19).
Remark
Test routine HDLC_1 Subtest 9 implemented in Pack 1 test tool
Test Case Incorrect frame field values - Unknown command identifier in control
field
Precondition
Preamble
Do Send an SNRM frame with an unknown command identifier.
Check If the IUT does not respond or the response frame is not FRMR, then the
Verdict is FAILED (20).
Postamble Reset the value of the control field. Check if the device is still there, by
sending a correct SNRM frame. If the IUT does not respond, the Verdict is
FAILED(21).
Remark The test should be also done with a command identifier which is a valid
command according to [1], but which, according to the PICS is not
implemented in the server.
Test routine HDLC_1 Subtest 10 implemented in Pack 1 test tool
Test Case Incorrect frame field values - Wrong N(S) sequence number in control
field
Precondition
DLMS UA WG CT Release: 1.1 10/19 en
? Copyright 1997-2001 DLMS User Association