1254868 九、發明說明: 【發明所屬之技術領域】 本發明係關於通訊軟體開發之技術領域,尤指一種可 快速開發與測試通訊協定軟體之系統。 【先前技術】 目前在通訊軟體上開發的軟體基礎架構,僅提供與作 業系統無關(OS-Independent)的抽象層(Abstracti〇n 10 151254868 IX. Description of the Invention: [Technical Field of the Invention] The present invention relates to the technical field of communication software development, and more particularly to a system for rapidly developing and testing communication protocol software. [Prior Art] The software infrastructure currently developed on communication software only provides an OS-Independent abstraction layer (Abstracti〇n 10 15
Layer),或者是狀態機(StateMachine)的處理架構。對於測 試除,時,仍須額外開發許多輔助模組,因而增加軟體開 啦人貝的負擔。 又’在目前通訊軟體之發展上,時f需要考慮各層 序二)的執行緒切割方式,以及各模組的優先權高低順 但發生錯誤後,往往會造成很大的修改或移 軟體門广造成開發人員的困'憂。由是可知,習知通訊 权體開發之技術仍有諸多缺失而有予以改進之必要。 【發明内容】 通訊協:私月之主要目的係在提供-種可快速開發與測試 元測試疋整人;=統且俾能在不改變軟體架構下,進行單 容之下,了口 '“式,且亦可在不改變各軟體模組的實作内 :、,可=任意改變執行緒的配置。 協定叙目的,本發明之可快賴發與测試通訊 摩人體之糸統包括··多個軟體模組以及—訊息路由表。 20 1254868 每一軟體模組具有至少一執行單元,執行單元用以執行特 定流程的工作,執行單元具有:至少一元件;至少_訊息 處理,其為元件之介面;一訊息佇列,係用以收集來自 系、、’克中之元件所發出之訊息;一元件查詢表,記錄各個元 5件及其對應之sfl息處理器;及一訊息分派器,具有預定之 流程,其依據元件查詢表,而將訊息佇列中之訊息透過訊 息處理為、而分派至1的之元件。訊息路由表記錄了系統中 之兀件及其對應之訊息佇列,其中,元件係依訊息路由表 而將訊息發送至一訊息佇列,俾可將訊息送至目的之元件 10 以進行處理。 【實施方式】 有關本發明之可快速開發與測試通訊協定軟體之系 統,請先參照圖i所示之系統架構圖,其具有多個軟體模組 15 (M〇dule)l 1、一系統模組查詢表(8乂咖111111〇3111€匕匕1€)12、 及 Λ息路由表(Message routing table)13。其中,軟體模 組11為一概念性的包裝,是系統啟始的啟動單位,並是測 口式呀期的文測單位。每個軟體模組丨丨有四個由開發者實作 啟始(init)、啟動(start)、停止(stop)及清除 20 (cleanup),各個軟體模組u係由至少一執行單元 (Executive)lll所構成。系統模組查詢表12係記錄了系統中 之各個模組11與所具有之介面。 前述執行單元U1是用以執行特定流程的工作或執行 、、者(task/thread),每個執行單元111亦有四個預先設定之介 1254868 面·啟始(init)、啟動(start)、停止(st〇p)及清除(cieanup)。 前述執行單元ill係由下述所構成:元件(component)112、 訊息處理器(Message Handler)l 13、訊息佇列(message queue)l 14、元件查詢表(comp〇nent table)i 15、及訊息分派 5 器(message dispatcher) 116。 m述訊息路由表1 3記錄了系統中之元件112及其對應 之訊息佇列114。 前述元件112是系統運作的基礎元件,由開發者設計 其行為流程。 10 前述訊息處理器113為元件112之介面。 前述元件查詢表115紀錄在此執行單元n丨之各個元 件112及其對應之訊息處理器113。 前述訊息佇列114係用以收集來自系統中之元件112 所發出之訊息’其中’元件112係依訊息路由表13而將訊息 15發送至一訊息佇列114,俾可將訊息送至目的元件丨丨2以進 行處理。 rn述訊息分派器11 6具有預定之流程,其依據元件查 ό旬表115,而將訊息仵列114中之訊息透過訊息處理器! J 3 而分派至目的元件112 。 20 圖2說明以本發明之可快速開發與測試通訊協定軟體 之系統來進行測試之架構圖,其係以一測試代理模組(TeSt agent)21及其訊息佇列(message queue)22來接收外部測試 訊息’測試代理模組21將根據訊息路由表13而將訊息傳送 至目的元件112的訊息彳宁列114,目的元件112處理後將依訊 1254868 息路由表13將訊息傳送至其他目的元件,然而測試代理模 組21可修改訊息路由表13而將其他目的元件所對應之訊_ 佇列改為測試代理模組21之訊息佇列22,如此測試訊息可 回傳至該測試代理模組21以完成測試。 ^ 5 由以上之系統架構,不但可以方便進行測試,且由於 汛息分派崙π 6之流程已預設且元件查詢表115可簡單地嗖 定,因此,開發人員可專心在元件(c〇mp〇nent)之設計。: 外,上述系統架構也能彈性化調整,例如,若執行緒過多 而+致内文父換(context-switch)的動作頻繁,可能反而降 1〇低系統效能(performance),如圖3所示,可將不同執行單元 之元件112合併在同一執行單元U1中,反之,在相反之 情況下,也可將一執行單元ln之多個元件112分出至不同 的執仃皁元111,·又如圖4所示,假設執行單元1112的優先 f較執行單元11U為高,當元件e(>mpB須要處理大量訊息 ^可此會因為執打單兀1111的低優先權而導致訊息處理 不及而降低效能,此時可將類似狀況的元件集中並以另外 新的執行單元執行之,或者重新分配各個元件的執行緒配 置。 川6由上述之說明可知’本發明之可快速開發與測試通訊 協疋卓人體之系統可使得軟體在開發時即具有相當程度的模 組化關係。以上述的模組化方式,且不改變軟體架構,即 可進行單元測試、整合測讀、。 ^ 列式亦可在不改變各軟體模組的 貫作内容之下,可以任意改變執行緒的配置。 1254868 上述實施例僅係為了方便說明而舉例而已,本發明所 主張之權利範圍自應以申請專利範圍所述為準,而非僅限 於上述實施例。 【圖式簡單說明】 =圖本發明之可快速開發與測試通訊協定軟體之系統的 ^係以本發明之可快速開發與測試通 來進行測試之架構圖。 體之糸統 10 圖3顯示將不同勃^ σ — 一 意圖。 丁早①之儿件合併在同-執行單元之示 圖4說明於不同執行單元間調整元件之示意圖 【主要元件符號說明】 15 軟體模組h 元件112 訊息彳宁列114,2 2 訊息分派器丨i 6 訊息路由表j 3 執行單元 111,1111,1112 訊息處理器113 元件查詢表115 系統模組查詢表12 測試代理模組21 20Layer), or the processing architecture of the state machine (StateMachine). For the test, there are still a lot of additional auxiliary modules to be developed, thus increasing the burden on the software. In addition, in the development of current communication software, the f-cutting method of each layer must be considered, and the priority of each module is high, but after an error occurs, it often causes a large modification or a wide range of software. Caused the developer's sleepy worry. It can be seen that there are still many shortcomings in the development of the traditional communication rights and the need to improve. [Summary of the Invention] Communication Association: The main purpose of the private month is to provide a kind of rapid development and testing of meta-tests for the whole person; = and can not change the software architecture, under the single-capacity, the mouth '" The formula can also be used to change the configuration of the software module: Multiple software modules and message routing tables. 20 1254868 Each software module has at least one execution unit, the execution unit is used to perform the work of a specific process, the execution unit has: at least one component; at least _ message processing, which is a component interface; a message queue for collecting messages from the system, the components in the 'gram; a component lookup table, recording 5 pieces of each element and its corresponding sfl processor; and a message dispatch The device has a predetermined process for processing the message in the message queue into a component of the message by means of a message lookup table. The message routing table records the components in the system and their corresponding messages. The column, wherein the component sends the message to a message queue according to the message routing table, and the message can be sent to the component 10 for processing. [Embodiment] The rapid development and test protocol software for the present invention For the system, please refer to the system architecture diagram shown in Figure i, which has multiple software modules 15 (M〇dule) l 1 , a system module query table (8 乂 coffee 111111 〇 3111 € 匕匕 1 €) 12. The message routing table 13. The software module 11 is a conceptual package, which is a startup unit initiated by the system, and is a measurement unit of the mouth-of-mouth type. There are four modules in the system: init, start, stop, and cleanup. Each software module u is composed of at least one execution unit (Executive). The system module query table 12 records each module 11 in the system and the interface it has. The foregoing execution unit U1 is used to perform work or execution of a specific process, (task/thread), each execution Unit 111 also has four presets 12548 68. Init, start, stop (st〇p), and cieanup. The above execution unit ill is composed of: component 112, message handler (Message Handler) l 13. Message queue l 14. The component query table (comp〇nent table) i 15 and the message dispatcher 116. The message routing table 1 3 records the components 112 in the system. And its corresponding message queue 114. The aforementioned component 112 is the basic component of the system operation, and the developer designs its behavior flow. The aforementioned message processor 113 is the interface of the component 112. The aforementioned component lookup table 115 records the respective elements 112 of the execution unit n and its corresponding message processor 113. The aforementioned message queue 114 is used to collect messages from the component 112 in the system. The component 112 transmits the message 15 to a message queue 114 according to the message routing table 13, and the message can be sent to the destination component.丨丨 2 for processing. The rn message dispatcher 11 6 has a predetermined process for transmitting the message in the message queue 114 through the message processor according to the component lookup table 115! J 3 is assigned to the destination element 112. 20 FIG. 2 is a block diagram showing the test of the system for rapidly developing and testing the protocol software of the present invention, which is received by a test agent module (TeSt agent) 21 and a message queue 22 thereof. The external test message 'Test Agent Module 21 will transmit the message to the destination component 112 according to the message routing table 13 and the destination element 112 will process the message to the other destination component according to the message 1254. However, the test proxy module 21 can modify the message routing table 13 to change the message queue corresponding to other destination components to the message queue 22 of the test proxy module 21, so that the test message can be transmitted back to the test proxy module. 21 to complete the test. ^ 5 From the above system architecture, not only can the test be convenient, but since the process of suffocating π 6 is preset and the component query table 115 can be easily determined, the developer can concentrate on the component (c〇mp 〇nent) design. In addition, the above system architecture can also be flexibly adjusted. For example, if there are too many threads and the context-switch action is frequent, it may lower the performance of the system, as shown in Figure 3. It can be noted that the elements 112 of different execution units can be combined in the same execution unit U1. Conversely, in the opposite case, the plurality of elements 112 of an execution unit ln can be separated into different execution soap units 111, As shown in FIG. 4, it is assumed that the priority f of the execution unit 1112 is higher than the execution unit 11U. When the component e (>mpB needs to process a large number of messages), the message processing may be caused by the low priority of the execution unit 1111. Inferior to reduce performance, in this case, similar conditions can be concentrated and executed by another new execution unit, or the thread configuration of each component can be redistributed. Chuan 6 is explained by the above description 'The rapid development and testing of the present invention The system of communication protocol and human body can make the software have a considerable degree of modular relationship during development. In the above modular way, without changing the software architecture, unit testing and whole can be performed. The reading can be arbitrarily changed without changing the content of each software module. 1254868 The above embodiments are merely examples for convenience of explanation, and the claimed rights of the present invention The scope is based on the scope of the patent application, and is not limited to the above embodiments. [Simplified description of the drawings] = The system of the invention capable of rapidly developing and testing the protocol software can be quickly Develop and test the architecture diagram of the test. Figure 3 shows the different 勃 σ — an intention. The combination of Ding Zao 1 and the execution unit is shown in Figure 4. Schematic diagram of adjusting components [Key component symbol description] 15 Software module h Component 112 Message column 114, 2 2 Message dispatcher 丨 i 6 Message routing table j 3 Execution unit 111, 1111, 1112 Message processor 113 Component lookup table 115 System Module Query Table 12 Test Agent Module 21 20