CN102541536A - Communication management method of distributed system of embedded development environment - Google Patents

Communication management method of distributed system of embedded development environment Download PDF

Info

Publication number
CN102541536A
CN102541536A CN201110390696XA CN201110390696A CN102541536A CN 102541536 A CN102541536 A CN 102541536A CN 201110390696X A CN201110390696X A CN 201110390696XA CN 201110390696 A CN201110390696 A CN 201110390696A CN 102541536 A CN102541536 A CN 102541536A
Authority
CN
China
Prior art keywords
order
command
target machine
sent
embedded
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
CN201110390696XA
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.)
AVIC No 631 Research Institute
Original Assignee
AVIC No 631 Research Institute
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 AVIC No 631 Research Institute filed Critical AVIC No 631 Research Institute
Priority to CN201110390696XA priority Critical patent/CN102541536A/en
Publication of CN102541536A publication Critical patent/CN102541536A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a communication management method of a distributed system of an embedded development environment, which comprises the steps of (1) allocating at least one target machine for an embedded distributed system manager through a graphical user interface module; (2) performing connection with the target machine; (3) creating a command and sending the command to a command manager; (4) adding a creation command to a queue waiting for sending the command; (5) sending thread to obtain a command waiting for being sent and sending the command to the target machine; (6) receiving a command reply data packet sent by the target machine; (7) obtaining command reply parameters through an application programming interface module; and (8) disconnecting the target machine and shutting down a transmitter. The communication management method solves the technical problem that in the prior art, connection management on single target machines is achieved, but connection management on all single target machines integrating to serve as an embedded distributed system is not achieved. By arranging target machine state parameters in the target machine, the situation that the target machine has no time to process all the commands due to command accumulation is avoided, and the target machine is guaranteed to be work orderly.

Description

Embedded-development environment communication of distributed system management method
Technical field
The present invention relates to the embedded software developing instrument, be specifically related to embedded-development environment communication of distributed system management method.
Background technology
Embedded-development environment all has the target machine communication capacity, can send packet to embedded system, also can receive packet.Current embedded-development environment is not directed against embedded distribution system specially generally all only to the single goal machine, does not possess each single goal machine is gathered the ability of carrying out connection management as an embedded distribution system.Therefore make embedded-development environment lack support to the embedded distribution system developing instrument; The embedded distribution system developing instrument needs oneself to accomplish telecommunication management work such as the management of embedded distribution system target machine, order management, data transmission, has increased embedded distribution system developing instrument development difficulty.
The traditional data transfer function is mainly considered the state of record target machine, can not before receive time-out replied in order, send new order and give busy target machine.Embedded-development environment communication of distributed system management software then need write down the state of multiple goal machine, can not before receive time-out replied in order, send new order and give busy target machine, and need timely idle target machine to be mail in order.The mass data of the order answer of each target machine, event notice, target machine active upload is also wanted and can be received timely.
Summary of the invention
In order to solve existing embedded-development environment generally all only to the single goal machine; Do not possess each single goal machine is gathered the technical matters of carrying out connection management as an embedded distribution system, the present invention provides a kind of embedded-development environment communication of distributed system management method.
Technical solution of the present invention:
Embedded-development environment communication of distributed system management method, its special character is: may further comprise the steps:
1] give the configuration of embedded distribution system manager at least one target machine through graphical user interface module (GUI), and the result that will dispose is saved in the embedded distribution system manager;
2] connect the target machine that the embedded distribution system manager is disposed, and empty in the command manager etc. command queue to be sent with wait for used order in the commands in return formation, start transmitter;
3] utilize the DLL of the embedded distribution system developing instrument that API module (API) provides, the parameter of the establishment order that provides according to the embedded distribution system developing instrument is created order, send create and order to command manager; Order comprises that parameter is sent in target machine that order will mail to, command sequence number, order, parameter method for packing, order reply parameter analytic method are sent in order;
4] command manager adds API module (API) and creates and command queue to be sent such as order;
5] the transmission thread of transmitter from etc. obtain order to be sent such as the command queue to be sent, will wait order encapsulation to be sent to form the command sending data bag, with the target machine that will mail to that points in the orders to be sent such as the command sending data bag mails to; With after sending etc. order to be sent add to and wait in the commands in return formation in the command manager;
6] receive from the order of target machine and reply packet, resolve command is replied packet and is obtained command sequence number, number in waiting for the commands in return formation, obtains corresponding order according to command sequence; Obtain the order reply parameter according to obtaining the corresponding order reply parameter analytic method resolve command answer data that comprise of ordering, the order reply parameter is saved in the wait commands in return corresponding in the command manager;
7] API module (API) is obtained the order reply parameter and is supplied the use of embedded distribution system developing instrument from command manager;
8] graphical user interface module (GUI) is broken off the target machine that the embedded distribution system manager is disposed, and stops transmitter.
Step 2] comprise that also the original state of objective definition machine is an idle condition;
Corresponding step 5] be: the transmission thread of transmitter from etc. obtain order to be sent such as the command queue to be sent, check that this chooses etc. the state of the target machine that will mail to that comprises of order to be sent,
If the target machine state is idle, then will wait order encapsulation to be sent to form the command sending data bag, with the target machine that will mail to that points in the orders to be sent such as the command sending data bag mails to, be busy state with the target machine status modifier; With after sending etc. order to be sent add to and wait in the commands in return formation in the command manager;
If the target machine state is busy, then again from etc. obtain order to be sent such as the command queue to be sent, until choose etc. the state of the target machine that will mail to that comprises of order to be sent be idle condition.
Step 2] concrete grammar be: start transmitter: transmitter is set up communication with target machine and is connected, and operation transmission thread moves receiving thread.
Step 8] concrete grammar be: stop to send thread, stop receiving thread, the communication of breaking off between transmitter and the target machine connects.
The advantage that the present invention had:
1, the present invention prevents that through the target machine state parameter is set the order of target machine from piling up in target machine, causes target machine to have little time to handle, and the assurance target machine is worked in order.
2, the present invention adopt earlier with transmitter and target machine set up that communication connects, thread is sent in operation, operation receiving thread or stop to send thread, stop receiving thread, break off communication between transmitter and the target machine and connect and break off ways of connecting; Guarantee communication robust, prevent to omit order.
Description of drawings
Fig. 1 is an embedded-development environment communication of distributed system management software overall construction drawing.
Fig. 2 is that the task run flow process is sent in the transmitter order.
Fig. 3 is a transmitter target machine receiving thread operational scheme.
Fig. 4 is the general operational scheme of target machine class of operation api interface.
Fig. 5 is an embedded distribution system telecommunication management software data flow graph.
Embodiment
General purpose of the present invention is a general communication of distributed system management software to be provided for embedded-development environment.Through this software, can strengthen the support of embedded-development environment to the embedded distribution system developing instrument.
After embedded-development environment communication of distributed system management software has been arranged, embedded-development environment will be divided into embedded-development environment platform, the management of single goal machine and communication, the management of embedded-development environment communication of distributed system, embedded distribution system developing instrument.Wherein the embedded-development environment platform is a basic platform, on this basic platform, can develop other component software; Management of single goal machine and communication provide configuration management of single goal machine and single goal machine communication capacity, and it provides configuration management of single goal machine and single goal machine communication interface to embedded-development environment communication of distributed system management software; Embedded-development environment communication of distributed system management software is that embedded system distributed system developing instrument provides abilities such as embedded distribution system management, communication; The embedded distribution system developing instrument is function development instruments such as information inspection with embedded distribution system, operation monitoring.
In order to reach embedded-development environment communication of distributed system management software catalogue, need the embedded-development environment communication of distributed system management software to reach following several purpose.
1, based on the embedded-development environment single goal machine communication infrastructure: the realization of each ingredient of embedded-development environment embedded distribution system telecommunication management software is all based on embedded-development environment basic platform interface and management of single goal machine and communication interface.
2, embedded distribution system management: embedded distribution system comprises a plurality of target machines.Telecommunication management software is supported embedded distribution system, and needs elder generation is configured target machine wherein.Therefore, embedded-development environment distributed system target machine telecommunication management software need be supported the configuration to target machine.
3, embedded distribution system order management: the data that mail to each target machine are called order.Tradition unit order management only need be made into a tabulation with command group and just can manage.Embedded-development environment communication of distributed system management software then also will be noted the target machine that each order is mail to, and ordered residing state in the tissue tabulation: comprise sending and wait for, send and accomplish, reply and wait for, reply and accomplish one of four states.
4, embedded distribution system data transmission: data packets for transmission is drawn together order, order answer, event notice.Order is the data that embedded-development environment sends to target machine; It is the feedback data after the target machine response command data that order is replied; Event notice is the data that target machine initiatively sends to development environment, mainly is to report the special event that takes place in the target machine operational process to development environment.
Embedded-development environment communication of distributed system management software is based on like mistake! Do not find Reference source.General structure, be divided into embedded distribution system manager, command manager, transmitter, API, GUI.The distributed system management device is accomplished embedded distribution system target machine management function, and command manager is accomplished the order management function, and transmitter is accomplished data-transformation facility, and API provides the instrument DLL, and GUI provides the graphical user operation interface.
1, embedded distribution system manager
Represent the embedded distribution system manager with the DsManager class, represent target machine with the TsTarget class.Whether record object machine state is arranged in the TsTarget class, judge through method boolean isBusy () whether target machine is busy, it is busy through setBusy (boolean busy) target machine to be set.Comprise a target machine formation in the embedded distribution system target machine manager:
List<TsTarget>dscd
Preserve all target machines that embedded distribution system comprises with this formation.Through voidsetDscd (List < TsTarget>targetlist) method the target machine that embedded distribution system comprises is set.Obtain all target machines that embedded distribution system comprises through List < TsTarget>getDscd () method.
2, command manager
Represent command manager with the CmdManager class.Command queue to be sent and the formations of transmission back wait commands in return such as the CmdManager class has.
ISendObj refers to that the object that can send, IRepObj refer to the object that can reply.
Use a type Cmd implements IRepObj, ISendObj representes to mail to the order of target machine, and all objectives machine operation order classes all are the subclasses to such.There are target machine (object of TsTarget class) that order will mail to, command sequence number, order to send members such as parameter, order reply parameter among the Cmd.Command sequence number is produced by transmitter, and its sequence number of the order of each transmission all has nothing in common with each other.Command sequence number can send to target machine with other data of order, and after target machine was handled order, order is replied in the packet also will comprise this sequence number.The command sequence of replying in the packet through order number just can find corresponding command in command manager.The main method of Cmd comprises:
Obtain the target machine that order will be mail to, TsTarget getTsTarget ();
Envelope command is sent parameter, boolean encapsule (ByteBuffer buf);
The resolve command reply parameter, boolean resolve (ByteBuffer buf).
Send order, void send ();
Synchronized transmission order, this method can be waited for, receive up to order and reply or wait timeout sendSychronizedCmd (int cmdtimeout);
Send order asynchronously, this method can not waited for, but not guarantee after returning that order has the answer data, sendAsynchronouslyCmd (int cmdtimeout).
The Cmd class realizes the transmission of ordering with the send method.This method will be called CmdManager class addSendObj method order will be stored in etc. in the command queue to be sent.
The main method of CmdManager class includes and comprises:
Add to send object and command queue to be sent, addSendObj (ISendObj sendobj) such as arrive;
Obtain one the target machine that will mail to be idle condition etc. order to be sent, ISendObjgetSendObj ();
Be provided with and send object transmit status, and the target machine that order mails to is set is busy state, setSended (ISendObj sendobj);
Add an object of waiting for replying and reply formation, addRepObj (IRepObj repobj) to waiting for;
Obtain wait according to sequence number and reply object, IRepObj getRepObj (int xno);
Order is set is recoil state, and the order target machine is set is idle condition, setReped (IRepObjrecobj).
3, transmitter
Embedded-development environment communication of distributed system management software and target machine realization of Communication are based on management of embedded-development environment single goal machine and communication interface.
Suppose that embedded-development environment provides single goal machine management and communication interface through the TsApi class, each TsApi object all with a target machine object (TsTarget object) correspondence.
The main method of TsApi class comprises open: open communication interface; Putpkt: send packet; Getpkt: receive packet; Close: communication close interface.
Represent transmitter with the Transmitter class.Managed a TsApi list object in the Transmitter class:
ArrayList<TsApi>TsApis
The all corresponding embedded distribution system target machine object (TsTarget object) of each TsApi object wherein.Transmitter starts through method boolean transOn (boolean linknow) or closes.To attempt during startup all creating a TsApi object, and open communication interface, move transmission task RecJob and the task of reception TransJob then through the open method for each target machine.Pass through close method communication close interface when closing, and empty the TsApi list object, stop all receiving threads and transmission task.
Transmitter sends the transmission that thread (TransThread) is accomplished all target machine order datas of embedded distribution system with one.
Transmitter uses to each target machine of embedded distribution system and all creates a receiving thread (RecThread), is used for receiving from each target machine data.
TransJob finds the order that will send through CmdManager class getSendObj method; Be order formation sequence number; Order data is encapsulated; Send the TsApi object that target machine finds correspondence according to order, use TsApi object putpkt method to send order, and put the state of target machine for doing.The operational scheme of TransJob is seen mistake! Do not find Reference source.。
Each target machine RecThread does not stop receives data (using the getpkt method of order TsApi) from target machine; The packet that receives is analyzed; Judgement is that packet or event notification data bag are replied in order, calls different data package processing methods then and handles.Last handling process is replied in order: from CmdManager, find corresponding command, resolve command is replied data, calls CmdManager class setReped method order recoil state is set.The operational scheme of RecThread is seen mistake! Do not find Reference source.。
4, graphic user interface (GUI)
The operation that embedded-development environment communication of distributed system management software graphic user interface comprises has: configuration, connection, disconnection.
Configuration refers to the target machine that the configuration embedded distribution system comprises.The result of configuration can be set to and preserve (through the setDscd method) in the embedded distribution system target machine manager.
Embedded-development environment communication of distributed system management software comprises connection and breaks off two states, only is in connection status, just can carry out target machine communication and data transmission.Only be in off-state, just can be configured operation.
The wait transmit queue that attended operation empties earlier in the command manager receives formation with wait, calls transmitter transOn (true) method startup transmitter.
Opening operation will call transmitter transOn (false) method and stop transmitter.
5, API (API)
Embedded-development environment communication of distributed system management software provides API to upper strata embedded distribution system developing instrument.
The workflow that the DLL relevant with target machine is general is seen mistake! Do not find Reference source.。
The concrete job step of embedded-development environment communication of distributed system management software:
(1) user disposes the target machine that embedded distribution system comprises through graphic user interface.
(2) user connects embedded distribution system through the graphical user, thereby the wait transmit queue that empties in the command manager receives formation, startup transmitter with waiting for.Each target machine machine that transmitter starts in back and the distributed system all can establish a communications link, and the Data Receiving thread of operation transmission task and each target machine.
(3) user uses the embedded distribution system developing instrument; Instrument obtains exercisable target machine information from the embedded distribution system manager; Through api interface or self directly generate target machine order, send a command in the wait transmit queue of command manager.
(4) the transmitter task of sending obtains the order that will send and sends from the command manager waiting list.
(5) transmitter target machine receiving thread receives from the order of target machine and replys data, waits for replying the formation from command manager and obtains the parsing that corresponding command is replied data, and order is set is recoil state.
(6) execution that obtains order of embedded distribution system developing instrument is replied data and is used.
(7) embedded distribution system developing instrument repeating step (3)---(6), the online development function of completion instrument.
(8) user connects embedded distribution system through the graphical user.Transmitter out of service sends task and each target machine receiving thread, closes with the communication of target machine to be connected.
Embedded-development environment communication of distributed system management software data stream is seen mistake! Do not find Reference source.。
For embedded-development environment distributed system developing instrument provides the telecommunication management ability, the instrument that makes can be absorbed in own application function own, has reduced the difficulty of too development.

Claims (4)

1. embedded-development environment communication of distributed system management method is characterized in that: may further comprise the steps:
1] give the configuration of embedded distribution system manager at least one target machine through graphical user interface module (GUI), and the result that will dispose is saved in the embedded distribution system manager;
2] connect the target machine that the embedded distribution system manager is disposed, and empty in the command manager etc. command queue to be sent with wait for used order in the commands in return formation, start transmitter;
3] utilize the DLL of the embedded distribution system developing instrument that API module (API) provides, the parameter of the establishment order that provides according to the embedded distribution system developing instrument is created order, send create and order to command manager; Order comprises that parameter is sent in target machine that order will mail to, command sequence number, order, parameter method for packing, order reply parameter analytic method are sent in order;
4] command manager adds API module (API) and creates and command queue to be sent such as order;
5] the transmission thread of transmitter from etc. obtain order to be sent such as the command queue to be sent, will wait order encapsulation to be sent to form the command sending data bag, with the target machine that will mail to that points in the orders to be sent such as the command sending data bag mails to; With after sending etc. order to be sent add to and wait in the commands in return formation in the command manager;
6] receive from the order of target machine and reply packet, resolve command is replied packet and is obtained command sequence number, number in waiting for the commands in return formation, obtains corresponding order according to command sequence; Obtain the order reply parameter according to obtaining the corresponding order reply parameter analytic method resolve command answer data that comprise of ordering, the order reply parameter is saved in the wait commands in return corresponding in the command manager;
7] API module (API) is obtained the order reply parameter and is supplied the use of embedded distribution system developing instrument from command manager;
8] graphical user interface module (GUI) is broken off the target machine that the embedded distribution system manager is disposed, and stops transmitter.
2. embedded-development environment communication of distributed system management method according to claim 1 is characterized in that:
Step 2] comprise that also the original state of objective definition machine is an idle condition;
Corresponding step 5] be: the transmission thread of transmitter from etc. obtain order to be sent such as the command queue to be sent, check that this chooses etc. the state of the target machine that will mail to that comprises of order to be sent,
If the target machine state is idle, then will wait order encapsulation to be sent to form the command sending data bag, with the target machine that will mail to that points in the orders to be sent such as the command sending data bag mails to, be busy state with the target machine status modifier; With after sending etc. order to be sent add to and wait in the commands in return formation in the command manager;
If the target machine state is busy, then again from etc. obtain order to be sent such as the command queue to be sent, until choose etc. the state of the target machine that will mail to that comprises of order to be sent be idle condition.
3. embedded-development environment communication of distributed system management method according to claim 1 and 2 is characterized in that: step 2] concrete grammar be: start transmitter: transmitter is set up communication with target machine and is connected, and operation transmission thread moves receiving thread.
4. embedded-development environment communication of distributed system management method according to claim 3 is characterized in that: step 8] concrete grammar be: stop to send thread, stop receiving thread, the communication of breaking off between transmitter and the target machine connects.
CN201110390696XA 2011-11-30 2011-11-30 Communication management method of distributed system of embedded development environment Pending CN102541536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110390696XA CN102541536A (en) 2011-11-30 2011-11-30 Communication management method of distributed system of embedded development environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110390696XA CN102541536A (en) 2011-11-30 2011-11-30 Communication management method of distributed system of embedded development environment

Publications (1)

Publication Number Publication Date
CN102541536A true CN102541536A (en) 2012-07-04

Family

ID=46348513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110390696XA Pending CN102541536A (en) 2011-11-30 2011-11-30 Communication management method of distributed system of embedded development environment

Country Status (1)

Country Link
CN (1) CN102541536A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536838A (en) * 2014-12-18 2015-04-22 中国电子科技集团公司第三十八研究所 Remote debugging method and system with asynchronous monitoring function

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041190A1 (en) * 2001-06-21 2003-02-27 Sony Corporation And Sony Electronics, Inc. System and method for efficiently performing a command swapping procedure
WO2005048086A2 (en) * 2003-11-17 2005-05-26 Roy-G-Biv Corporation Command processing systems and methods
CN101256482A (en) * 2007-12-19 2008-09-03 深圳市同洲电子股份有限公司 Development system and method for built-in application program
CN102053913A (en) * 2009-10-30 2011-05-11 慧荣科技股份有限公司 Memory device and data access method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041190A1 (en) * 2001-06-21 2003-02-27 Sony Corporation And Sony Electronics, Inc. System and method for efficiently performing a command swapping procedure
WO2005048086A2 (en) * 2003-11-17 2005-05-26 Roy-G-Biv Corporation Command processing systems and methods
WO2005048086A3 (en) * 2003-11-17 2006-07-06 Roy G Biv Corp Command processing systems and methods
CN101256482A (en) * 2007-12-19 2008-09-03 深圳市同洲电子股份有限公司 Development system and method for built-in application program
CN102053913A (en) * 2009-10-30 2011-05-11 慧荣科技股份有限公司 Memory device and data access method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536838A (en) * 2014-12-18 2015-04-22 中国电子科技集团公司第三十八研究所 Remote debugging method and system with asynchronous monitoring function

Similar Documents

Publication Publication Date Title
CN104753817B (en) A kind of cloud computing Message Queuing Services local analogy method and system
CN100471139C (en) System and method for network test
CN101227343B (en) Method and device for testing TCPv6 and UDPv6
CN102810069A (en) JAVA object requesting and responding methods, devices and systems and terminal
CN107122252B (en) Intersystem interaction method and device
WO2012088905A1 (en) Polling sub-system and polling method for communication network system and communication apparatus
CN101635726B (en) Service end of C/S architecture and service executing method and service executing system of client
CN101123616A (en) A server management method and a server management system
CN111262908A (en) Task construction method and system based on jenkins
CN108536484A (en) Parameter amending method, device, terminal device and storage medium
CN101185070A (en) Device management system and method for setting configuration-value therein
CN107688512A (en) One kind optimization virtual-machine data backup method and system
CN103544098A (en) Method and device for testing pressure
CN109525443B (en) processing method and device for distributed pre-acquisition communication link and computer equipment
CN110266787B (en) Hybrid cloud management system and method and computer equipment
CN102541536A (en) Communication management method of distributed system of embedded development environment
CN103347077A (en) Method and device for data transmission of distributed file system
CN102571412A (en) Target machine server of embedded distributed system
CN100426241C (en) Message level soft interrupt processing method in service system structure
CN102413133B (en) Client server transmission method with controllable time
CN106909368B (en) Service-side service layer logic architecture for realizing rapid service development
CN112019491B (en) Message processing method and system
CN114024822A (en) Block chain-based Internet of things equipment management method, equipment, server and medium
CN105827567B (en) Service management and control method and capability opening platform
CN1842071B (en) Realization method and apparatus for application program access Web server end object

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

Application publication date: 20120704