CN101291326A - Dynamic link library for communication protocol stack - Google Patents

Dynamic link library for communication protocol stack Download PDF

Info

Publication number
CN101291326A
CN101291326A CNA2008100283664A CN200810028366A CN101291326A CN 101291326 A CN101291326 A CN 101291326A CN A2008100283664 A CNA2008100283664 A CN A2008100283664A CN 200810028366 A CN200810028366 A CN 200810028366A CN 101291326 A CN101291326 A CN 101291326A
Authority
CN
China
Prior art keywords
module
layer
communication protocol
hdlc
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008100283664A
Other languages
Chinese (zh)
Inventor
孙丽霞
崔宇昊
陆文远
杨晓科
李虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHANGSHA WEISHENG ELECTRONICS Co Ltd
ZHUHAI ZHONGHUI MICROELECTRONICS CO Ltd
Original Assignee
CHANGSHA WEISHENG ELECTRONICS Co Ltd
ZHUHAI ZHONGHUI MICROELECTRONICS CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CHANGSHA WEISHENG ELECTRONICS Co Ltd, ZHUHAI ZHONGHUI MICROELECTRONICS CO Ltd filed Critical CHANGSHA WEISHENG ELECTRONICS Co Ltd
Priority to CNA2008100283664A priority Critical patent/CN101291326A/en
Publication of CN101291326A publication Critical patent/CN101291326A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

The invention relates to a DLMS communication protocol stack dynamic link library based on IEC62056 standard. The communication protocol stack dynamic link library is used to construct a client system meeting IEC62056 standard and complete DLMS communication protocol treatment; the communication protocol stack dynamic link library comprises a physical module used to realize the sending and receiving of serial data, a data link layer module used to provide reliable data transmission between peer layers of communication and provide a addressing mechanism by which address of logical devices are mapped into HDLC high addresses and address of physical devices are mapped into HDLC low addresses, and a COSEM application layer module used to construct and analyze PDU of the application layer. The communication protocol stack dynamic link library of the invention packages the protocol stack part of the IEC62056 standard, so that a user only needs to learn about the application process of the client end and the service primitive definition of the COSEM application layer, and then the user can utilize the communication protocol stack dynamic link library to realize the application development related to the IEC62056 standard.

Description

Dynamic link library for communication protocol stack
Technical field
The present invention relates to a kind of DLMS dynamic link library for communication protocol stack, be used to make up the FTP client FTP that meets IEC 62056 standards, finish DLMS communication protocol and handle based on the IEC62056 standard.
Background technology
Electronic electric energy meter since its precision height, function many, have advantage such as data communication ability, in metering and charging system of electric energy amount, obtained use more and more widely.In use measuring equipment need be carried out exchanges data by communication channel and copy reading equipment.
The IEC62056 standards system is the complete electric energy metrical of a cover--be used to check meter, the exchanges data international standard standard of rate and load control, its core is equipment language message specification (DLMS) and the supporting standard of energy measurement (COSEM).The formulation of IEC62056 standard is towards versatility, all-purpose language and instrumented data that it has defined the employing of instrument signal post exchange employed rule, make from different vendor, dissimilar, DLMS/COSEM instrument/system of using the different communication medium " communication " mutually, have good system interconnection and interoperability, to be approved widely, at present just towards domestic extensive popularization.
The communication construction of IEC 62056 has adopted the OSI hierarchical mode, and the superiors are application layer, and the bottom is a physical layer, according to the difference of communication channel, may need different intermediate layers between application layer and physical layer.Information exchange between measuring equipment and the copy reading equipment is based on the C/S model, and measuring equipment is as server, and copy reading equipment is as client.As shown in Figure 1: when adopting different channels, lower floor's supporting layer may be different, but the superiors, promptly the COSEM application layer is constant.This layer has comprised application layer in the osi model in essence, presentation layer, and the function of session layer also is the layer of the unique COSEM of comprising associated component in the protocol stack.
At present IEC 62056 standards have proposed 2 cover communication protocol stacks, promptly 3 layers, towards connect, based on the communication protocol stack of HDLC with based on the communication protocol stack of TCP-UDP/IP.
Summary of the invention
The purpose of this invention is to provide 3 layers, towards connect, based on the dynamic link library of the communication protocol stack of HDLC, be used to make up the FTP client FTP that meets IEC 62056 standards, finish DLMS communication protocol and handle.
Above-mentioned for realizing, the invention provides following technical scheme:
Dynamic link library for communication protocol stack, it is used to make up the FTP client FTP that meets IEC 62056 standards, and finish DLMS communication protocol and handle,
Comprise
Physical layer block, its function are to realize the transmitting-receiving of serial data;
Data link layer module, its major function are to provide reliable transfer of data between the communication peer layer, and the data link layer module also provides addressing mechanism simultaneously, and the logical device address (LDA) is mapped as the HDLC high address, and physical device address is mapped as the HDLC low address;
Application layer PDU is constructed and resolved to COSEM application layer module, its function exactly.
Protocol stack dynamic link library of the present invention has encapsulated the protocol stack part of IEC 62056, the user only need understand the service primitive definition of client application process and COSEM application layer, can use this dynamic link library for communication protocol stack to carry out the exploitation of IEC62056 standard related application.Doing like this to provide software module rather than special chip to the third party, also helps the goods producer and further reduces product cost.
Description of drawings
Fig. 1 is the DLMS traffic model figure of IEC 62056 standards;
Fig. 2 is data mode and the flow graph between interior protocal layers of communication protocol stack and the client application process;
Fig. 3 is the structured flowchart of dynamic link library for communication protocol stack of the present invention.
The invention will be further described below in conjunction with drawings and Examples.
Embodiment
Dynamic link library of the present invention realized described 3 layers of background technology part, towards connect, based on the function of the communication protocol stack of HDLC, by the tunneling flow process, and externally provide interface, make the user can need not to grasp DLMS communication protocol and can carry out the exploitation of IEC 62056 FTP client FTPs, shortened the construction cycle greatly, strengthen the reliability and stability of system simultaneously, and had reusability.
Concrete, described 3 layers are respectively the COSEM application layer, based on the data link layer of HDLC and the physical layer of support RS 232 serial ports.The data mode between above-mentioned 3 layers (i.e. 3 protocol layers) and the client application process and the flow direction are as shown in Figure 2.
According to hierarchical mode, referring to Fig. 3, this communication protocol dynamic link library can be divided into 3 big modules: the COSEM application layer module, and based on data link layer module and the physical layer block of HDLC.Three big modules are made of a plurality of sub-function module respectively again, and division is as follows:
1. physical layer block
This module functions is to realize the transmitting-receiving of serial data.It comprises 2 submodules: serial equipment driver module and physical layer protocol flow processing module.The serial equipment driver module adopts the control of api function realization to serial ports, for example opens the appointment serial ports, receives serial data, sends data to serial ports, closes serial ports, and serial ports parameter etc. is set.The physical layer procedures processing module provides the service primitive interface to the HDLC data link layer, handles various physical layer services, and safeguards the physical layer state machine in the physical layer procedures processing module.
2. based on the data link layer module of HDLC
Data link layer comprises medium access control (Medium Access Control, MAC) layer and logic link control (Logical Link Control, LLC) layer, main operation all concentrates on the MAC layer, the LLC layer is a stateless lightweight layer, and its function only is that the LSDU in the data service primitive (service data unit in the LLC layer) is increased (handling during transmission) and removes (handling during reception) LLC head.
The major function of MAC layer is to carry out encapsulation of HDLC frame and parsing, and it is made up of 3 submodules: structure frame module, HDLC protocol process module, MAC laminar flow journey processing module.
(1) structure frame module
The data word throttling search frame postamble that physical layer is received, and check frame length and verification obtain effective HDLC frame, give the HDLC protocol module and resolve.
(2) HDLC protocol process module
Its function is divided into 5 parts: the HDLC frame corresponding according to service primitive structure, and resolve the HDLC frame and also call corresponding service primitive interface, divide the frame flow process, incident frame handling process and HDLC state-maintenance, as safeguard the transmission of current connection and receive sequence number etc.Wherein divide frame flow process and incident frame handling process, its mechanism corresponds respectively to long MAC service data unit (the MAC Service Data Unit in the IEC 62056-46 agreement, MSDU) transmission mechanism and unnumbered information (Unnumbered Information, UI) frame transmission mechanism.
(3) MAC laminar flow journey processing module
To adjacent bed, promptly LLC layer and physical layer provide the service primitive interface, handle the service of various MAC layer, and safeguard the MAC layer state machine in the MAC laminar flow journey processing module.
3.COSEM application layer module
Service primitive between application layer and the user's application process adopts abstractdesription language ASN.1 to describe, and structure is very complicated.This dynamic link library adopts expandable mark language XML to describe, and has both improved the readability of interface parameters, has also reduced the complexity of program simultaneously.Application layer protocol data cell (Protocol Data Unit is constructed and resolved to this module functions exactly, PDU), it is made up of 5 submodules: coding/decoding module, application controls serviced component (ApplicationControl Service Element, ACSE) module, DLMS application service assembly (the extended DLMS Application Service Element of expansion, xDLMS_ASE) module, short name mapping (Short Name Mapper, SN_Mapper) module and application layer flow process processing module.
(1) coding/decoding module
The COSEM data structure adopts BER and A-XDR coding rule, and the function in this submodule promptly is the Code And Decode that Various types of data is met these two kinds of rules.
(2) ACSE module
Carry out the PDU structure/parsing with the service primitive of application layer join dependency, and safeguard connection status.
(3) xDLMS_ASE module
Carry out the PDU structure/parsing of the service primitive relevant with data communication, and comprised the processing of piecemeal flow process, this flow process is corresponding to the application layer long data transmission mechanism in the IEC 62056-53 agreement.
(4) SN_Mapper module
Carry out the mapping between logical name data communication services collection and the short name data communication services collection.
(5) application layer flow process processing module module
To adjacent bed, promptly user's application process and LLC layer provide the service primitive interface.

Claims (5)

1, dynamic link library for communication protocol stack, it is used to make up the FTP client FTP that meets IEC 62056 standards, and finish DLMS communication protocol and handle,
It is characterized in that: comprise
Physical layer block, its function are to realize the transmitting-receiving of serial data;
Data link layer module, its major function are to provide reliable transfer of data between the communication peer layer, and the data link layer module also provides addressing mechanism simultaneously, and the logical device address (LDA) is mapped as the HDLC high address, and physical device address is mapped as the HDLC low address;
Application layer PDU is constructed and resolved to COSEM application layer module, its function exactly.
2, dynamic link library for communication protocol stack according to claim 1,
It is characterized in that:
Described physical layer block comprises two submodules: serial equipment driver module and physical layer protocol flow processing module; Described serial equipment driver module adopts the control of api function realization to serial ports; Described physical layer protocol flow processing module provides the service primitive interface to the data link layer module, handles various physical layer services, and safeguards the physical layer state machine in the physical layer protocol flow processing module.
3, dynamic link library for communication protocol stack according to claim 1,
It is characterized in that:
Described data link layer module comprises MAC layer and LLC layer, and the function of LLC layer is that the LSDU in the data service primitive is increased and removal LLC head; The function of MAC layer is to carry out encapsulation of HDLC frame and parsing.
4, dynamic link library for communication protocol stack according to claim 3,
It is characterized in that:
Described MAC layer comprises structure frame module, HDLC protocol process module and MAC laminar flow journey processing module;
The data word throttling search frame postamble that described structure frame module receives physical layer, and check frame length and verification obtain effective HDLC frame, give the HDLC protocol process module and resolve;
Described HDLC protocol process module comprises following function: according to the corresponding HDLC frame of service primitive structure; Resolve the HDLC frame and call corresponding service primitive interface; Divide the frame flow process; Incident frame handling process and to the HDLC state-maintenance; Wherein, the mechanism of branch frame flow process and incident frame handling process corresponds respectively to long MSDU transmission mechanism and the UI frame transmission mechanism in the IEC 62056-46 agreement;
Described MAC laminar flow journey processing module provides the service primitive interface to LLC layer and physical layer, handles the service of various MAC layer, and safeguards the MAC layer state machine in the MAC laminar flow journey processing module.
5, according to any described dynamic link library for communication protocol stack among the claim 1-4,
It is characterized in that:
Described COSEM application layer module comprises: coding/decoding module, ACSE module, xDLMS_ASE module, SN_Mapper module and application layer flow process processing module;
The function of described coding/decoding module is the Code And Decode that Various types of data is met BER and A-XDR coding rule;
Described ACSE module is carried out the PDU structure/parsing with the service primitive of COSEM application layer join dependency, and safeguards connection status;
Described xDLMS_ASE module is carried out the PDU structure/parsing of the service primitive relevant with data communication, and has comprised the processing of piecemeal flow process, and this flow process is corresponding to the application layer long data transmission mechanism in the IEC 62056-53 agreement;
Described SN_Mapper module is carried out the mapping between logical name data communication services collection and the short name data communication services collection;
Described application layer flow process processing module module provides the service primitive interface to the application process and the LLC layer of client.
CNA2008100283664A 2008-05-28 2008-05-28 Dynamic link library for communication protocol stack Pending CN101291326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100283664A CN101291326A (en) 2008-05-28 2008-05-28 Dynamic link library for communication protocol stack

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100283664A CN101291326A (en) 2008-05-28 2008-05-28 Dynamic link library for communication protocol stack

Publications (1)

Publication Number Publication Date
CN101291326A true CN101291326A (en) 2008-10-22

Family

ID=40035401

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100283664A Pending CN101291326A (en) 2008-05-28 2008-05-28 Dynamic link library for communication protocol stack

Country Status (1)

Country Link
CN (1) CN101291326A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404656A (en) * 2008-11-04 2009-04-08 深圳中兴力维技术有限公司 Software interface design method for communicating with third party intelligent equipment protocol
CN103036917A (en) * 2011-09-29 2013-04-10 北京神州泰岳软件股份有限公司 Achievement method of client side platform and client side platform
CN105633960A (en) * 2016-03-09 2016-06-01 东南大学 Multi-adaptive black-start apparatus
CN111221532A (en) * 2019-12-23 2020-06-02 北京轩宇信息技术有限公司 Method and device for generating dynamic link library
CN114785631A (en) * 2022-04-07 2022-07-22 潍柴动力股份有限公司 Communication protocol stack multiplexing method, communication method, computer device and medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404656A (en) * 2008-11-04 2009-04-08 深圳中兴力维技术有限公司 Software interface design method for communicating with third party intelligent equipment protocol
CN103036917A (en) * 2011-09-29 2013-04-10 北京神州泰岳软件股份有限公司 Achievement method of client side platform and client side platform
CN103036917B (en) * 2011-09-29 2016-04-20 北京神州泰岳软件股份有限公司 The implementation method of client platform and client platform
CN105633960A (en) * 2016-03-09 2016-06-01 东南大学 Multi-adaptive black-start apparatus
CN111221532A (en) * 2019-12-23 2020-06-02 北京轩宇信息技术有限公司 Method and device for generating dynamic link library
CN114785631A (en) * 2022-04-07 2022-07-22 潍柴动力股份有限公司 Communication protocol stack multiplexing method, communication method, computer device and medium
CN114785631B (en) * 2022-04-07 2023-12-15 潍柴动力股份有限公司 Communication protocol stack multiplexing method, communication method, computer device and medium

Similar Documents

Publication Publication Date Title
CN1722732B (en) Method and system for enabling communication between nodes
CN1751492B (en) System and method of compact messaging in network communications
CN102082771B (en) Service management middleware based on ESB (enterprise service bus) technology
CN108449418A (en) A kind of mixed cloud platform management system and method
ES2384923B1 (en) METHOD AND SYSTEM FOR MANAGING COMMUNICATIONS IN INDUSTRIAL CONTROL AND SUPERVISION SYSTEMS.
CN102902537B (en) Based on the embedded type WEB MVC Development Framework of FastCGI and html template
CN101291326A (en) Dynamic link library for communication protocol stack
CN101167327A (en) System and method for accessing multiple data sources by mobile applications
CN101867572B (en) The implementation method of wireless U disk and system
CN103188260A (en) Method of implementing content-centric network (CCN) using internet protocol (IP)-based network in gateway, and gateway
CN102098296A (en) Method and system for realizing remote call
CN103078921B (en) A kind of transmission, the method and device of reception message
CN101557426A (en) Web service-based and uniformly managed interface message processor, web service component and method thereof
CN109379742A (en) A kind of cut-in method of WLAN, device and storage medium
CN106130855B (en) The method and device of data processing
CN104660547B (en) A kind of service platform for realizing telecommunication
CN103746945B (en) A kind of data transmission device and method
CN106657377B (en) A kind of WIA-PA/ interconnects manufacture network information service adapter and implementation method entirely
CN102281521A (en) Telecom charging operating network system and charging method thereof
Li et al. Efficient oneM2M protocol conversion platform based on NB-IoT access
ES2375026B1 (en) MODULE AND METHODS FOR THE INTERCONNECTION OF HETEROGENIC EQUIPMENT WITH LIMITED RESOURCES THROUGH MIDDLEWARES OF COMMUNICATIONS ORIENTED TO OBJECT.
CN100589358C (en) Metod and system for processing messages, and message sending end and message receiving end
CN108206811A (en) For between IoT equipment across the method, apparatus of protocol communication and IoT systems
CN113065077A (en) Horizontal extension middle station service processing system
CN114268675B (en) Communication method and system based on IEC61850 model and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20081022