BS EN 62056-53:2007 BRITISH STANDARD Electricity metering — Data exchange for meter reading, tariff and load control — Part 53: COSEM application layer The European Standard EN 62056-53:2007 has the status of a British Standard ICS 35.100.70; 91.140.50 ?? ? ? ????? ??????? ??? ?? ???????? ? ?? ? ?? ?? ?? ?????? ? ?? ? ? ?????? ? ??? ? ? ? ? ? ? ? ? ? ? BS EN 62056-53:2007 National foreword This British Standard was published by BSI It is the UK implementation of EN 62056-53:2007 It is identical with IEC 62056-53:2006 It supersedes BS EN 62056-53:2002, which will be withdrawn on February 2010 The UK participation in its preparation was entrusted to Technical Committee PEL/13, Electricity meters A list of organizations represented on this committee can be obtained on request to its secretary This publication does not purport to include all the necessary provisions of a contract Users are responsible for its correct application Compliance with a British Standard cannot confer immunity from legal obligations This British Standard was published under the authority of the Standards Policy and Strategy Committee on 30 June 2007 © BSI 2007 ISBN 978 580 50854 Amendments issued since publication Amd No Date Comments EN 62056-53 EUROPEAN STANDARD NORME EUROPÉENNE EUROPÄISCHE NORM April 2007 ICS 91 40.50; 35.1 00.70 Supersedes EN 62056-53:2002 English version Electricity metering Data exchange for meter reading, tariff and load control Part 53: COSEM application layer (IEC 62056-53:2006) Equipements de mesure de l'énergie électrique Echange des données pour la lecture des compteurs, le contrôle des tarifs et de la charge Partie 53: Couche application COSEM (CEI 62056-53:2006) Messung der elektrischen Energie Zählerstandsübertragung, Tarif- und Laststeuerung Teil 53: COSEM-Anwendungsschicht (IEC 62056-53:2006) This European Standard was approved by CENELEC on 2007-02-01 CENELEC members are bound to comply with the CEN/CENELEC Internal Regulations which stipulate the conditions for giving this European Standard the status of a national standard without any alteration Up-to-date lists and bibliographical references concerning such national standards may be obtained on application to the Central Secretariat or to any CENELEC member This European Standard exists in three official versions (English, French, German) A version in any other language made by translation under the responsibility of a CENELEC member into its own language and notified to the Central Secretariat has the same status as the official versions CENELEC members are the national electrotechnical committees of Austria, Belgium, Bulgaria, Cyprus, the Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, the Netherlands, Norway, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Switzerland and the United Kingdom CENELEC European Committee for Electrotechnical Standardization Comité Européen de Normalisation Electrotechnique Europäisches Komitee für Elektrotechnische Normung Central Secretariat: rue de Stassart 35, B - 050 Brussels © 2007 CENELEC - All rights of exploitation in any form and by any means reserved worldwide for CENELEC members Ref No EN 62056-53:2007 E EN 62056-53:2007 –2– Foreword The text of document 3/1 387/FDIS, future edition of IEC 62056-53, prepared by IEC TC 3, Electrical energy measurement, tariff- and load control, was submitted to the IEC-CENELEC parallel vote and was approved by CENELEC as EN 62056-53 on 2007-02-01 This European Standard supersedes EN 62056-53:2002 The main changes with respect to EN 62056-53:2002 are as follows: − the protocol of the COSEM-RELEASE service has been changed: depending on the communication profile used, these services may rely on the ACSE A_RELEASE services; − the parsing order of the AARQ APDU has been changed; − handling of repeated application association requests has been simplified; − the Service_Class parameter of the COSEM-OPEN service is now linked to the response allowed field of the xDLMS-Initiate.request APDU; − the Service_Class parameter of COSEM services for data exchange using LN referencing is now linked to bit of the Invoke-Id-And-Priority parameter; − a new, optional EXCEPTION APDU has been introduced The server may send back this APDU after an erroneous service request; − a general part about using the COSEM application layer in various communication profiles has been added; − the description of using the COSEM Application layer in the 3-layer, connection-oriented, HDLC based communication profile has been amended; − a new, TCP-UDP/IP based communication profile has been defined The following dates were fixed: – latest date by which the EN has to be implemented at national level by publication of an identical national standard or by endorsement (dop) 2007-1 -01 – latest date by which the national standards conflicting with the EN have to be withdrawn (dow) 201 0-02-01 The International Electrotechnical Commission (IEC) and CENELEC draw attention to the fact that it is claimed that compliance with this International Standard / European Standard may involve the use of a maintenance service concerning the stack of protocols on which the present standard IEC 62056-53 / EN 62056-53 is based The IEC and CENELEC take no position concerning the evidence, validity and scope of this maintenance service The provider of the maintenance service has assured the IEC that he is willing to provide services under reasonable and non-discriminatory terms and conditions with applicants throughout the world In this respect, the statement of the provider of the maintenance service is registered with the IEC Information may be obtained from: DLMS ) User Association Geneva / Switzerland www.dlms.ch ) Device Lang uag e M essage Specification –3– EN 62056-53:2007 Annex ZA has been added by CENELEC Endorsement notice The text of the International Standard IEC 62056-53:2006 was approved by CENELEC as a European Standard without any modification EN 62056-53:2007 –4– CONTENTS Scope Normative references Terms, definitions and abbreviations The COSEM communications framework 4.1 Client/server type operation, communication profiles 4.2 Connection (association) oriented operation Overview: the COSEM application layer 5.1 Specification method 5.2 Application layer structure 5.3 Service specification 5.4 Layer management services 5.5 Protocol specification COSEM application layer – Service specification 6.1 Summary of services 6.2 Application association establishment and release 6.3 Special application associations 6.4 Data communication 6.5 Client COSEM application layer services 6.6 Server COSEM application layer services 38 6.7 Summary of COSEM application layer services and service parameters 55 COSEM application layer protocol specification 59 7.1 State definitions for the client side control function 59 7.2 State definitions for the server side control function 61 7.3 Protocol for application association establishment/release 62 7.4 Protocol for data communications 74 Specification of COSEM data types 89 8.1 The COSEM APDUs 89 8.2 The ACSE APDUs 90 8.3 Useful types 93 8.4 The xDLMS-Initiate.request/response/ConfirmedServiceError PDUs 98 8.5 The conformance block 98 8.6 Definition of APDUs for data communication 99 Annex A (normative) The xDLMS application service element 05 Annex B (normative) Using the COSEM Application Layer in various communication profiles 07 Annex C (informative) AARQ and AARE encoding examples 26 Annex D (informative) Data model and protocol 38 Annex ZA (normative) Normative references to international publications with their corresponding European publications 45 Bibliography 39 INDEX 42 –5– EN 62056-53:2007 Figure – Client/server relationship in COSEM Figure – Exchanging messages via the communication protocol 1 Figure – The COSEM application layer on the top of various lower layer stacks 1 Figure – A complete communication session in the CO environment Figure – The structure of the COSEM application layers Figure – Structure of the COSEM AL when the server is using SN references Figure – Summary of COSEM application layer services Figure – Normal service sequence for the COSEM-OPEN service Figure – Client side services for application association establishment Figure – Client side services for releasing an application association 23 Figure 1 – Client side data communication services 26 Figure – Client side services for event notification 35 Figure – Server side services for application association establishment 38 Figure – Server side services for releasing an application association 40 Figure – Server side data communications services using LN referencing 44 Figure – Partial state machine for the client side control function 60 Figure – Partial state machine for the server side control function 61 Figure – MSC for successful application association establishment preceded by a successful lower layer connection establishment 63 Figure – Graceful association release using the A-RELEASE service 69 Figure 20 – Graceful release of an application association by disconnection the supporting layer 70 Figure 21 – Aborting an application association following a PH-ABORT.indication 71 Figure 22 – MSC for a confirmed GET service in case of success 75 Figure 23 – MSC for a confirmed SET service in case of success 75 Figure 24 – MSC for the SET service in case of failure 76 Figure 25 – MSC for the ACTION service (simplest case) 76 Figure 26 – Long data with the GET service in three data blocks 81 Figure 27 – Long data transfer in three data blocks with the SET service 83 Figure 28 – Long data transfer with the ACTION service 85 Figure 29 – MSC for the ReadRequest/Response services 87 Figure B.1 – Identification/addressing scheme in the 3-layer, connection-oriented, HDLC based communication profile 1 Figure B – Data link layer services provided to and used by the client COSEM application layer 1 Figure B – Data link layer services provided to and used by the server COSEM application layer 1 Figure B – Example: EventNotificaton triggered by the client 1 Figure B – Multi-drop configuration and its model 1 Figure B.6 – Master/ Slave operation on the multi-drop bus 1 Figure B – COSEM as a standard I nternet application protocol 1 Figure B.8 – Examples for lower-layer protocols in the TCP-UDP/I P based profiles 1 Figure B – I dentification/addressing scheme in the TCP-UDP/IP based profile(s) 20 Figure B – Summary of TCP/UDP layer services on the client and server side 21 Figure D.1 – The three-step approach of COSEM 38 EN 62056-53:2007 –6– Table – Mapping between client side LN and server side SN referencing services 37 Table – Application layer services – summary 55 Table – Summary of the service parameters in the COSEM-OPEN service primitives 56 Table – Summary of the service parameters in the COSEM-RELEASE service primitives 57 Table – Summary of the service parameters in the COSEM-ABORT service primitives 57 Table – Summary of the service parameters in the COSEM GET service primitives 57 Table – Summary of the service parameters in the COSEM SET service primitives 58 Table – Summary of the service parameters in the COSEM ACTION service primitives 58 Table – Summary of the service parameters in the COSEM EventNotification service primitives 59 Table – Mapping between the EventNotification and InformationReport services 88 Table B – Application associations and data exchange in the 3-layer, connectionoriented, HDLC based profile 1 Table B.2 –Application associations and data exchange in the TCP-UDP/IP based profile 23 EN 62056-53:2007 –7– ELECTRICITY METERING – DATA EXCHANGE FOR METER READING, TARIFF AND LOAD CONTROL – Part 53: COSEM application layer Scope This part of I EC 62056 specifies the COSEM application layer in terms of structure, services and protocols for COSEM clients and servers, and defines how to use the COSEM application layer in various communication profiles It defines services for establishing and releasing application associations, and data communication services for accessing the methods and attributes of COSEM interface objects, defined in IEC 62056-62, using either logical name (LN) or short name (SN) referencing Annex A describes the xDLMS application service element Annex B defines how to use the COSEM application layer in various communication profiles Annex C includes encoding examples for APDUs Annex D gives an explanation of the role of data models and protocols in electricity meter data exchange Normative references The following referenced documents are indispensable for the application of this document For dated references, only the edition cited applies For undated references, the latest edition of the referenced document (including any amendments) applies IEC 60050-300: 2001 , In tern a tion a l Electrotech n ica l Voca b ula ry (IEV) – Electrica l and e lectron ic me a surem e n ts a n d me a surin g in strum en ts – Pa rt 31 : G e n e l te rms re la tin g to me a surem e n ts – Pa rt 31 2: G e n era l terms re la tin g to e lectrica l m e a sure me n ts – Pa rt 31 3: Typ es o f e lectrica l m ea surin g in strume n ts – Pa rt 31 : Sp ecific te rms a ccordin g to the type of in strume n t IEC 61 334-4-41 :1 996, Distrib ution a utom a tion usin g distrib ution lin e ca rrie r syste ms – Pa rt 4: Da ta com m un ica tion protocols – Section 41 : A pp lica tion protocols – Distrib ution lin e m e ssa ge specifica tio n IEC 61 334-6:2000, Distribution a utom a tion usin g distrib ution lin e ca rrier syste ms – Pa rt 6: A -XDR e n codin g rule IEC 62051 :1 999, Electricity me te rin g – Glossa ry of te rms IEC 62051 -1 :2004, trol – G lossa ry Electricity m ete rin g – Da ta e xcha n ge for me te r re a din g, of Te rms – Pa rt 1: Term s re la te d to da ta exch a n ge ta riff a n d loa d with m eterin g equipm e n t usin g DL MS/COSEM IEC 62056-21 :2002, Electricity m e terin g – Da ta e xcha n ge for me te r re a din g, trol – Pa rt 21 : Direct loca l da ta exch a n ge ta riff a n d lo a d EN 62056-53:2007 IEC 62056-42:2002, trol – Pa rt –8– Electricity m e terin g – Da ta e xcha n ge for me te r re a din g, 42: Ph ysica l la yer services and proce dures for ta riff a n d lo a d n ection -orie n te d a syn chron o us da ta exch a n ge IEC 62056-46:2002, Electricity m e terin g – Da ta e xcha n ge for me te r re a din g, ta riff a n d lo a d trol – Pa rt 46: Da ta lin k la yer usin g HDL C protocol Amendment IEC 62056-47, Electricity m ete rin g – Da ta exch a n ge for m e ter re a din g, ta riff a n d lo a d trol – Pa rt 47: COSEM tra n sp ort la yer for IP n etworks IEC 62056-61 , Ed.2, Ele ctricity m eterin g – Da ta exch a n ge for m eter re a din g, ta riff a n d loa d trol – Pa rt 61 : O b je ct ide n tifica tion system (OBIS) IEC 62056-62, Ed 2, Ele ctricity m e terin g – Da ta exch a n ge for m eter re a din g, ta riff a n d loa d trol – Pa rt 62: In te rfa ce cla sses ISO/IEC 8649:1 996, Information technology – Open Systems Interconnection – Service defin itio n for th e A ssocia tion Con trol Service Ele m en t ISO/IEC 8650-1 :1 996, Information technology – Open systems interconnection – Connection- oriented protocol for the A ssocia tion Control Service Elemen t: Protocol specifica tion ISO/IEC 8824, In form a tio n tech n ology – A bstra ct Syn ta x Nota tion O n e (A SN ) ISO/IEC 8825 , In form a tio n tech n ology – A SN e n codin g rule s ISO/IEC 3239:2002, In forma tion techn ology – Telecommun ica tions a n d in forma tion exch a n ge be twe en syste ms – High -leve l da ta lin k tro l (HDL C) proce dures STD0005 – In tern et Protoco l A uth or: J Poste l Da te : Se pte mb er 981 A lso: RFC0791 , RFC0792, RFC091 9, RFC0922, RFC0950, RFC1 1 STD0006 – User Da ta gra m Protoco l A uth or: J Poste l Da te : 28 A ugust 980 A lso: RFC0768 STD0007 – Tra n smissio n Con trol Protocol A uth or: J Poste l Da te : Se pte mb er 981 A lso : RFC0793 See also Bibliography for other related Internet RFCs 3 Terms, definitions and abbreviations Terms and d efi nitions For the purposes of this part of IEC 62056, the definitions in I EC 60050-300, I EC 62051 and IEC 62051 -1 apply cnf ind Abbreviations ——————— To be published .confirm service primitive indication service primitive EN 62056-53:2007 – 134 – b) in result-source-diagnostic the value is set to “authentication-required” to reflect the additional authentication step needed NOTE The three additional fields are coded immediately before the user-information-field e n codin g th e resp on de r-a cse-re quire m en ts fie ld com pon e n t (ta gged com pon en t, [8]) 88 02 // encoding the tag for the acse-requirements field component ([8], IMPLICIT, Context-specific) // encoding of the length of the tagged component’s value field e n codin g th e re sp on de r-a cse -re quire m e n ts com po n en t (A CSE-requirem e n ts::= BIT STRING) 07 // encoding the number of unused bits in the last byte of the BIT STRING 80 // encoding of the authentication functional unit (0) e n codin g th e m echa n ism-n a m e co mp o n e n t (ta gge d com pon e n t [9]) 89 07 // encoding the tag for the mechanism-name component ([9], IMPLICIT, Context-specific) // encoding of the length of the tagged component’s value field e n codin g of th e va lue of th e Ob ject Ide n tifier (de fa ult-COSEM-h igh-level-se curitymech a n ism-n a m e) 60 85 74 05 08 02 02 e n codin g th e resp on din g-a uth en tica tio n -va lue com p on e n t (ta gge d co mp o n e n t [1 0]) AA // encoding the tag for the responding-authentication-value component ([1 0], Contextspecific) 0A // encoding of the length of the tagged component’s value field e n codin g th e resp on din g-a uth en tica tion -va lue com p on e n t (A uth e n tica tio n -in form a tio n :: = CHOICE) 80 // encoding the choice for Authentication-information (charstring [0] IMPLICIT GraphicString) 08 // encoding of the length of the Authentication-information’s value field (8 octets) e n codin g of th e va lue of th e Pa ssword (Gra ph icStrin g) 50 36 77 52 4A 32 31 The result-source-diagnostic is coded as follows: e n codin g th e result-so urce -dia gn ostic (ta gge d com p on e n t [3]) A3 05 A1 03 // encoding // encoding // encoding // encoding the tag for the result-source-diagnostics component ([3], Context-specific ) of the length of the tagged component’s value field the tag for the acse-service-user CHOICE (1 ) of the length of the tagged component’s value field e n codin g th e re sult-source -dia gn ostics com po n en t (INTEG ER) 02 // encoding the choice for result-source-diagnostics (INTEGER, Universal) 01 // encoding of the length of the value field (1 octets) 0E // encoding of the value: 4, authentication-required Therefore, the complete encoding for an AARE APDU, with the given parameters is as follows (all values are in hexadecimals): LN referencing SN referencing AARE-pdu = [ 61 41 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 0E 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 0A 80 08 50 36 77 52 4A 32 31 BE 04 0E 08 00 06 5F F 04 00 00 50 F 01 F4 00 07 ] AARE-pdu = [ 61 41 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1 03 02 01 0E 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 0A 80 08 50 36 77 52 4A 32 31 BE 04 0E 08 00 06 5F F 04 00 C 03 20 01 F4 FA 00 ] C.1 Encoding the AARE APDU case of failure This example shows the construction of an AARE-pdu, when the server is not able to accept the proposed association because of the received application-context-name does not fit to the application context, which can be supported by the server EN 62056-53:2007 – 135 – In this case, the ‘result’ field of the AARE PDU shall contain the ‘rejected-permanent’ value, the ‘result-source-diagnostic’ field the ‘application-context-name-not-supported’ value, and – supposing that the server is able to support the proposed xDLMS context – the userinformation field shall contain a correctly constructed (encoded en A-XDR, as a BER OCTET STRI NG) xDLMS-Initiate.response PDU (I t is the same as that of the previous example) Thus, the A-XDR encoding of the xDLMS-Initiate.response PDU shall be as follows: LN referen cin g SN referencing 08 00 06 5F F 04 00 00 50 F 01 F4 00 07 08 00 06 5F F 04 00 C 03 20 01 F4 FA 00 Parameters for the AARE: protocol-version is the default ACSE version; application-context-name: COSEM_Application_Context_NameLogical_Name_Referencing (the proposed) • • {joint-iso-ccitt(2) cou ntry(1 6) country-name(756) id enti fi ed-organ ization(5) DLM SU A(8) applicati on-context(1 ) context_id(1 )}; no authentication is used: neither the mechanism-name, nor the calling-authenticationvalue are present; • no implementation-information is included; • result = rejected-permanent; • associate-source-diagnostics = application-context-name-not-supported The (BER) encoding of the AARE APDU, corresponding to these parameters is as follows: • B ER e n codin g th e A A RE A PDU 61 29 // encoding the tag for the AARE-pdu ([APPLICATION ], Application) // encoding of the length of the AARE’s content’s field (41 octets) // no encoding for the protocol version, thus it is considered with its DEFAULT value e n codin g th e a p plica tion -con te xt-n a me comp on e n t (ta gge d comp on e n t [1 ]) e n codin g th e a p p lica tion -con te xt-n a me comp on e n t (OBJECT IDENTIFIER) A1 09 // encoding the tag for the application-context-name component ([1 ], Context-specific ) // encoding of the length of the tagged component’s value field 06 // encoding the choice for application-context-name (OBJECT IDENTIFIER, Universal) 07 // encoding of the length of the Object Identifier’s value field (7 octets) LN referencing SN referencing 60 85 74 05 08 01 01 // encoding of the value of the Object I dentifier (2,1 6,756,5,8, , ) 60 85 74 05 08 01 02 // encoding of the value of the Object I dentifier (2,1 6, 756, 5, 8, ,2) e n codin g th e ta g & le n gth for th e re sult co mp on e n t A2 03 (ta gge d comp on e n t [2]) // encoding the tag for the result component ([2], Context-specific ) // encoding of the length of the tagged component’s value field e n codin g th e Re sult co m p on e n t (INTEGER) 02 // encoding the choice for result (INTEGER, Universal) 01 // encoding of the length of the result’s value field (1 octets) 01 // encoding of the value of the result (1 , rejected-permanent) e n codin g th e re sult-source -dia gn ostics comp on e n t (ta gge d comp on e n t [3]) A3 05 A1 03 // encoding // encoding // encoding // encoding the tag for the result-source-diagnostics component ([3], Context-specific ) of the length of the tagged component’s value field the tag for the acse-service-user CHOICE (1 ) of the length of the tagged component’s value field e n codin g th e re sult-source -dia gn ostics comp on e n t (INTEGER) 02 // encoding the choice for result-source-diagnostics (INTEGER, Universal) 01 // encoding of the length of the value field (1 octets) 02 // encoding of the value: 2, application-context-name-not-supported e n codin g th e use r-in fo rm a tion fie ld co mp on e n t (ta gge d comp on e n t, [30]) BE 10 // encoding the tag for the user-information field component ([30], Context-specific ) // encoding of the length of the tagged component’s value field e n codin g th e use r-in fo rm a tion comp on e n t 04 0E (OCTET STRING ) // encoding the choice for user-information (OCTET STRING, Universal) // encoding of the length of the OCTET STRING’s value field (1 octets ) EN 62056-53:2007 – 136 – // Here is the octet sequence of the xDLMS-Initiate.response PDU: LN referencing SN referencing 08 00 06 5F F 04 00 00 50 F 01 F4 00 07 08 00 06 5F F 04 00 C 03 20 01 F4 FA 00 Therefore, the complete encoding for an AARE APDU with the given parameters is as follows (all values are in hexadecimals): LN referencing SN referencing AARE-pdu = [ 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 02 BE 04 0E 08 00 06 5F F 04 00 00 50 F 01 F4 00 07 ] AARE-pdu = [ 61 29 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 02 BE 04 0E 08 00 06 5F F 04 00 C 03 20 01 F4 FA 00 ] C.1 Encoding the AARE APDU, case of failure This example shows the construction of an AARE APDU, when the server is not able to accept the proposed AA because the proposed xDLMS context cannot be supported by the server (for the reason that “the proposed DLMS version number is too low”) The proposed COSEM application context could be accepted In this case, the ‘result’ field of the AARE APDU shall contain the ‘rejected-permanent’ value, the ‘result-source-diagnostic’ field the ‘no-reason-given’ value, and the user-information field shall contain a correctly constructed (encoded en A-XDR, as a BER OCTET STRING) DLMSConfirmedServiceError PDU, indicating the reason for the failure The DLMS ConfirmedServiceError message is specified as follows: ConfirmedServiceError::= { ta g is re se rve d initiateError getStatus getNameList terminateUpLoad } CHOICE [1 ] [2] [3] [1 9] ServiceError, ServiceError, ServiceError, ServiceError where ServiceError is as follows: ServiceError ::= { initiate CHOICE [6] I MPLICI T ENUMERATED in itia te se rvice e rro r { } } other DLMS-version-too-low incompatible-conformance PDU-size-too-short refused-by-the-VDE-Handler (0), (1 ), (2), (3), (4) p ropose d DL MS ve rsion too low p rop ose d se rvice s n ot sufficie n t p rop ose d PDU size too sh ort va a cre a tion imp ossib le or n ot a llo we d Therefore, A-XDR encoding of the DLMS ConfirmedServiceError PDU with the above conditions is as follows: A -XDR e n codin g th e DL MS Con firme dSe rvice Error-p du 0E // encoding the tag (explicit tag) of the DLMS PDU CHOICE (ConfirmedServiceError) e n codin g th e ta g for se le ctin g In itia te Error (In itia te Error = ) 01 // tag (explicit) of ConfirmedServiceError CHOICE (InitiateError =1 ) e n codin g th e ta g for se le ctin g Se rvice Error (In itia te = 6) 06 // tag (explicit) of ServiceError CHOICE (Initiate 6) e n codin g th e e n ume te d re a son of fa ilure (p ropose d DL MS ve rsion too low = ) 01 // encoding the value of the ENUMERATED type EN 62056-53:2007 – 137 – Thus, the A-XDR encoding of the DLMS ConfirmedServiceError PDU, with the above parameters, results in the following octet sequence: DLMS ConfirmedServiceError PDU: 0E 01 06 01 (for both LN and SN referencing) This octet sequence shall be inserted into the user-information field of the AARE APDU as an OCTET STRING Supposing, that AARE parameters are as follows: protocol-version is the default ACSE version; application-context-name: COSEM_Application_Context_Name_Logical_Name_Referencing (the proposed) • • {joint-iso-ccitt(2) cou ntry(1 6) country-name(756) id enti fi ed-organ ization(5) DLM SU A(8) applicati on-context(1 ) context_id(1 )}; no authentication is used: neither the mechanism-name, nor the calling-authenticationvalue is present; • no implementation-information is included; • result = rejected-permanent; • associate-source-diagnostics = no-reason-given The (BER) encoding of the AARE-pdu, corresponding to these parameters is as follows: • B ER e n codin g th e A A RE A PDU 61 1F // encoding the tag for the AARE-pdu ([APPLICATION ], Application) // encoding of the length of the AARE’s content’s field (31 octets) // no encoding for the protocol version, thus it is considered with its DEFAULT value e n codin g th e a p plica tion -con te xt-n a me comp on e n t (ta gge d comp on e n t [1 ]) e n codin g th e a p p lica tion -con te xt-n a me comp on e n t (OBJECT IDENTIFIER) e n codin g th e ta g & le n gth for th e re sult co mp on e n t (ta gge d comp on e n t [2]) A1 09 // encoding the tag for the application-context-name component ([1 ], Context-specific) // encoding of the length of the tagged component’s value field 06 // encoding the choice for application-context-name (OBJECT IDENTIFIER, Universal) 07 // encoding of the length of the Object Identifier’s value field (7 octets) 60 85 74 05 08 01 01 // encoding of the value of the Object Identifier (2,1 6,756,5,8,1 ,1 ) A2 03 // encoding the tag for the result component ([2], Context-specific) // encoding of the length of the tagged component’s value field e n codin g th e Re sult co m p on e n t 02 01 01 (INTEGER) // encoding the choice for result (INTEGER, Universal) // encoding of the length of the result’s value field (1 octets) // encoding of the value of the result (1 , rejected-permanent) e n codin g th e re sult-source -dia gn ostics comp on e n t (ta gge d comp on e n t [3]) e n codin g th e re sult-source -dia gn ostics comp on e n t (INTEGER) A3 05 A1 03 // encoding // encoding // encoding // encoding the tag for the result-source-diagnostics component ([3], Context-specific ) of the length of the tagged component’s value field the tag for the acse-service-user CHOICE (1 ) of the length of the tagged component’s value field 02 // encoding the choice for result-source-diagnostics (INTEGER, Universal) 01 // encoding of the length of the value field (1 octets) 01 // encoding of the value: , no-reason-given e n codin g th e use r-in fo rm a tion fie ld co mp on e n t (ta gge d comp on e n t, [30]) BE 06 // encoding the tag for the user-information field component ([30], Context-specific) // encoding of the length of the tagged component’s value field e n codin g th e use r-in fo rm a tion comp on e n t (OCTET STRING ) 04 // encoding the choice for user-information (OCTET STRING, Universal) 04 // encoding of the length of the OCTET STRING’s value field 0E 01 06 01 // Here is the octet sequence of the DLMS-ConfirmedServiceError-pdu Therefore, the complete encoding for an AARE APDU using LN referencing, with the given parameters is as follows (all values are in hexadecimals): LN referencing AARE-pdu = [ 61 F A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 06 04 04 0E 01 06 01 ] SN referencing AARE-pdu = [ 61 F A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 06 04 04 0E 01 06 01 ] EN 62056-53:2007 – 138 – Annex D (informative) Data model and protocol The data model uses generic building blocks to define the complex functionality of the metering equipment I t provides a view of this functionality of the meter, as it is available at its interface(s) The model does not cover internal, implementation specific issues The communication protocol defines how the data can be accessed and exchanged This is illustrated in the figure below: Modeling Register Attribute(s) logical_name value scaler-unit COSEM Interface Objects (static) (dyn.) (static) Method(s) reset n Data Type octet-string scal_unit_typeU s m/o S Mo L D insta nce specific c ia ti o n o Class_id=3, s Version=0 s Min Def A Max e r Protocol Services to access attributes and methods Messaging Communication Protocol Messages : Service_Id( Class_Id, Instance_Id, Attribute_Id/Method_Id ) Encoding: ( APDU ) C0 01 00 03 01 01 01 08 00 FF 02 Transporting IS O , IE C , IEC /06 Figure D.1 – The three-step approach of COSEM • • • the COSEM specification specifies metering domain specific interface classes The functionality of the meter is defined by the instances of these interface classes, called COSEM interface objects This is defined in IEC 62056-62 Logical names, identifying the COSEM interface objects are defined in IEC 62056-61 ; the attributes and methods of these COSEM interface objects can be accessed and used via the messaging services of the application layer; the lower layers of the protocol transport the information EN 62056-53:2007 – 139 – Bibli ograph y IEC 62056-41 :1 998, trol – Pa rt 41 : Electricity m eterin g – Da ta e xch a n ge for me te r re a ding, Da ta exch a n ge usin g wide are a n etworks: Pub lic tariff an d loa d switch e d te lep h on e ne twork (PSTN) with L INK+ protocol IEC 62056-51 :1 998, Electricity m eterin g – Da ta e xch a n ge for me te r re a ding, tariff an d loa d trol – Pa rt 51 : A pp lica tion la yer protocols IEC 62056-52:1 998, trol – Pa rt Electricity m eterin g – Da ta e xch a n ge for me te r re a ding, 52: Com m un ica tion protocols m a n a gem e n t distrib ution tariff an d loa d lin e m essa ge specifica tion (DL MS) server ISO/IEC 7498-1 :1 994, In forma tion techn ology – Op e n Systems In tercon n ection – Ba sic Re fere n ce Mode l: The Ba sic Mode l NOTE Harmonized as EN ISO/IEC 7498-1 :1 995 (not modified) ISO/IEC 9545:1 994, In form a tion tech n ology – Ope n Syste ms Interconn e ction – A p plica tion L a yer structure ISO/IEC 0731 :1 994, In forma tion tech n ology – Ope n Systems Intercon n ection – Basic Re fere n ce Mode l – Con ven tions for th e defin ition of OSI services NEMA C1 2.21 :1 999, Protocol Sp ecifica tion for Te lep h on e Mode m Comm un ica tion RFC 0768 – User Da ta gra m Protocol A uth or: J Poste l Da te : A ug-28-1 980 A lso: STD0006 RFC 0791 – In te rn et Protocol A uth or: J Poste l Da te : Se p-01 -1 981 A lso: STD0005 Up da ted by: RFC1 349 Obsole tes: RFC0760 RFC 0792 – In te rn et Con trol Message Protocol A uth or: J Poste l Da te : Se p-01 -1 981 A lso: STD0005 Up da ted by: RFC0950 Obsole tes: RFC0777 RFC 0793 – Tra nsmission Con trol Protocol A uth or: J Poste l Da te : Se p-01 -1 981 A lso: STD0007 Up da ted by: RFC31 68 RFC 0826 – Eth erne t A ddress Resolution Protocol: Or verting n e twork protocol a ddresses to 48 b it Eth erne t a ddress for tra n sm ission on Eth ern e t h a rdwa re A uth or: D C Plum m er Da te : Nov-01 -1 982 A lso: STD0037 EN 62056-53:2007 RFC 0894 – 140 – – Sta n da rd for the tra n smission of IP da ta gra ms over Eth ern et n etworks A uth or: C Horn ig Da te : A pr-01 -1 984 A lso: STD0041 RFC 091 – Broadca stin g In tern et Da ta gra ms A uth or: J C Mogul Da te : Oct-01 -1 984 A lso: STD0005 RFC 0922 – Broadca stin g In tern et da ta gra ms in th e prese nce of sub ne ts A uth or: J C Mogul Da te : Oct-01 -1 984 A lso: STD0005 RFC 0950 – In te rn et Sta nda rd Subn ettin g Proce dure A uth ors: J C Mogul, J Poste l Da te : A ug-01 -1 985 A lso: STD0005 Up dates: RFC0792 RFC 042 – Sta n dard for th e tra n smission of IP da ta gra ms over IEEE 802 n e tworks A uth ors: J Poste l, J K Reyn olds Da te : Fe b-01 -1 988 A lso: STD0043 Obsole tes: RFC0948 RFC 1 – Host exte n sion s for IP m ultica stin g A uth or: S E De erin g Da te : A ug-01 -1 989 A lso: STD0005 Up dated by: RFC2236 Obsole tes: RFC0988, RFC1 054 RFC 321 – Th e MD5 Messa ge-Digest A lgorith m A utho r: R Rivest Da te : A pril 992 RFC 332 – Th e PPP In tern e t Protocol Control Protocol (IPCP) A uth or: G McGre gor Da te : Ma y 992 Up dated by: RFC3241 Obsole tes: RFC1 72 RFC 661 – Th e Poin t-to-Poin t Protocol (PPP) A uth ors: W Sim pson , Ed Da te : July 994 A lso: STD0051 Up dated by: RFC21 53 Obsole tes: RFC1 548 RFC 662 – PPP in HDL C-like Fra m ing A uth ors: W Sim pson , Ed Da te : July 994 A lso: STD0051 Obsole tes: RFC1 549 – 141 – RFC 755 EN 62056-53:2007 – A TM Sign a ling Sup p ort for IP over A TM A uthors: M Pere z, F L ia w, A Ma n kin , E Hoffm a n , D Grossm a n, A Ma lis Da te : Fe brua ry 995 RFC 962 – Th e PPP Comp ression Control Protocol (CCP) A utho r: D Ra n d Da te : Jun e 996 Up da ted by: RFC21 53 RFC 21 31 – Dyn a m ic Host Con figura tion Protocol A utho r: R Droms Da te : Ma rch 997 Up da ted by: RFC3396 Obsole tes: RFC1 541 RFC 21 53 – PPP Ve ndor Exten sion s A uthor: W Sim pson Da te : Ma y 997 Up da tes: RFC1 661 , RFC1 962 RFC 2225 – Cla ssica l IP an d A RP over A TM A uthors: M L a uba ch , J Ha lpern Da te : A pril 998 Obsole tes: RFC1 626, RFC1 577 FIPS PUB 80-1 SECURE HA SH STA NDA RD Da te : 993 Ma y 1 Sup ersedes FIPS PUB 80 EN 62056-53:2007 – 142 – INDEX 3-layer, connection-oriented, HDLC based communication profile 9, 1 3-layer, connection-oriented, HDLC based profile 26, 46 A_RELEASE services 6, 26 AARE 72 AARQ 23, 72 Abbreviations 1 Abstract syntax ACSE 4, ACSE APDUs 98, 34 ACSE procedures ACTION.confirm 38 ACTION.indication 55 ACTION.request 36 ACTION.response 57 Additional data types 1 APDU-s for data communication 07 APDU-s using Logical Name referencing 07 APDU-s using Short Name referencing 1 Application Association 9, 44 Application association establishment 5, 21 , 43, 73 Application association establishment and release 6, Application association release 26, 45 Application context 79 Application layer services 21 Application layer structure Application process 3, 9, 23, 28, 35 Application Programming Interface Application_Addresses parameter 41 , 59 A-RELEASE 75 A-RELEASE.request 27 Attribute Reference list 87 Attribute_0 reference 86 Attributes 20 Authentication Authentication Mechanism Names 80 A-XDR encoding BER encoding Class_I d 31 Client 2, Client /Server type data communication services 29 Client COSEM Application Layer Services 21 Client side layer management services 41 Client side services for Event notification 39 Client SN_MAPPER 21 Client/server paradigm Client/Server type data communication services 48 client-max-receive-pdu-size 74 Collision 25 Communication environment 1 5, 1 6, 25 Communication profile 9, Communication profile specific parameters 1 6, 30 Confirmed application association Confirmed services 81 Conformance block 06, 1 Connection oriented, CO Connectionless Connectionless service 20 Connection-oriented Control function 5, 66, 67 COSEM application context 79 COSEM Application Layer – Service specification COSEM Application Layer protocol specification 66 COSEM application layer services 60 COSEM ASO COSEM Authentication Mechanism Names 80 COSEM transport layer 26 COSEM-ABORT service 63 COSEM-ABORT.indication 28, 48 COSEM-OPEN service 62 COSEM-OPEN.confirm 24 COSEM-OPEN.indication 43 COSEM-OPEN.request 22 COSEM-OPEN.response 44 COSEM-RELEASE service 63 COSEM-RELEASE.confirm 28 COSEM-RELEASE.indication 46 COSEM-RELEASE.request 27 COSEM-RELEASE.response 47 Data communication 20 Data communication services Data link layer 1 Data link layers services 1 8, 1 Data Model and Protocol 47 Definitions 1 DLMS compliance 1 DLMS version number 1 Encoding example for the AARE APDU, case of failure 44 Encoding example for the AARE APDU, case of success 38 Encoding example for the AARE-pdu, case of failure 42 Encoding example of the xDLMSInitiate.request PDU 34 Encoding examples 34 Encoding of the AARE using high level security 41 Establishment of a confirmed application association 69 Establishment of Non-Confirmed Application Association 71 Establishment of special application association 71 Event notification 39 EventNotification service 21 , 64, 84, 32 – 143 – EventNotification service and protocol 22 EventNotification.indication 40 EventNotification.indication service 95 EventNotification.request 58 EXCEPTION-Response 21 EXCEPTION-Response APDU 30, 49, 32 Extensions to DLMS for COSEM 1 GET.confirm 31 GET.indication 50 GET.request 30 GET.response 51 Graceful release of an application association 75 Identification and addressing scheme 1 5, 1 7, 27 Identification of the originator of the event report 25 Identification service 23 Identifying a service invocation 96 InformationReport service 95 InformationReportRequest 60 Interface Object 7, 29 Invoke_Id 85 Invoke_id_And_Priority 21 Invoke-Id-And-Priority 00 IPv4 network layer 26 Layer management services 8, 41 Logical Names 6, 20, 42, 49, 07, 1 3, 47 Long data transfer with ACTION 91 Long data transfer with GET 87 Long data transfer with SET 89 Long service parameters 87 Lower protocol layers 26 Management logical device 20 Mandatory application association 20 Mapping Client Services for Servers using Short Names 42 Mapping of a InformationReport service to an EventNotification.indication service 95 Master/ Slave operation on the multi-drop bus 24 Methods 20 Multi-drop configuration 24, 33 Multiple references 86, 96 Non-confirmed application association 20 Non-graceful release of an Application Association 78 Non-transparent and transparent transfer mechanisms 87 Object model One-way communication 20 Overview Parameters for application association establishment 73 Parsing order 74 Physical connection Physical layer 1 Pre-established application association 5, 20, 25, 71 EN 62056-53:2007 Presentation layer Priority 85, 96 Profile specific service parameters 20 Profile structure 1 5, 1 6, 25 proposed-conformance 74 proposed-dlms-version-number 74 Protocol for Application Association establishment/release 69 Protocol for confirmed services 81 , 93 Protocol for data communications 81 Protocol for the EventNotification service 84 Protocol for the I nformationReport Service 95 Protocol for the xDLMS services using LN referencing 81 Protocol for the xDLMS services using SN referencing 93 Protocol for unconfirmed services 83, 94 Protocol layers 1 6, 25 Protocol specification Protocol stack Protocol_Connection_Parameters 22, 23, 25, 43, 20 Public client 20 ReadRequest 59 ReadResponse 60 real-world IP networks 33 Referencing method Registered COSEM names 78 Releasing an application association 75 Repeated COSEM-OPEN.request service invocations 75 response-allowed 23, 74 RLRE 28, 46 RLRQ 27, 28, 46 Scope Selective access 85, 96 Server 2, Server COSEM Application Layer services 43 Service invocation 85, 96 Service mapping 1 Service specification 6, Service_Class 00 Service_Class == Confirmed 23, 21 Service_Class == Unconfirmed 23, 25, 21 Services provided with Logical Name references 49 Services provided with Short Name references 59 Services with LN referencing 63 SET.confirm 35 SET.indication 52 SET.request 32 SET.response 54 SetMapperTables.request 41 Short Names 6, 42, 59, 95, 1 SN references 21 SN_MAPPER_ASE EN 62056-53:2007 – 144 – Special application associations Specific considerations/constraints 1 6, 20, 31 Specification method State definitions for the Client side Control Function 66 State definitions for the Server side Control Function 67 Supporting layer services 1 Supporting layer services and service mapping 1 6, 29 TCP connection establishment by the server 33 TCP connection manager process 29, 30 TCP-UDP/I P based communication profiles9 The TCP-UDP/I P based communication profiles (COSEM_on_I P) 25 Transferring long service parameters 87, 96 Transparent transfer mechanisms 87 Transporting long messages 24, 32 Trigger_EventNotification_Sending 21 Trigger_EventNotification_Sending service 32 Trigger_EventNotification_Sending.request 41 , 22 Unconfirmed services 83, 94 UnconfirmedWriteRequest 60, 94 Use_RLRQ_RE 26, 47 Use_RLRQ_RE == FALSE 27, 46, 47 Use_RLRQ_RE == TRUE 27, 46, 47 Useful types 00 wPort number 32 WriteRequest 60 WriteResponse 60 xDLMS Application Service Element 1 xDLMS procedures xDLMS Services using LN referencing 81 xDLMS services using SN referencing 93 xDLMS_ASE 3, xDLMS-I n itiate requ est 23 xDLMS-I nitiate.request PDU 44 xDLMS-I nitiate.response 25 XX-DI SCONNECT.confirm 28 XX-DI SCONNECT.indication 46 XX-DI SCONNECT.request 27 _ EN 62056-53:2007 – 145 – Annex ZA (normative) Normative references to international publications with their corresponding European publications The following referenced documents are indispensable for the application of this document For dated references, only the edition cited applies For undated references, the latest edition of the referenced document (including any amendments) applies NOTE When an international publication has been modified by common modifications, indicated by (mod), the relevant EN/HD applies Publication Year Title IEC 60050-300 2001 International Electrotechnical Vocabulary Electrical and electronic measurements and measuring instruments Part 31 : General terms relating to measurements - Part 31 2: General terms relating to electrical measurements Part 31 3: Types of electrical measuring instruments Part 31 4: Specific terms according to the type of instrument - IEC 61 334-4-41 996 Distribution automation using distribution line EN 61 334-4-41 carrier systems Part 4: Data communication protocols Section 41 : Application protocols Distribution line message specification 996 IEC 61 334-6 2000 Distribution automation using distribution line EN 61 334-6 carrier systems Part 6: A-XDR encoding rule 2000 IEC/TR 62051 999 Electricity metering - Glossary of terms - - IEC/TR 62051 -1 2004 Electricity metering - Data exchange for meter reading, tariff and load control Glossary of terms Part : Terms related to data exchange with metering equipment using DLMS/COSEM - - IEC 62056-21 2002 Electricity metering - Data exchange for meter reading, tariff and load control Part 21 : Direct local data exchange EN 62056-21 2002 IEC 62056-42 2002 Electricity metering - Data exchange for meter reading, tariff and load control Part 42: Physical layer services and procedures for connection-oriented asynchronous data exchange EN 62056-42 2002 IEC 62056-46 A1 2002 2006 Electricity metering - Data exchange EN 62056-46 for meter reading, tariff and load control A1 Part 46: Data link layer using HDLC protocol 2002 2007 EN/HD Year EN 62056-53:2007 – 146 – Publication IEC 62056-47 Year 2006 Title Electricity metering - Data exchange for meter reading, tariff and load control Part 47: COSEM transport layers for IPv4 networks EN/HD EN 62056-47 Year 2007 IEC 62056-61 2006 Electricity metering - Data exchange for meter reading, tariff and load control Part 61 : Object identification system (OBIS) EN 62056-61 2007 IEC 62056-62 2006 Electricity metering - Data exchange for meter reading, tariff and load control Part 62: Interface classes EN 62056-62 2007 ISO/IEC 8649 996 Information technology - Open systems interconnection - Service definition for the Association Control Service Element - - ISO/IEC 8650-1 996 Information technology - Open systems interconnection - Connection-oriented protocol for the association control service Information technology - ASN.1 encoding rules: Protocol specification - - ISO/IEC 8824 Series Information technology - Abstract Syntax Notation One (ASN.1 ) - - ISO/IEC 8825 Series Information technology - ASN.1 encoding rules - - ISO/IEC 3239 2002 Information technology - Telecommunications and information exchange between systems High-level data link control (HDLC) procedures - STD 0005 981 Internet Protocol - - STD 0006 980 User Datagram Protocol - - STD 0007 981 Transmission Control Protocol - - blank BS EN 62056-53:2007 BSI — British Standards Institution BSI is the independent national body responsible for preparing British Standards It presents the UK view on standards in Europe and at the international level It is incorporated by Royal Charter Revisions British Standards are updated by amendment or revision Users of British Standards should make sure that they possess the latest amendments or editions It is the constant aim of BSI to improve the quality of our products and services We would be grateful if anyone finding an inaccuracy or ambiguity while using this British Standard would inform the Secretary of the technical committee responsible, the identity of which can be found on the inside front cover Tel: +44 (0)20 8996 9000 Fax: +44 (0)20 8996 7400 BSI offers members an individual updating service called PLUS which ensures that subscribers automatically receive the latest editions of standards Buying standards Orders for all BSI, international and foreign standards publications should be addressed to Customer Services Tel: +44 (0)20 8996 9001 Fax: +44 (0)20 8996 7001 Email: orders@bsi-global.com Standards are also available from the BSI website at http://www.bsi-global.com In response to orders for international standards, it is BSI policy to supply the BSI implementation of those that have been published as British Standards, unless otherwise requested Information on standards BSI provides a wide range of information on national, European and international standards through its Library and its Technical Help to Exporters Service Various BSI electronic information services are also available which give details on all its products and services Contact the Information Centre Tel: +44 (0)20 8996 7111 Fax: +44 (0)20 8996 7048 Email: info@bsi-global.com Subscribing members of BSI are kept up to date with standards developments and receive substantial discounts on the purchase price of standards For details of these and other benefits contact Membership Administration Tel: +44 (0)20 8996 7002 Fax: +44 (0)20 8996 7001 Email: membership@bsi-global.com Information regarding online access to British Standards via British Standards Online can be found at http://www.bsi-global.com/bsonline Further information about BSI is available on the BSI website at http://www.bsi-global.com Copyright BSI 389 Chiswick High Road London W4 4AL Copyright subsists in all BSI publications BSI also holds the copyright, in the UK, of the publications of the international standardization bodies Except as permitted under the Copyright, Designs and Patents Act 1988 no extract may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, photocopying, recording or otherwise – without prior written permission from BSI This does not preclude the free use, in the course of implementing the standard, of necessary details such as symbols, and size, type or grade designations If these details are to be used for any other purpose than implementation then the prior written permission of BSI must be obtained Details and advice can be obtained from the Copyright & Licensing Manager Tel: +44 (0)20 8996 7070 Fax: +44 (0)20 8996 7553 Email: copyright@bsi-global.com