CN105867943A - Channel management realization method for microgrid data acquisition system - Google Patents
Channel management realization method for microgrid data acquisition system Download PDFInfo
- Publication number
- CN105867943A CN105867943A CN201610246783.0A CN201610246783A CN105867943A CN 105867943 A CN105867943 A CN 105867943A CN 201610246783 A CN201610246783 A CN 201610246783A CN 105867943 A CN105867943 A CN 105867943A
- Authority
- CN
- China
- Prior art keywords
- communication
- communication apparatus
- network
- subclass
- serial
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
Abstract
The invention provides a channel management realization method for a microgrid data acquisition system. The method includes: determining universal communication device classes according to abstractly extracted properties and operation of various communication devices, and determining subclasss of all the communication devices according to definitions of the universal communication device classes and realization methods of serial communication, network TCP (transmission control protocol) communication, network UDP (user datagram protocol) communication and serial server communication; determining communication device class instantiation, generating instances of the subclasses of all the communication devices, and returning as objects of the communication device classes in a unified manner. After the realization methods of communication modes of various microgrid communication devices are analyzed, the universal communication device classes are abstractly extracted, interface functions for opening the devices, closing the devices, monitoring connection statuses, reading data, writing data and the like are provided to the outside in a unified manner, difficulty in programming of data acquisition software is lowered greatly, universality and stability of the software are improved, meanwhile, maintenance is facilitated, and good expandability is achieved.
Description
Technical field
The invention belongs to micro-grid system technical field, relate to the channel of micro-capacitance sensor data collecting system
Reason implementation method.
Background technology
In recent years, along with the development of distributed power generation Yu energy storage technology, micro-capacitance sensor at home and abroad obtains extensively
General application.Micro-capacitance sensor is connected on user side, has the features such as low cost, low-voltage, low stain, and it was both
Can be with bulk power grid networking operation, it is possible to disconnect isolated operation at electric network fault or when needing with major network.Micro-
Electrical network not only solves the extensive access problem of distributed power source, has given full play to distributed power source
Every advantage, also brings other many benefits for user.Microgrid will fundamentally change tradition
Reply load growth mode, reduce energy consumption, improve Power System Reliability and motility etc. side
Mask has great potential.
Micro-capacitance sensor data collecting system monitors as micro-capacitance sensor, runs the base controlled with energy management software
Plinth function, be with inverter, current transformer, microgrid measuring and controlling protective device, mode controller and battery
The various kinds of equipment such as management system, subsystem carry out communication and obtain data, face the choosing of multiple communication channel
Select.Have serial mode, network mode, serial communication mode divides again 232,422, more than 485 kind of wiring
Mode, under network communication mode may use LAN, wide area network, again may use Transmission Control Protocol,
Udp protocol etc..Serial ports can also carry out turning by serial server equipment with two kinds of communication modes of network
Change.It addition, in multiple operating system platform such as Windows, Unix, the access of every kind of passage is real
Existing mode is the most different.General data acquisition software is according to the type of communication apparatus and operating system
Type, in conjunction with concrete communications protocol stand-alone development program, in the stability of software, autgmentability, generation
The aspects such as the adaptive adjustment capability of the reusability of code, reply demand change, ease for maintenance exist and compare
Big shortcoming.
Summary of the invention
In view of this, the present invention proposes a kind of channel management realization side for micro-capacitance sensor data collecting system
Method, on the basis of summarizing a large amount of application achievements, should to micro-capacitance sensor data acquisition communication modes
It is used as further improvement, has concluded and extend, defined a kind of for micro-capacitance sensor data collecting system
Cross-platform, across the general channels management method of communication modes, strengthen the general and customizable of software function
Characteristic.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that: be a kind of for micro-capacitance sensor number
Channel management implementation method according to acquisition system, it is achieved step is as follows:
(1) according to general-purpose attribute and the operation of the various communication apparatus of abstract refinement, determine general
Communication apparatus class, this communication apparatus class externally provides in the way of dynamic link library;
(2) according to definition and serial communication, network TCP communication, the network of universal communication equipment class
UDP communication, serial server communication programming method, determine each communication apparatus subclass;
(3) determine communication apparatus class instantiation, generate the example of each communication apparatus subclass, and unite
One returns with the object of communication apparatus class.
Further, the general-purpose interface function of step (1) described communication apparatus class includes:
Open connectivity function, is used for resolving communication apparatus title, opens communication apparatus and connects;
Close connectivity function, connects for closed communication equipment;
Read function, for reading in the data write relief area of certain length from communication apparatus port;
Write function, for reading the data write communication apparatus port of certain length from relief area;
IO control function, for communication control equipment I/O attribute;
Check function, is used for monitoring communication apparatus connection status.
Further, described general-purpose interface function derives function with pure virtual function, dynamic link library
Mode exists.
Further, step (2) described communication apparatus subclass includes serial ports, network TCP, network
UDP, serial server.
Further, described serial communication device subclass adds the special attribute of serial ports, definition
The application specific architecture of serial ports, it is achieved be adapted to each interface that serial ports accesses under different operating system platform
Function.
Further, described network TCP communication apparatus subclass adds the special of network TCP
Attribute, it is achieved be adapted to each interface function that network TCP accesses under different operating system platform, point
Shi Xian not connect the client of network and the service end of network monitoring.
Further, described network UDP communication apparatus subclass adds the special of network UDP
Attribute, it is achieved be adapted to each interface function that network UDP accesses under different operating system platform.
Further, described serial server is virtual serial port mode, it is not necessary to increase at new subclass
Reason, directly invokes serial communication device subclass;Described serial server is TCP pattern, network TCP
Communication apparatus subclass increases subclass, arranges port offset amount attribute in the subclass of this increase, and each connects
Mouthful function without again realizing, calling for serial server.
Relative to prior art, a kind of channel for micro-capacitance sensor data collecting system of the present invention
Reason implementation method has the advantage that
The present invention uses Object-oriented Technique, is analyzing various micro-capacitance sensor communication apparatus communication modes
After implementation method, the abstract universal communication equipment class that extracts, unified external offer such as open equipment,
Close hull closure, monitor connection status, read data, write the interface function of data etc. so that micro-capacitance sensor number
Need not be concerned about concrete according to the preposition bitcom (or user of other upper layer application) of acquisition system
Operating system platform and communication apparatus type, only need to simply call these interfaces, communication apparatus class
Object can be automatically matched to respective concrete implementation method.So, greatly reduce data acquisition soft
The difficulty of part programming, improves the versatility of software, stability, simultaneously facilitates maintenance, also has very well
Extensibility.
Accompanying drawing explanation
The accompanying drawing of the part constituting the present invention is used for providing a further understanding of the present invention, the present invention's
Schematic description and description is used for explaining the present invention, is not intended that inappropriate limitation of the present invention.?
In accompanying drawing:
Fig. 1 is communication apparatus class class figure in embodiments of the invention.
Detailed description of the invention
It should be noted that the feature in the case of not conflicting, in embodiments of the invention and embodiment
Can be mutually combined.
Describe the present invention below with reference to the accompanying drawings and in conjunction with the embodiments in detail.
It is as follows that the present invention implements step:
The first step: according to general-purpose attribute and the operation of the various communication apparatus of abstract refinement, determine general
Communication apparatus class CComDev, such externally provides in the way of dynamic link library.
The general-purpose attribute of communication apparatus includes:
int DevId;// device identifier
QSuint8 State;// equipment state
char DevName[DEV_NAMELEN];// device name
Wherein, QSuint8 and hereinafter QSuint16, QSint16, QSuint32, QSint32 etc.
Cross-platform data type for unified definition.
The general-purpose interface of communication apparatus class includes:
Resolve communication apparatus title, open communication apparatus and connect
Virtual int Open (char*devname, DevSetting*setting=NULL)=0;
Closed communication equipment connects
Virtual int Close (void)=0;
The data write relief area of certain length is read in from communication apparatus port
Virtual int Read (void*buf, int len, int TimeOut=0)=0;
The data write communication apparatus port of certain length is read from relief area
Virtual int Write (void*buf, int len, int TimeOut=0)=0;
Communication control equipment I/O attribute
Virtual int IoCtl (CTRLCMD cmd, int&mode)=0;
Monitoring communication apparatus connection status
Virtual int Check (void)=0;
These interface functions exist in the way of pure virtual function, dynamic link library derive function.
Second step: according to definition and the implementation method of serial communication of universal communication equipment class, determine string
Mouth communication apparatus subclasses C SerialDev.
Increase special attribute:
HANDLE hFile;
Definition application specific architecture:
Then realize under different operating system platform, being adapted to each interface function that serial ports accesses.
3rd step: according to definition and the network TCP communication programming method of universal communication equipment class,
Determine network TCP communication apparatus subclasses C TcpDev.
Increase special attribute:
Then realize under different operating system platform, being adapted to each interface function that network TCP accesses,
The service end of client and the network monitoring connecting network is realized respectively according to ServerFlag attribute.Its
Middle IoCtl () is inapplicable in this subclass.
4th step: according to definition and the network UDP communication programming method of universal communication equipment class,
Determine network UDP communication apparatus subclasses C UdpDev.
Increase special attribute:
struct sockaddr_in Remote_Addr;// partner address
Then realize under different operating system platform, being adapted to each interface function that network UDP accesses,
Wherein IoCtl () is inapplicable in this subclass.
5th step: according to serial server two kinds of actual application modes in micro-capacitance sensor data collecting system
Determine serial server communication programming mode.Under the mode of virtual serial port, it is not necessary to increase new
Subclassing, directly invokes CSerialDev.Under serial server is configured to TCP pattern,
Call subclasses C SerialServer of the CTcpDev of increase.This apoplexy due to endogenous wind arranges port offset amount attribute
As follows.
Port_Offset=4000;
Each interface function is without again realizing.
6th step: the method determining communication apparatus class instantiation.
CCommDev*CreateAComDev(QSuint32devtype)
Wherein, devtype parameter represents serial ports, network TCP, network UDP, serial server etc.
Each communication apparatus type, in the method, generates the example of each communication apparatus subclass, and unified
Return with the object of CCommDev base class.
In the present embodiment, the class figure of communication apparatus class is as shown in Figure 1.
The present invention uses Object-oriented Technique, is analyzing various micro-capacitance sensor communication apparatus communication modes
After implementation method, the abstract universal communication equipment class that extracts, unified external offer such as open equipment,
Close hull closure, monitor connection status, read data, write the interface function of data etc. so that micro-capacitance sensor number
Need not be concerned about concrete according to the preposition bitcom (or user of other upper layer application) of acquisition system
Operating system platform and communication apparatus type, only need to simply call these interfaces, communication apparatus class
Object can be automatically matched to respective concrete implementation method.So, greatly reduce data acquisition soft
The difficulty of part programming, improves the versatility of software, stability, simultaneously facilitates maintenance, also has very well
Extensibility.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at this
Within the spirit of invention and principle, any modification, equivalent substitution and improvement etc. made, should be included in
Within protection scope of the present invention.
Claims (8)
1. the channel management implementation method for micro-capacitance sensor data collecting system, it is characterised in that
Realize step as follows:
(1) according to general-purpose attribute and the operation of the various communication apparatus of abstract refinement, determine general
Communication apparatus class, this communication apparatus class externally provides in the way of dynamic link library;
(2) according to definition and serial communication, network TCP communication, the network of universal communication equipment class
UDP communication, serial server communication programming method, determine each communication apparatus subclass;
(3) determine communication apparatus class instantiation, generate the example of each communication apparatus subclass, and unite
One returns with the object of communication apparatus class.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 1 is real
Existing method, it is characterised in that the general-purpose interface function of step (1) described communication apparatus class includes:
Open connectivity function, is used for resolving communication apparatus title, opens communication apparatus and connects;
Close connectivity function, connects for closed communication equipment;
Read function, for reading in the data write relief area of certain length from communication apparatus port;
Write function, for reading the data write communication apparatus port of certain length from relief area;
IO control function, for communication control equipment I/O attribute;
Check function, is used for monitoring communication apparatus connection status.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 2 is real
Existing method, it is characterised in that described general-purpose interface function derives letter with pure virtual function, dynamic link library
The mode of number exists.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 1 is real
Existing method, it is characterised in that step (2) described communication apparatus subclass include serial ports, network TCP,
Network UDP, serial server.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 4 is real
Existing method, it is characterised in that add the special attribute of serial ports in described serial communication device subclass,
Define the application specific architecture of serial ports, it is achieved be adapted under different operating system platform serial ports access each
Interface function.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 4 is real
Existing method, it is characterised in that add the special of network TCP in described network TCP communication apparatus subclass
With attribute, it is achieved be adapted to each interface function that network TCP accesses under different operating system platform,
Realize the service end of client and the network monitoring connecting network respectively.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 4 is real
Existing method, it is characterised in that add network UDP's in described network UDP communication apparatus subclass
Special attribute, it is achieved be adapted to each interface letter that network UDP accesses under different operating system platform
Number.
A kind of channel management for micro-capacitance sensor data collecting system the most according to claim 4 is real
Existing method, it is characterised in that described serial server is virtual serial port mode, it is not necessary to increase new son
Class processes, and directly invokes serial communication device subclass;Described serial server is TCP pattern, network
TCP communication apparatus subclass increases subclass, arranges port offset amount attribute in the subclass of this increase, each
Interface function without again realizing, calling for serial server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610246783.0A CN105867943A (en) | 2016-04-19 | 2016-04-19 | Channel management realization method for microgrid data acquisition system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610246783.0A CN105867943A (en) | 2016-04-19 | 2016-04-19 | Channel management realization method for microgrid data acquisition system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105867943A true CN105867943A (en) | 2016-08-17 |
Family
ID=56632890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610246783.0A Pending CN105867943A (en) | 2016-04-19 | 2016-04-19 | Channel management realization method for microgrid data acquisition system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105867943A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446106A (en) * | 2018-03-20 | 2018-08-24 | 南京丹迪克科技开发有限公司 | A kind of communication interface processing method and system |
CN111310111A (en) * | 2020-03-31 | 2020-06-19 | 国网浙江省电力有限公司电力科学研究院 | Multi-microgrid system collaborative optimization scheduling model and dynamic link behavior analysis method |
CN112653836A (en) * | 2020-12-14 | 2021-04-13 | 珠海格力智能装备有限公司 | Image acquisition method and device, storage medium and processor |
CN113866531A (en) * | 2021-08-17 | 2021-12-31 | 广西电网有限责任公司防城港供电局 | Method for establishing connection with different testers for testing and generating test report |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102487333A (en) * | 2010-12-06 | 2012-06-06 | 中国人民解放军理工大学 | Construction method of general management information collection control device |
CN203118207U (en) * | 2013-03-07 | 2013-08-07 | 常熟阿特斯阳光电力科技有限公司 | Data acquisition device for microgrid system |
CN103647351A (en) * | 2013-12-18 | 2014-03-19 | 江苏省电力设计院 | Multi-agent and heterogeneous communication technology based micro-grid intelligent measuring and controlling terminal and method |
WO2017097380A1 (en) * | 2015-12-11 | 2017-06-15 | Abb Schweiz Ag | Microgrid segmentation |
-
2016
- 2016-04-19 CN CN201610246783.0A patent/CN105867943A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102487333A (en) * | 2010-12-06 | 2012-06-06 | 中国人民解放军理工大学 | Construction method of general management information collection control device |
CN203118207U (en) * | 2013-03-07 | 2013-08-07 | 常熟阿特斯阳光电力科技有限公司 | Data acquisition device for microgrid system |
CN103647351A (en) * | 2013-12-18 | 2014-03-19 | 江苏省电力设计院 | Multi-agent and heterogeneous communication technology based micro-grid intelligent measuring and controlling terminal and method |
WO2017097380A1 (en) * | 2015-12-11 | 2017-06-15 | Abb Schweiz Ag | Microgrid segmentation |
Non-Patent Citations (1)
Title |
---|
郭谋发主编: "《配电网自动化技术》", 29 February 2012, 机械工业出版社 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446106A (en) * | 2018-03-20 | 2018-08-24 | 南京丹迪克科技开发有限公司 | A kind of communication interface processing method and system |
CN111310111A (en) * | 2020-03-31 | 2020-06-19 | 国网浙江省电力有限公司电力科学研究院 | Multi-microgrid system collaborative optimization scheduling model and dynamic link behavior analysis method |
CN111310111B (en) * | 2020-03-31 | 2021-08-27 | 国网浙江省电力有限公司电力科学研究院 | Multi-microgrid system collaborative optimization scheduling model and dynamic link behavior analysis method |
CN112653836A (en) * | 2020-12-14 | 2021-04-13 | 珠海格力智能装备有限公司 | Image acquisition method and device, storage medium and processor |
CN113866531A (en) * | 2021-08-17 | 2021-12-31 | 广西电网有限责任公司防城港供电局 | Method for establishing connection with different testers for testing and generating test report |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105867943A (en) | Channel management realization method for microgrid data acquisition system | |
Mohagheghi et al. | Communication protocols and networks for power systems-current status and future trends | |
US20100020724A1 (en) | Method of configuring an intelligent electronic device | |
WO2004010260A3 (en) | System and method for implementing j2ee connector architecture | |
Strasser et al. | Applying open standards and open source software for smart grid applications: Simulation of distributed intelligent control of power systems | |
KR101980311B1 (en) | Method for data interoperability based on CIM and OPC-UA | |
CN110752966B (en) | Network protocol security test method and device, electronic equipment and storage medium | |
CN106453071A (en) | Intelligent power gateway meeting IEC61850 standard | |
CN107835102A (en) | One kind decomposes and decomposed fuzz testing method for protocol characteristic | |
CN106292576B (en) | A kind of mapping method of SCL models and CIM model | |
Cheah et al. | Design and implementation of an MMS environment on ISODE | |
CN102404289B (en) | Method for connecting wireless sensing network into internet protocol (IP) v4 network | |
Essakiappan et al. | A multi-site networked hardware-in-the-loop platform for evaluation of interoperability and distributed intelligence at grid-edge | |
CN107995182B (en) | Excavation system of loophole in transformer substation | |
TWM596476U (en) | Gateway of distributed power management platform | |
Faria | Wireless sensor network for electrical secondary substations | |
Cavalieri et al. | Mapping IEC 61850 SCL to OPC UA for smart grid applications | |
Yin et al. | Ubiquitous power Internet of Things technology for equipment monitoring | |
CN111880769B (en) | Abstract description method suitable for Internet of things application system interface and application thereof | |
Kumar et al. | WirelessHART device integration challenges and solutions in industrial automation | |
CN105692451A (en) | Engineering machinery lifting moment monitoring system | |
Raab et al. | Converter-based control using co-simulation with a power system simulation tool | |
CN215773422U (en) | Intelligent multimedia data processing terminal | |
Sizu et al. | IEC61850 gateway SCL configuration document research | |
Chhaya | IoT Based Solar Mini-Grid for Smart Grid Infrastructure: An Imperative Facet of Smart City |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160817 |
|
RJ01 | Rejection of invention patent application after publication |