BS/EN 62056-4-7-2016 pdf download.Electricity metering data exchange The DLMS/COSEM suite
Part 4-7: DLMS/COSEM transport layer for IP networks.
The Local_wPort, Remote_wPort, Local_TCP_Port, Remote_TCP_Port, Local_IP_Address and RemotejPAddress parameters carry the same values as the corresponding TCPDATA.request service being confirmed.
The Confirmation_Type parameter indicates whether the confirmation service is a LOCAL or a REMOTE confirmation.
The value of the Result parameter indicates the result of the previous TCP-DATA.request service. Its value is either OK or NOK, but the meaning of this depends on the implementation of the .confirm primitive. See 6.3.5.4.
Use
The TCP-DATA.confirm primitive is optional. If implemented, it is generated by the DLMS/COSEM TL to confirm to the service user DLMS/COSEM AL the result of the execution of the previous request primitive.
6.3 Protocol specification for the DLMS/COSEM TCP-based transport layer
6.3.1 General
As it is shown in Figure 2, the DLMS/COSEM CO. TCP-based TL includes the Internet standard TCP layer as specified in STO 0007. and the DLMS/COSEM-specific wrapper sublayer,
In the TCP-based TL the wrapper sublayer is more complex than in the UDP-based TL. On the one hand — similarly to the UDP-based TL — its main role is also to ensure source and destination DLMS/COSEM AE identification using the wPort numbers, and to convert OSIstyle TCP-DATA service primitives to and from the SENDO and RECEIVEO interface functions provided by the standard TCP. On the other hand, the wrapper sublayer in the TCP-based TL has also the task to help the service user DLMS/COSEM ALs to exchange complete APOUs.
TCP is a “streaming protocol meaning that it does not preserve data boundaries. Without entering into the details here (see more in Clause A.4) this means, that the SEND() and RECEIVEO function calls of the TCP sublayer return with success even if the number of the bytes sent I received actually is less than the number of bytes requested to be sent I received. It is the responsibility of the wrapper sublayer to know how much data had to be sent I received, to keep track how much has been actually sent I received. and repeat the operation until the complete APDU is transmitted.
Consequently, the wrapper sublayer in the TCP-based DLMSICOSEM TL is not a state-less entity: it is doing the above described track-keeping — re-trying procedure in order to make the streaming” nature of the TCP transparent to the service user DLMSJCOSEM AL.
From the external point of view the DLMS/COSEM TCP-based TL PDU is an ordinary TCP packet: any DLMSICOSEM specific element, including the wrapper-specific header in the first TCP packet, is inside the packet’s Data field.
The source and destination TCP ports may refer to either local or remote TCP ports, depending on the direction of the data transfer (i.e. from the point of view of the Sender device the source TCP port in a TCP Packet corresponds to the Local_TCP_port, but from the point of view of the Receiver device, the source TCP port of a Datagram corresponds to the Remote_TCP_Port service parameter).
6.3.4 Reserved wrapper port numbers
Reserved wPort Numbers are specified in Table 1.
6.3.5 Definition of the procedures
6.3.5.1 TCP connection
Establishment of a TCP connection is initiated by the TCP-CONNECT.request service invocation. Although this service — as all DLMS/COSEM TL services — is provided to the service user entity by the wrapper sublayer, the TCP connection is established between the two (local and remote) TCP sublayers. The role of the wrapper in this procedure is just to convert the TCP-CONNECT service primitives (.request, .indication, response and .confirm) to and from TCP function calls.
From the service user point of view, only the TCP-CONNECT service primitives are visible:
according to this, the TCP connection establishment takes place as it is shown in Figure 8.
The TCP connection is established using a three-way handshake mechanism, as described in STD 0007. This requires three message exchanges as shown above and guarantees that both sides know that the other side is ready to transmit and also that the two sides are synchronized: the initial sequence numbers are agreed upon.BS/EN 62056-4-7-2016 pdf download.
BS/EN 62056-4-7-2016 pdf download
PS:Thank you for your support!