DOC

Conftest DLL V1.3_GK020129

By Samuel Warren,2014-09-15 22:24
18 views 0
Conftest DLL V1.3_GK020129

    Conformance Test specification dlmsdeviceData Link Layer languagemessagespecification

    Project: COSEM conformance testing - Data Link Layer

    DLMS-UA WG Conformance testing Author:

    V1.3 Version:

    for review [in work, for review, released] Status:

    29.01.2002 Revision Date:

    ? Copyright 1997-2002 Copyright:

    DLMS User Association use only Classification:

    Conftest DLL V1.3_GK020129.doc Filename:

    V1.2, file DLL V1.2_GK011026.doc Replace Doc

    Updates based on IEC 62056-46 FDIS and HDLC test routines Comment:

    implemented in Pack 3 (V0.17) of the test tool

Compiled: DLMS UA Mika Makinen, Gyozo Kmethy

     Responsibility: CTWG DLMS UA - 1/39 en Release: 1.3

    Form. 9.221.1

    COSEM Conformance testing

    Data Link Layer test plan V1.3

    Table of Contents

    1 Scope of the document ............................................................................................. 4

    2 Introduction.............................................................................................................. 5 2.1 Referenced documents ..................................................................................... 5 2.2 Terms, Definitions and Abbreviations ................................................................. 5 2.3 Revision History ............................................................................................... 5

    3 Testing of COSEM MAC Layer ................................................................................... 6 3.1 General test cases ........................................................................................... 6

    3.1.1 Response delays................................................................................... 6

    3.1.2 Test HDLC_6: Intra-frame time-out ......................................................... 7

    3.1.3 Physical connection abort ...................................................................... 8

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

    out) ...................................................................................................... 9

    3.1.5 Incorrect frame field values .................................................................. 11

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

    device .................................................................................. 12

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

    two flags ............................................................................... 13

    3.1.5.3 Test HDLC_1 Subtest 2: Frame is too short .............................. 14

    3.1.5.4 Test HDLC_1 Subtest 3: Octet framing is violated ..................... 14

    3.1.5.5 Test HDLC_1 Subtest 4: Unknown HDLC addresses ................. 15

    3.1.5.6 Test HDLC_1 Subtest 5: All-Station and No_Station

    addresses ............................................................................. 16

    3.1.5.7 Test HDLC_1 Subtest 6: All_Station address with poll =1 ........... 17

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

    field of the Frame format field ................................................. 18

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

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

    3.1.5.10 Test HDLC_1 Subtest 9: Unknown command identifier in

    control field ........................................................................... 20

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

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

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

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

    3.1.5.13 Test HDLC_1 Subtest 12: Too long information field .................. 23

    3.1.6 Several mode setting command frames without response possibility ......... 24

    3.2 NDM Test Cases ............................................................................................ 25

    3.2.1 UI frame exchange in NDM .................................................................. 25

    3.2.2 Mode change to NRM .......................................................................... 25

    3.2.2.1 Test HDLC_2 Subtest 1: SNRM without information field ........... 26

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

    frame ................................................................................... 27

    3.2.2.3 Test HDLC_2 Subtest 3: ClientMaxInfoLength parameter

    negotiation ............................................................................ 28

    3.2.2.4 Test HDLC_ 2 Subtest 4: ClientWindowSizeReceive

    parameter negotiation ............................................................ 29

    3.2.3 Wrong command frames ...................................................................... 30

    3.2.3.1 Test HDLC_3 Subtest 1: I frame in NDM .................................. 30

    DLMS UA WG CT Release: 1.3 2/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

    3.2.3.2 Test HDLC_3 Subtest 2: DISC frame in NDM............................ 31

    3.3 NRM Test Cases ............................................................................................ 32

    3.3.1 Test HDLC_4: Mode change to NDM ..................................................... 32

    3.3.2 I frame exchange ................................................................................ 33

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

    True and Poll = True .............................................................. 34

    3.3.2.2 Test HDLC_5 Subtest 2: Send small frames with Seg =

    True and Poll - False.............................................................. 36

    3.3.3 NRM recovery ..................................................................................... 37 4 Testing the COSEM LLC Layer ................................................................................ 38

    4.1 Broadcast address ......................................................................................... 38

    4.2 LLC PDU control field errors............................................................................ 38

DLMS UA WG CT Release: 1.3 3/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

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

    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.

    This classification is added to all test cases.

    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 1.3 includes the V1.0 test plans and the test plans implemented in Pack 3 of the test tool (test routines V0.17).

    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.3 4/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

    2 Introduction

    2.1 Referenced documents

    Ref. Title

    13/1267/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

    [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

    13/1270/FDIS, draft IEC 62056-62 Electricity metering Data exchange for meter reading, [5]

    tariff and load control Part 62: COSEM Interface classes

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

    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

    1.2 26/10/2001 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. 29/02/2002 G. Kmethy Aligned with CTT Pack 3 V0.17

    DLMS UA WG CT Release: 1.3 5/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

3 Testing of COSEM 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. 3.1 General test cases

    3.1.1 Response delays

    Test Plan V1.0

    Test Case Response delays

    Reference [1], 6.4.4.9.1, 6.4.4.10.1.

    Test priority / High

    Classification Positive test case.

    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 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 not implemented in the Pack 3 test tool.

    DLMS UA WG CT Release: 1.3 6/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

    3.1.2 Test HDLC_6: Intra-frame time-out

    Test Plan V1.0

    Test Case Intra-frame time-out

    Reference [1] 6.4.4.10.4, [2], 4.6.3

    Test priority / High

    Classification Positive test case.

    Purpose Making sure that the server implements intra-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. The manufacturer has to inform about the server’s timer

    length. Minimum and maximum values are defined in [5], interface class 23

    IEC HDLC setup. The value was 1000 ms in version 0, and is increased to

    6000 ms in version 1 (amendment to the standard).

    Test case implemented in Pack 3 test tool

    Test Case Intra-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;

    DLMS UA WG CT Release: 1.3 7/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

     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''

     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.

3.1.3 Physical connection abort

    Test Plan V1.0

    Test Case Physical connection abort

    Reference [1], 6.2.2.

    Test priority / High

    Classification Positive test case.

    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 not implemented in the Pack 3 test tool. DLMS UA WG CT Release: 1.3 8/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

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

    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

    Classification Positive test case.

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

    Link Layer shall only report the event to the layer management application.

    The requirement and the test are under consideration.

    Test case implemented in Pack 3 test tool

    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

     Frame, PIXIT, PICS_PIXIT, SysUtils;

procedure T_HDLC_7.Execute;

     var

     NoResponse : boolean;

     InactivityTimeout : cardinal;

    DLMS UA WG CT Release: 1.3 9/39 en

    ? Copyright 1997-2001 DLMS User Association

COSEM Conformance testing

    Data Link Layer test plan V1.3

    begin

     Description('Long delay without any data exchange (Inactivity time-out)');

     // Go to NRM

     SentFrame.Kind := fkSNRM;

     SendReceiveFrame(SentFrame, ResponseFrame, NoResponse);

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

     Failed('H7.1.1');

     // Inactivity-timeout (+10%)

     InactivityTimeout := PIXIT_[ppDataLinkLayer][ppInactivityTimeout].AsIntegerConst(0,MaxInt);

     InactivityTimeout := (InactivityTimeout * 110) div 100;

     Wait(InactivityTimeout);

     // Send a DISC frame to check that we are deconnected, expect a DM answer

     SentFrame.Kind := fkDISC;

     SendReceiveFrame(SentFrame, ResponseFrame, NoResponse);

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

     Failed('H7.1.2');

end;

    DLMS UA WG CT Release: 1.3 10/39 en

    ? Copyright 1997-2001 DLMS User Association

Report this document

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