DOC

Conftest_DLL_V2.0_GK020515

By Jeanne Robertson,2014-09-15 22:30
6 views 0
Conftest_DLL_V2.0_GK020515

    COSEM conformance testing

    Data Link Layer test plan devicelanguagemessagespecification

    Project: COSEM conformance testing - Data Link Layer

Author: DLMS UA WG Conformance testing

    Mika Makinen Gyozo Kmethy

    Version: V2.0

    Status: Released [in work, for review, released] Revision Date: 2002-05-15

    Copyright: ? Copyright 1997-2002

    Classification: DLMS User Association use only

    Filename: Conftest_DLL_V2.0_GK020515.doc

    Replace Doc V1.4, filename DLL V1.4_GK020408.doc Comment: In line with COSEM conformance test tool version 1.0

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 1/41

     ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

    Table of Contents

    Table of Contents ........................................................................................................... 2

    1 Foreword ................................................................................................................. 4

    2 Scope...................................................................................................................... 4

    3 Introduction.............................................................................................................. 5 3.1 Referenced documents ..................................................................................... 5 3.2 Terms, Definitions and Abbreviations ................................................................. 5 3.3 Revision History ............................................................................................... 6

    4 Testing the MAC Layer .............................................................................................. 7 4.1 General test cases ........................................................................................... 7

    4.1.1 Response delays................................................................................... 7

    4.1.2 Test HDLC_6: Inter-frame time-out ......................................................... 7

    4.1.3 Physical connection abort ...................................................................... 9

    4.1.4 Test HDLC_7: Long delay without any data exchange (Inactivity time-

    out) .................................................................................................... 10

    4.1.5 Incorrect frame field values .................................................................. 12

    4.1.5.1 Test HDLC_1 Subtest 0: Make sure we have a connected

    device .................................................................................. 13

    4.1.5.2 Test HDLC_1 Subtest 1: Frame is not properly bounded by

    two flags ............................................................................... 14

    4.1.5.3 Test HDLC_1 Subtest 2: Frame is too short .............................. 15

    4.1.5.4 Test HDLC_1 Subtest 3: Octet framing is violated ..................... 15

    4.1.5.5 Test HDLC_1 Subtest 4: Unknown HDLC addresses ................. 16

    4.1.5.6 Test HDLC_1 Subtest 5: All-Station and No_Station

    addresses ............................................................................. 17

    4.1.5.7 Test HDLC_1 Subtest 6: All_Station address with poll =1 ........... 18

    4.1.5.8 Test HDLC_1 Subtest 7: Unknown value in format type sub-

    field of the Frame format field ................................................. 19

    4.1.5.9 Test HDLC_1 Subtest 8: Wrong value in the frame length

    sub-field of the Frame format field ........................................... 20

    4.1.5.10 Test HDLC_1 Subtest 9: Unknown command identifier in

    control field ........................................................................... 21

    4.1.5.11 Test HDLC_1 Subtest 10: Wrong N(R) sequence number in

    control field ........................................................................... 22

    4.1.5.12 Test HDLC_1 Subtest 11: Wrong N(S) sequence number in

    control field ........................................................................... 23

    4.1.5.13 Test HDLC_1 Subtest 12: Too long information field .................. 24

    4.1.6 Several mode setting command frames without response possibility ......... 25

    4.2 NDM Test Cases ............................................................................................ 26

    4.2.1 UI frame exchange in NDM .................................................................. 26

    4.2.2 Mode change to NRM .......................................................................... 26

    4.2.2.1 Test HDLC_2 Subtest 1: SNRM without information field ........... 27

    4.2.2.2 Test HDLC_2 Subtest 2: Check NRM by sending an RR

    frame ................................................................................... 28

    4.2.2.3 Test HDLC_2 Subtest 3: ClientMaxInfoLength parameter

    negotiation ............................................................................ 29

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 2/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

    4.2.2.4 Test HDLC_ 2 Subtest 4: ClientWindowSizeReceive

    parameter negotiation ............................................................ 31

    4.2.2.5 Test HDLC_2 Subtest 5: Window size length encoding .............. 32

    4.2.3 Wrong command frames ...................................................................... 33

    4.2.3.1 Test HDLC_3 Subtest 1: I frame in NDM .................................. 33

    4.2.3.2 Test HDLC_3 Subtest 2: DISC frame in NDM............................ 34

    4.3 NRM Test Cases ............................................................................................ 35

    4.3.1 Test HDLC_4: Mode change to NDM ..................................................... 35

    4.3.2 I frame exchange ................................................................................ 37

    4.3.2.1 Test HDLC_5 Subtest 1: Send small frames with Seg =

    True and Poll = True .............................................................. 37

    4.3.3 NRM error recovery (Client initiated) ..................................................... 39 5 Testing the LLC Layer ............................................................................................. 40 5.1 Broadcast address ......................................................................................... 40 5.2 LLC PDU control field errors............................................................................ 40 Index ........................................................................................................................... 41

DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 3/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

1 Foreword

    Copyright

    ? Copyright 1997-2002 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.

    2 Scope

    This document specifies the tests to be performed in order to verify the conformance on data link level. The tests are based on the data link layer specifications [1], [2] and [3]. Based on ISO/IEC 9646 [4], recommendation X.290 Conformance testing a distinction is made between positive and negative test cases:

    ; In a positive test case, a syntactically correct message is sent from the test tool to the IUT

    in the right context/state.

    ; In a negative test case, a syntactically invalid message is sent or the message

    syntactically correct or incorrect is sent in an inopportune context/state.

    A client, which is conformant to the specification will not send syntactically invalid messages or inopportune messages to the Server.

    For the result, a distinction is made between:

    ; valid test event: a test event which is allowed by the protocol recommendation, being both

    syntactically correct and occurring or arriving in an allowed context with an observed

    outcome;

    ; syntactically invalid test event: a test event which syntactically is not allowed by the

    protocol recommendation;

    ; inopportune test event: A test event, which, although syntactically correct, occurs or

    arrives at a point in an observed outcome, when not allowed to do so by the protocol

    recommendation.

    A PASS verdict is given when the observed outcome satisfies the test purpose and is valid with respect to the standard and with respect to the PICS.

    A FAIL verdict is given when the observed outcome is syntactically invalid or inopportune with respect to the standards or the PICS.

    Version 2.0 is in line with the CTT version 1.0.

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 4/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

3 Introduction

    3.1 Referenced documents

    Ref. Title

    IEC 62056-46:2002, Electricity metering Data exchange for meter reading, tariff and load control Part [1] 46: Data link layer using HDLC protocol,

    ISO/IEC 13239:2000 Information Technology Telecommunications and information exchange between [2] systems High-level data link control (HDLC) procedures, Second Edition

    ISO/IEC 8802-2:1998 Information technology Telecommunications and information exchange between [3] systems Local and metropolitan area networks - Specific requirements Part 2: Logical link control [4] ISO/IEC 9646-1 (1994-12): Information technology Open Systems Interconnection - Conformance testing methodology and framework - Part 1: General concepts

    ISO/IEC 9646-2 (1994-12): Information technology Open Systems Interconnection Conformance testing methodology and framework - Part 2: Abstract test suite specification

    IEC 62056-62:2002, Electricity metering Data exchange for meter reading, tariff and load control Part [5] 62: Interface classes

    3.2 Terms, Definitions and Abbreviations Abbreviation Explanation

    COSEM Companion Specification for Energy Metering

    DLMS Device Language Message Specification

    IEC International Electrotechnical Commission

    IUT Implementation under test ( the metering equipment)

    PDU Protocol data unit

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 5/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

3.3 Revision History

    Versions kept within the DLMS-UA WG Conformance testing.

    Version Date Author Comment 0.1 2000-04-20 M. Mäkinen Initial version

    0.2 2000-05-22 M. Mäkinen Modified the document to use new common test case format. Minor editorial changes.

    0.3 2000-05-24 G. Kmethy Modified document and added comments in DLMS UA CT meeting. 0.4 2000-07-07 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 2000-07-17 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 2001-07-27 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

    1.2 2001-10-26 G. Kmethy References updated to be in line with 13/1267/FDIS, draft IEC 62056-46

    Test plans aligned with test scripts. Test scripts added.

    Classificaton of tests: valid syntactically invalid inopportune added.

    1.3. 2002-02-29 G. Kmethy Aligned with CTT Pack 3, V0.17

    1.4 2002-04-08 G. Kmethy Aligned with Pack 4, V0.24

    2.0 2002-05-15 G. Kmethy Brought in line with Version 1.0 of the CTT.

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 6/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

4 Testing the MAC Layer

    The MAC layer has different modes and therefore testing the MAC layer can be divided into general type tests and mode specific tests. General tests contain test cases that must be tested in all protocol modes and mode specific tests are tested only in the specified mode. 4.1 General test cases

    4.1.1 Response delays

    Test Case Response delays

    Reference [1], 6.4.4.9.1, 6.4.4.10.1.

    Test priority Low

    Purpose Making sure that the server sends responses always quickly enough

    (SNRM, DISC and I frames)

    Description During the conformance test, this timeout is controlled every time a

    response is waited for 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 the timer if a command frame with poll == 1 is sent to the server or

    if a response frame with final == 0 is received.

    Check Check that next response frame is received before the timer expires.

    Post-conditions -

    Remark This test is implicitly done during the other tests.

    4.1.2 Test HDLC_6: Inter-frame time-out

    Test Case Inter-frame time-out

    Reference [1] 6.4.4.10.4, [2], 4.6.3

    Test priority High

    Purpose Making sure that the server implements inter-frame time-out.

    Description The server has to start scanning for a new opening flag if the reception

    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.

    The 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 the

    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 optional.

DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 7/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

    Test case implemented in Version 1.0 of the CTT Test Case Inter-frame time-out

    Classification Positive test case.

    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 H6.1.1.

    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 H6.1.2. Postamble

    Remark

    Test source

    unit HDLC_6;

interface

     uses

     HDLCBase;

     type

     T_HDLC_6 = class(THDLCTestCase)

     procedure Execute; override;

     end;

implementation

     uses

     Frame, PIXIT, PICS_PIXIT, Misc;

procedure T_HDLC_6.Execute;

     var

     NoResponse : boolean;

     PduByteStr : string;

    begin

     Description('Inter-frame time-out');

     // Go to NRM

     SentFrame.Kind := fkSNRM;

     SendReceiveFrame(SentFrame, ResponseFrame, NoResponse);

     if NoResponse then

     Failed('H6.1.1');

     // Get the bytes of a DISC frame

     SentFrame.Kind := fkDisc;

     PduByteStr := SentFrame.GetPDUByteStr;

     // Strip the trailing flag and transmit the frame

     SendBytes(Copy(PduByteStr, 1, pred(length(PduByteStr))));

     // Wait 10% more than ''InterFrameTimeout'' DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 8/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

    Wait((PIXIT_[ppDataLinkLayer][ppInterFrameTimeout].AsIntegerConst(0,1000) * 11) div 10);

     // Send a RR frame and expect a RR response from this frame.

     SentFrame.Kind := fkRR;

     SendReceiveFrame(SentFrame, ResponseFrame, NoResponse);

     if NoResponse or (ResponseFrame.Kind <> fkRR) then

     Failed('H6.1.2');

    end;

initialization

     HDLCTestCollection_.RegisterTestCase(T_HDLC_6);end.

4.1.3 Physical connection abort

    Test Case Physical connection abort

    Reference [1], 6.2.2.

    Test priority Low

    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 is not implemented in Version 1.0 of the CTT.

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 9/41

    ? Copyright 2002 DLMS User Association

    nd edition DLMS User Association, COSEM Conformance testing - Data Link Layer test plan, 2

4.1.4 Test HDLC_7: Long delay without any data exchange (Inactivity time-out)

    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 The 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. Therefore, 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 It will be precised in [1] 6.4.4.10.3, that in this case the data link layer

    has to be disconnected.

    Test case implemented in Version 1.0 of the CTT

    Test Case Long delay without any data exchange (Inactivity time-out)

    Classification Positive test case.

    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

    H7.1.1.

    Do Wait 10% more than the inactivity time out. 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 H7.1.2.

    Postamble

    Remark

    Test source

    unit HDLC_7;

interface

     uses

     HDLCBase;

     type

     T_HDLC_7 = class(THDLCTestCase)

     procedure Execute; override;

     end;

implementation

     uses

    DLMS User Association Date: 2002-02-15 DLMS UA 1001-3 ed.2 10/41

    ? Copyright 2002 DLMS User Association

Report this document

For any questions or suggestions please email
cust-service@docsford.com