CN100426808C - Method for implementing interplate object communication - Google Patents

Method for implementing interplate object communication Download PDF

Info

Publication number
CN100426808C
CN100426808C CNB021366500A CN02136650A CN100426808C CN 100426808 C CN100426808 C CN 100426808C CN B021366500 A CNB021366500 A CN B021366500A CN 02136650 A CN02136650 A CN 02136650A CN 100426808 C CN100426808 C CN 100426808C
Authority
CN
China
Prior art keywords
communication
plate
plates
static
message
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.)
Expired - Fee Related
Application number
CNB021366500A
Other languages
Chinese (zh)
Other versions
CN1477839A (en
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB021366500A priority Critical patent/CN100426808C/en
Publication of CN1477839A publication Critical patent/CN1477839A/en
Application granted granted Critical
Publication of CN100426808C publication Critical patent/CN100426808C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention relates to a method for realizing interplate object communication, particularly to a method for the interplate communication of embedded systems. The method creates a mapping object in a plate program for all objects which are positioned on other plates and need to communicate with the plate, the mapping object is called a skeleton object and is an agent for communication. Compared with other interplate communication methods, the present invention has the advantage of the same communication method no matter where the objects are according to application program design, and the present invention really realizes complete transparency. An animation function of a UML design tool is used for debugging.

Description

A kind of method that realizes object communication between plate
Technical field
The present invention relates to a kind of method that realizes object communication between plate, a kind of especially method that is applicable to the communication between plates of embedded system.
Background technology
At present UML (Unified Modeling Language) has had many application in the designing and developing of embedded system.The contact of using the UML design tool to set up each object in OMD (Object Model Diagram) figure just can be sent out message by this contact between the object then and communicate.Some UML design tool can also provide animated function, and is with showing in precedence diagram alternately between object, very directly perceived.
Because the communication between object is actually by pointer to object and finishes, so this communication mode can only realize on same process or plate that the communication between the different plates can not be adopted this method.
In patent retrieval, do not find similar patent to solve this inconvenience to communication between plates.
Known at present, communication between plates generally all is to call by some fixing primitive to finish.This method make in the plate and plate between the object communication method different, the developer need overlap communication processes with two in coding, increase complexity; Simultaneously,, also just can't use the animated function of UML design tool, assist design as the precedence diagram Presentation Function that some design tool provides with this class communication means.
Summary of the invention
The purpose of this invention is to provide a kind of method that realizes object communication between plate, a kind of especially method that is applicable to the communication between plates of embedded system.The difference of object between object and plate makes communication between plates transparent fully to upper level applications in the maskable plate, the functions such as animation that can use the UML design tool to provide simultaneously.
The present invention is achieved in that a kind of method that realizes object communication between plate, it is characterized in that may further comprise the steps at least:
To all need all to create with the static object of this board communications the object of a mapping on other plates in the program of this plate, be referred to as skeleton object (notion of skeleton object is similar to the skeleton in the OMG CORBA standard with effect), corresponding one by one as needing on the intermediary that communicates by letter and other plates with the static object of this board communications;
Static object by this plate is issued the skeleton object of static object on this plate corresponding on other plates with message;
The skeleton object intercepts messages of corresponding static object is processed into the communication between plates module that uniform data format sends to this plate on other plates of creating on this plate;
The communication between plates module sends a message to other plates;
The communication between plates module of other plates judges whether the skeleton object of the static object correspondence that sends message exists when communication line is received message, and if there is no, then dynamic creation sends the skeleton object of the static object correspondence of message;
The communication between plates module of other plates generates message, sends to the static object on other plates.
Static object C on a kind of slave plate A sends out the purpose object that message is given the static state on the plate B, realizes the method for object communication between plate, it is characterized in that may further comprise the steps:
Set up when communication between plates module on the plate A starts on some skeleton objects and the plate B need be corresponding one by one with the purpose object of the static state of this board communications, in plate A, the skeleton object of static purpose object has just been arranged like this;
Static object C issues the static skeleton object of purpose object on plate A with message;
Plate A goes up the skeleton object intercepts messages of static purpose object, is processed into the communication between plates module that uniform data format sends to plate A;
The communication between plates module sends to plate B with data;
The communication between plates module of plate B judges whether the skeleton object of the static object C correspondence that sends message exists when communication line is received information, if there is no, and the skeleton object of dynamic creation static object C correspondence then;
The communication between plates module of plate B generates message, sends to static purpose object.
The static object of described each and other board communications is when analysing structure, and this static object will be nullified to the communication between plates module, and the communication between plates module sends to logout message on other plates, allows other plates delete the skeleton object of this static object correspondence;
If interrupted communication link, then the communication between plates module is deleted the skeleton object of all dynamic creations;
The method of the present invention and other communication between plates is compared advantage and is mainly contained:
Application programs design, no matter object somewhere, method for communicating all is the same, has really realized complete transparent;
The animated function of UML design tool can use, and is helpful to debugging.
Description of drawings
Fig. 1 is a schematic diagram of the present invention.
Fig. 2 is the startup flow chart of communication between plates module.
Fig. 3 is the communication flow diagram of communication between plates module.
Fig. 4 is the deleted flow chart of object that needs communication.
Fig. 5 is the process chart of communication disruption.
Fig. 6 is the communication between plates module instance figure that method of the present invention makes up.
Fig. 1 is principle figure of the present invention, the principle of an one-way communication of expression. Data are sent from object C, Pass through successively the skeleton object of Purpose object, the communication between plates module of plate A, the communication between plates of plate B Module arrives Purpose object then. If Purpose object will be sent out message and give object C, then need to be in plate B Set up the skeleton object of object C, and carry out opposite process.
Fig. 2 has illustrated the startup flow process of the communication between plates module of plate A, and the communication between plates module will be created when starting Build on other plates will with the skeleton object of the object of this board communications.
Fig. 3 has illustrated that the object C of slave plate A sends out the flow process that message is given the Purpose object of plate B, is to Fig. 1 Process flow represent.
Fig. 4 has illustrated the workflow that need to carry out when object is analysed structure. Because other plates were not when object was analysed structure Know, thus need the communication between plates module with object analyse other plates of structure message informing, make between the plate of other plates The communication module has an opportunity to delete its corresponding skeleton object.
Handling process when Fig. 5 has represented communication disruption. To delete all dynamic creations during communication disruption The skeleton object is because if real object corresponding to these skeleton objects analysed structure, in communication Can't notify this plate in the time of disconnected, will cause these skeleton objects forever can't delete.
Fig. 6 is communication between plates module making up of method of the present invention and the figure of skeleton object. Figure In, the object of application module sends to the skeleton object with the message of communication between plates, and then issues stub Object is transmitted to communication object, sends at last communication links and gives the other side; It then is fully opposite receiving Process.
Embodiment
Use method of the present invention, constructed a communication between plates module, details are as follows:
This embodiment uses the UML design tool Rhapsody of I-Logix company to develop.In programming, the skeleton object may be set up contact with various objects, so the data structure of each skeleton object is all inequality, can not represent with an object class.The message kind of receiving owing to the skeleton object can't be expected simultaneously, causes the skeleton object not express its logic with state diagram in Rhapsody.For these problems, the bottom storehouse OXF (Object executableFramework) to Rhapsody in the enforcement makes amendment, and the Message Processing of intercepting skeleton object is transmitted then.
Because carrying out communication between plates, the object of dynamic creation can bring a lot of problems, so only consider the communication between the static object of creating in this realization.These objects just create when program running begins, and the life cycle of life cycle and program is identical.If object has only an example, then can build up its corresponding skeleton object at the very start; If multi-instance object, with regard to its skeleton object of dynamic creation.
For the plate of each piece and this board communications, all corresponding unique stub object, it receives the skeleton object and transmits the message data of coming, be kept in the buffering area of oneself, and it is splitted into the small data frame, and send to communication objects such as Socket or RS232, send by them.If received by communication object by data, also pass to the stub object, be combined into message frame by it, be transmitted to the object of reception.
Static skeleton object is set up by application program oneself, because OXF is modified, the skeleton object can be distributed message function and give the adapter of communication between plates module when registration, new distribution function is not handled the system message of Framework Event and all ID<0, as timeout, startbehavior etc.
New message distribution function is handled two class message:
A) common message.For these message, the distribution function is combined into data-message (title can be taken as EV_DATA) according to message-length and issues the stub object,
B) elongated data-message.Sometimes need to send elongated data in the communication between plates, the way that generally sends elongated data is to add that in the data structure of message pointer transmits, and pointer is invalid on other plates.For this reason, defined elongated data-message EV_VARIANT specially, application program can send this message to the skeleton object, and the synthetic EV_DATA message of distribution group of functions is issued the stub object.
The stub object has a big buffering area, preserves the message that the skeleton object is sent, and little by little the information in the buffering area is divided into the small data frame then, adds and issues communication object, finishes transmission.If buffering area is full, then message abandons.When receiving Frame, the stub object is combined into message with it, sends to the skeleton object then.The meaning that the Stub object exists just is that it can shield the communication means of bottom, no matter is to adopt Socket or RS232, and the operation of Stub object is the same.
Communication object is finished real communication work, as transmitting-receiving of socket etc.When the transmission buffer empty of communication object, send out message informing stub object, send new packet to allow the stub object.
Realize the transparent forwarding of message, the distribution function must be known the length of message, this can only know when message establishing, so need generate the Memory Allocation process of revising message in the configuration at the code of Rhapsody, after finishing Memory Allocation message-length is inserted among the structure member.
In order to realize animation, Rhapsody has corresponding ARCEventClass object to each message, must create ARCEvent when receiving communication message between boards, but owing to only know message id this moment, do not know the ARCEventClass object that it is corresponding, can't create.This can solve like this:
A) code of revising Rhapsody generates the Memory Allocation process of revising message in the configuration, the title that this moment can recording messages.
B) when compile option has Rhaspody animation code, the initialization procedure meeting initialization ARCEventClass of bag, because its usefulness is grand, can revise macrodefinition, the pointer with message name and ARCEventClass object behind initialization ARCEventClass adds a mapping table.
C) when having the message between different boards data to transmit, search its corresponding ARCEventClass object according to message name, realize the transmission of message.
The inventive method uniqueness makes communication between plates transparent fully to the application program with UML design, and makes can debugging with animated function alternately of object between plate, has accelerated development progress, has reduced the possibility that makes a mistake.

Claims (4)

1. a method that realizes object communication between plate is used for embedded system, it is characterized in that may further comprise the steps at least:
To all need all to create with the static object of this board communications the object of a mapping on other plates in the program of this plate, be referred to as the skeleton object, corresponding one by one as needing on the intermediary that communicates by letter and other plates with the static object of this board communications;
Static object by this plate is issued the skeleton object of static object on this plate corresponding on other plates with message;
The skeleton object intercepts messages of corresponding static object is processed into the communication between plates module that uniform data format sends to this plate on other plates of creating on this plate;
The communication between plates module sends a message to other plates;
The communication between plates module of other plates judges whether the skeleton object of the static object correspondence that sends message exists when communication line is received message, and if there is no, then dynamic creation sends the skeleton object of the static object correspondence of message;
The communication between plates module of other plates generates message, sends to the static object on other plates.
2. the static object C on the slave plate A sends out the purpose object that message is given the static state on the plate B, realizes the method for object communication between plate, is used for embedded system, it is characterized in that may further comprise the steps:
Set up when communication between plates module on the plate A starts on some skeleton objects and the plate B need be corresponding one by one with the purpose object of the static state of this board communications, in plate A, the skeleton object of static purpose object has just been arranged like this;
Static object C issues the static skeleton object of purpose object on plate A with message;
Plate A goes up the skeleton object intercepts messages of static purpose object, is processed into the communication between plates module that uniform data format sends to plate A;
The communication between plates module sends a message to plate B;
The communication between plates module of plate B judges whether the skeleton object of the static object C correspondence that sends message exists when communication line is received message, if there is no, and the skeleton object of dynamic creation static object C correspondence then;
The communication between plates module of plate B generates message, sends to static purpose object.
3. the method for object communication between realization plate as claimed in claim 1 or 2, the static object that it is characterized in that described each and other board communications is when analysing structure, this static object will be nullified to the communication between plates module, the communication between plates module sends to logout message on other plates, allows other plates delete the skeleton object of this static object correspondence.
4. the method for object communication between realization plate as claimed in claim 1 or 2 is characterized in that if interrupted communication link, then communication module is deleted the skeleton object of all dynamic creations.
CNB021366500A 2002-08-21 2002-08-21 Method for implementing interplate object communication Expired - Fee Related CN100426808C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021366500A CN100426808C (en) 2002-08-21 2002-08-21 Method for implementing interplate object communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021366500A CN100426808C (en) 2002-08-21 2002-08-21 Method for implementing interplate object communication

Publications (2)

Publication Number Publication Date
CN1477839A CN1477839A (en) 2004-02-25
CN100426808C true CN100426808C (en) 2008-10-15

Family

ID=34146588

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021366500A Expired - Fee Related CN100426808C (en) 2002-08-21 2002-08-21 Method for implementing interplate object communication

Country Status (1)

Country Link
CN (1) CN100426808C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100382502C (en) * 2005-06-01 2008-04-16 华为技术有限公司 Serial-port mapping system for debugging single board

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1298508A (en) * 1998-02-26 2001-06-06 太阳微***公司 Downloadable smart proxies for performing processing associated with a remote procedure call in a distributed system
CN1330834A (en) * 1998-11-05 2002-01-09 Bea***公司 Smart stub or enterprise JAVA TM in distributed processing system
US20020023173A1 (en) * 1998-11-05 2002-02-21 Bea Systems, Inc. Duplicated naming service in a distributed processing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1298508A (en) * 1998-02-26 2001-06-06 太阳微***公司 Downloadable smart proxies for performing processing associated with a remote procedure call in a distributed system
CN1330834A (en) * 1998-11-05 2002-01-09 Bea***公司 Smart stub or enterprise JAVA TM in distributed processing system
US20020023173A1 (en) * 1998-11-05 2002-02-21 Bea Systems, Inc. Duplicated naming service in a distributed processing system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
用Java RMI实现网络远程测试. 陈宝莲.电子科技大学硕士学位论文. 2001
用Java RMI实现网络远程测试. 陈宝莲.电子科技大学硕士学位论文. 2001 *

Also Published As

Publication number Publication date
CN1477839A (en) 2004-02-25

Similar Documents

Publication Publication Date Title
US20020069400A1 (en) System for reusable software parts for supporting dynamic structures of parts and methods of use
DeLoach Multiagent systems engineering: a methodology and language for designing agent systems
EP1526457B1 (en) Context-aware automatic service discovery and execution engine in mobile ad-hoc networks
US20030005407A1 (en) System and method for coordination-centric design of software systems
US20070157155A1 (en) System and method for software generation and execution
CN109240835A (en) A kind of PLM system and ERP system interconnection method
KR20080064587A (en) Open framework system for heterogeneous computing and service integration
CN110717268B (en) Portable component unit packaging method based on FACE architecture
Kraemer et al. Aligning UML 2.0 state machines and temporal logic for the efficient execution of services
CN100426808C (en) Method for implementing interplate object communication
CN103763325B (en) Method for building IP security product development environment
Šišlák et al. A-globe: Agent platform with inaccessibility and mobility support
CN113743879A (en) Automatic rule processing method, system and related equipment
Karsai et al. A modeling language and its supporting tools for avionics systems
CN116680209A (en) WASM-based multi-intelligent contract instance management method
CN110413285A (en) Method for deploying cloud service and method for developing cloud service
CN113795001B (en) Method and device for sending system short message based on SPI
CN106598708A (en) Time-triggered embedded task communication device and method
CN107291455B (en) Method and system for realizing transfer service based on factory mode
Sgroi Platform-based design methodologies for communication networks
Schoeberl et al. tpip: A time-predictable tcp/ip stack for cyber-physical systems
EP1242900B1 (en) Inter process communication in a distributed processing system
CN113157251B (en) Resource servitization and customization method for man-machine-object fusion application
Acharya et al. Specifying a mobile computing application environment using rsl
Qin-cui et al. Implementation of IEC60870-5-104 protocol based on finite state machines

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081015

Termination date: 20140821

EXPY Termination of patent right or utility model