CN101719921B - Method for generating routing protocol component in software development of reconfigurable router - Google Patents
Method for generating routing protocol component in software development of reconfigurable router Download PDFInfo
- Publication number
- CN101719921B CN101719921B CN2009102504897A CN200910250489A CN101719921B CN 101719921 B CN101719921 B CN 101719921B CN 2009102504897 A CN2009102504897 A CN 2009102504897A CN 200910250489 A CN200910250489 A CN 200910250489A CN 101719921 B CN101719921 B CN 101719921B
- Authority
- CN
- China
- Prior art keywords
- component
- interface
- protocol
- bgp
- description
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域 technical field
可重构路由器软件开发中的构件生成方法,属于可重构网络研究领域。A component generation method in reconfigurable router software development belongs to the research field of reconfigurable networks.
背景技术 Background technique
面向服务提供的新型网络技术体系是未来互联网发展的可行思路,实现面向服务提供的新型网络技术体系的关键是研究开放式可重构路由交换节点技术。而开放式可重构路由交换节点技术的基础是平台化支撑下的构件化处理技术。首先定义处理的三个等级——平台、组件和构件,平台是可重构完成多种任务的系统,组件是可重构实现特定功能的单元,构件是可重构实施指定处理的模块。The new service-oriented network technology system is a feasible idea for the future development of the Internet. The key to realize the service-oriented new network technology system is to study the open reconfigurable routing and switching node technology. The basis of the open reconfigurable routing and switching node technology is the component processing technology supported by the platform. Firstly, three levels of processing are defined—platform, component and component. Platform is a system that can be reconfigured to complete various tasks, component is a unit that can be reconfigured to achieve specific functions, and component is a module that can be reconfigured to implement specified processing.
构件的生成、管理和测试是可重构路由交换软件开发环境的重要核心组成部分,是实现开放式可重构路由交换节点的重要支撑技术。该方法提供了基于构件的组件生成架构,可以方便、快捷地开发构件单元库。Component generation, management and testing are important core components of the reconfigurable routing and switching software development environment, and an important supporting technology for realizing open reconfigurable routing and switching nodes. This method provides a component-based component generation framework, which can develop component unit library conveniently and quickly.
可重构路由交换平台中的构件技术就是要让路由器设计、开发像机械制造工业一样,可以用各种标准和非标准的零件来进行组装,或者像建筑业一样,用各种建筑材料搭建成各式各样的建筑。路由交换系统构件化的目标是:可以由不同厂商、不同单位或个人提供、在不同操作系统或硬件平台上实现的功能构件,方便地、动态地集成为一个有机体。这些构件要求能互操作,实现路由交换功能的构件化是一种前沿的系统设计思想,对路由交换设备制造乃至整个网络行业的健康发展有着至关重要的推动作用。The component technology in the reconfigurable routing and switching platform is to make the router design and development like the machinery manufacturing industry, which can be assembled with various standard and non-standard parts, or like the construction industry, it can be built with various building materials. All kinds of buildings. The goal of componentization of routing and switching systems is to conveniently and dynamically integrate functional components that can be provided by different manufacturers, different units or individuals, and implemented on different operating systems or hardware platforms into an organism. These components are required to be interoperable. Realizing the componentization of routing and switching functions is a cutting-edge system design idea, which plays a vital role in promoting the healthy development of routing and switching equipment manufacturing and the entire network industry.
构件可以在不同的环境中使用,也可在同一环境中被复合使用,因此构件需要提供清楚的接口规范与对应环境进行交互。构件的封装、设计与外部表征尽量分离。构件对外发生作用或构件间的交互,都是通过规范定义的接口进行,构件使用者只需要知道构件的接口,而不关心其内部实现,这是设计与实现分离的关键。构件开发平台就应当提供构件交互的规则,并基于这些规则实现类似容器的标准环境。因此可以说,构件开发平台真正提供了与系统、与硬件、与环境隔离的构件开发模式。Components can be used in different environments, and can also be used in combination in the same environment, so components need to provide clear interface specifications to interact with the corresponding environment. Component encapsulation, design and external representation should be separated as much as possible. Components function externally or interact between components through the interface defined by the specification. Component users only need to know the interface of the component, and do not care about its internal implementation. This is the key to the separation of design and implementation. The component development platform should provide the rules of component interaction, and implement a container-like standard environment based on these rules. Therefore, it can be said that the component development platform truly provides a component development model that is isolated from the system, from the hardware, and from the environment.
构件开发平台的研制,关键在于研究当前和以后构件技术的发展,完成相关工作:系统需要什么样的构件,构件内部基本结构及扩展结构、基本属性及扩展属性,构件交互的方法,构件联接规则,构件存在的环境等。相应的支撑技术及体系结构就会在构件开发平台中有所体现。可重构路由交换开发环境体系结构如图1所示。The key to the development of component development platform is to study the current and future development of component technology and complete related work: what kind of components are needed in the system, internal basic structure and extended structure, basic attributes and extended attributes of components, methods of component interaction, and component connection rules , the environment in which the component exists, etc. The corresponding supporting technology and system structure will be reflected in the component development platform. Figure 1 shows the architecture of the reconfigurable routing and switching development environment.
本文提出基于构件的组件生成方法是应用于路由器软件的,主要是为了解决路由器的软件可剪裁与可重用的问题。由于当前的路由器厂家的路由器产品都是分系列的,各种不同的系列的功能有区别,反映到软件上就有较大的差别。但是,路由器开发者针对不同的路由器系列开发不同的路由器软件会耗费大量的人力物力。因此迫切的需要有一种方法能够使得软件的耦合度低,剪裁性好,代码的重用度高——即软件构件化。因此,本发明提出的软件构件的描述和生成方法就可以达到本目的。构件化以后的软件就可以便于剪裁和重新组合生成具有新功能的软件。This paper proposes that component-based component generation method is applied to router software, mainly to solve the problem of tailoring and reusability of router software. Because the router products of current router manufacturers are divided into series, the functions of different series are different, which is reflected in the software. However, it will consume a lot of manpower and material resources for router developers to develop different router software for different router series. Therefore, there is an urgent need for a method that can make software with low coupling, good tailoring, and high code reuse—that is, software componentization. Therefore, the description and generation method of the software component proposed by the present invention can achieve this purpose. The software after componentization can be easily tailored and reassembled to generate software with new functions.
路由协议构件BGP,即边界网关协议,是自主网络系统中网关之间交换路由信息的协议。BGP是为TCP/IP互联网设计的外部网关协议,用于多个自治域之间。它既不是基于纯粹的链路状态算法,也不是基于纯粹的距离向量算法。它的主要功能是与其他自治域的BGP交换网络可达信息。各个自治域可以运行不同的内部网关协议。BGP更新信息包括网络号/自治域路径的成对信息。自治域路径包括到达某个特定网络须经过的自治域串,这些更新信息通过TCP传送出去,以保证传输的可靠性。The routing protocol component BGP, namely Border Gateway Protocol, is a protocol for exchanging routing information between gateways in autonomous network systems. BGP is an exterior gateway protocol designed for TCP/IP Internet and used between multiple autonomous domains. It is neither based on a pure link state algorithm nor a pure distance vector algorithm. Its main function is to exchange network reachability information with BGP in other autonomous domains. Each autonomous domain can run different interior gateway protocols. The BGP update information includes the paired information of the network number/autonomous domain path. The autonomous domain path includes the autonomous domain strings that must pass through to reach a specific network, and these update information are sent out through TCP to ensure the reliability of transmission.
发明内容 Contents of the invention
本发明的目的在于:The purpose of the present invention is to:
提出路由软件中构件的描述和生成方法,主要是为了降低代码耦合性,加强模块的独立性,解决路由器软件可剪裁与可重用的问题,减少大量重复代码的编写工作。The method of describing and generating components in routing software is proposed, mainly to reduce code coupling, strengthen the independence of modules, solve the problem of tailoring and reusability of router software, and reduce the writing work of a large number of repetitive codes.
本发明的特征在于:The present invention is characterized in that:
所述方法是在vxworks平台为可重构路由交换平台中依照以下步骤实现的:The method is realized according to the following steps in the reconfigurable routing and switching platform on the vxworks platform:
步骤(1.):构件的描述,包括:构件接口规约的描述、构件行为的描述、构件外部特征的描述、构件基本静态信息的描述,以及构件环境的描述,其中:Step (1.): Component description, including: component interface specification description, component behavior description, component external feature description, component basic static information description, and component environment description, where:
步骤(1.1):构件接口规约的描述,包括:Step (1.1): Description of component interface specification, including:
步骤(1.1.1):构件输入接口的描述Step (1.1.1): Description of component input interface
构件输入接口反映环境为所述构件提供的服务,所述BGP路由协议构件的输入接口包括:The component input interface reflects the service provided by the environment for the component, and the input interface of the BGP routing protocol component includes:
BGP路由协议构件与TCP的Socket接口,以完成协议报文的接收,BGP routing protocol component and TCP Socket interface to complete the reception of protocol messages,
BGP路由协议构件与用户配置管理构件CFM的接口,以完成用户命令的配置,The interface between the BGP routing protocol component and the user configuration management component CFM to complete the configuration of user commands,
BGP路由协议构件与路由管理构件的接口,进行所述输入接口的细节描述,采用的消息格式为:源构件id,目的构件id,消息类型,路由表项1,、、、,路由表项N,The interface between the BGP routing protocol component and the routing management component is described in detail of the input interface, and the message format adopted is: source component id, destination component id, message type, routing table item 1,,,,, routing table item N ,
步骤(1.1.2):构件输出接口的描述Step (1.1.2): Description of component output interface
构件的输出接口反映构件为环境提供的服务,所述BGP路由协议构件的输出接口包括:The output interface of the component reflects the service provided by the component for the environment, and the output interface of the BGP routing protocol component includes:
BGP路由协议构件与TCP的Socket接口,以完成协议报文的发送,BGP routing protocol component and TCP Socket interface to complete the sending of protocol messages,
BGP路由协议构件与用户配置管理构件CFM的接口,以完成配置结果的返回,采用的配置消息的接口消息为:源构件id,目的id,消息类型,消息长度,配置信息1,、、、,配置信息M,The interface between the BGP routing protocol component and the user configuration management component CFM is used to complete the return of configuration results. The interface messages of the configuration message used are: source component id, destination id, message type, message length, configuration information 1,,,,, Configuration information M,
步骤(1.2):构件行为的描述,包括:Step (1.2): Description of component behavior, including:
接口中服务调用次序的约束,Constraints on the order of service calls in the interface,
构件的并发性约束:该构件的服务是否接受并发访问、有无需要互斥访问的数据和服务,Component concurrency constraints: whether the component's services accept concurrent access, whether there are data and services that require mutually exclusive access,
在服务的处理过程中产生异常的条件以及各种异常的处理,Abnormal conditions and various exception handling during the processing of the service,
步骤(1.3):构件的外部特征的描述,包括:Step (1.3): Description of the external characteristics of the component, including:
构件对外的协议报文的收发要求:报文格式以及收发的触发条件,Requirements for sending and receiving external protocol messages of components: message format and trigger conditions for sending and receiving,
构件对外的时限要求,至少包括:满足协议状态机的各种定时器的时长和超时后的处理步骤,External time limit requirements of components, at least including: satisfying the duration of various timers of the protocol state machine and the processing steps after timeout,
构件对外部的受控制性,至少包括:构件接受何种形式和格式的配置信息的输入,以及配置时的反馈信息,The controllability of the component to the outside, at least includes: the form and format of configuration information input that the component accepts, and the feedback information during configuration,
步骤(1.4):构件的环境的描述,至少包括:操作系统和硬件平台以及编译器和已有链接,Step (1.4): A description of the environment of the component, including at least: the operating system and hardware platform as well as the compiler and existing links,
步骤(1.5):构件的基本静态信息的描述,包括:构件标识ID,所述BGP路由协议的构件,BGP协议号标识、构件名称、构件类型、构件对外提供所有服务和操作的描述、接口描述、构件约束;Step (1.5): Description of the basic static information of the component, including: component identification ID, component of the BGP routing protocol, BGP protocol number identification, component name, component type, description of all services and operations provided by the component externally, and interface description , component constraints;
步骤(2):构件生成Step (2): Component Generation
步骤(2.1):编码实现构件功能Step (2.1): Coding to realize component functions
步骤(2.1.1):从元构件库中选取组成构件所需的元构件,至少包括:路由表项二叉树、链表和消息队列,Step (2.1.1): select the required meta-components from the meta-component library, at least including: routing table entry binary tree, linked list and message queue,
步骤(2.2.2):为所要实现的构件命名,Step (2.2.2): Name the component to be realized,
步骤(2.1.3):根据配置对所选择的元构件代码进行修改,打包至所要生成的构件中,Step (2.1.3): Modify the selected meta-component code according to the configuration, and pack it into the component to be generated,
步骤(2.2):对构件接口进行编码,Step (2.2): Code the component interface,
步骤(2.3):编译步骤(2.1)和步骤(2.2)中产生的代码,生成可执行的目标文件,Step (2.3): compile the code generated in step (2.1) and step (2.2), generate an executable target file,
步骤(2.4):把步骤(2.2)得到的构件放入构件库中,把构件的组成文件拷入指定目录,并在构件表中加入该构件。Step (2.4): Put the component obtained in step (2.2) into the component library, copy the component file into the specified directory, and add the component to the component table.
当所述元构件库中没有所要开发的构件的元构件时则:首先对所要实现的构件命名,其次,再自主定义各接口功能。When there is no meta-component of the component to be developed in the meta-component library: firstly name the component to be realized, and secondly define each interface function independently.
本发明在生成构件的过程中,具有编码工作量少,耦合程度低,集成性好,代码重用度高的优点。开发组件的周期比较短。In the process of generating components, the invention has the advantages of less coding workload, low coupling degree, good integration and high code reuse. The development cycle of components is relatively short.
附图说明 Description of drawings
图1.可重构路由交换开发环境体系结构示意图。Figure 1. Schematic diagram of the architecture of the reconfigurable routing and switching development environment.
图2.构件开发步骤示意图。Figure 2. Schematic diagram of component development steps.
图3.BGP协议构件与路由管理构件的接口消息格式。Fig. 3. Interface message format of BGP protocol component and routing management component.
图4.BGP协议构件与用户配置管理构件的接口消息格式。Fig. 4. Interface message format of BGP protocol component and user configuration management component.
图5.BGP协议构件与设备管理构件的接口消息格式。Figure 5. Interface message format of BGP protocol component and device management component.
具体实施方式 Detailed ways
基于可重构路由器软件开发环境,结合路由协议BGP构件的生成,按照如下步骤和功能需求实现了构件的生成和管理:Based on the reconfigurable router software development environment, combined with the generation of routing protocol BGP components, the generation and management of components are realized according to the following steps and functional requirements:
步骤(1.):构件的描述Step (1.): Description of the component
构件描述是构件检索技术的基础,构件描述同时也为构件的复用者提供了理解构件,使用构件的手段。在构件管理中,构件描述起着非常重要的作用,构件的开发平台必须通过构件的描述文件来理解构件从而对构件进行管理,提高构件之间的互操作性。Component description is the basis of component retrieval technology. Component description also provides a means for component reusers to understand and use components. In component management, component description plays a very important role. The component development platform must understand components through component description files to manage components and improve the interoperability between components.
步骤(1.1):构件接口规约的描述:Step (1.1): Description of component interface specification:
需要描述构件的输入接口与输出接口。构件的输入接口代表了环境为它提供的服务,输出接口代表了它为环境提供的服务。构件的输入、输出接口决定了构件之间的连接。It is necessary to describe the input interface and output interface of the component. The input interface of a component represents the services provided by the environment, and the output interface represents the services it provides to the environment. The input and output interfaces of components determine the connection between components.
步骤(1.1.1):描述构件的输入接口:Step (1.1.1): Describe the input interface of the component:
包括接口类型以及接口细节。其中接口类型包括消息、管道、信号量、信号、共享全局变量等。接口细节描述就是要描述清楚所使用类型接口的具体格式定义,如消息类型接口的消息格式。Including interface type and interface details. The interface types include messages, pipes, semaphores, signals, and shared global variables. The detailed description of the interface is to clearly describe the specific format definition of the type of interface used, such as the message format of the message type interface.
BGP构件的输入接口包括:The input interfaces of BGP components include:
a.BGP协议构件与TCP的Socket接口,以完成协议报文的接收。a. BGP protocol component and TCP Socket interface to complete the reception of protocol messages.
b.BGP协议构件与用户配置模块的接口,以完成用户命令配置。b. The interface between the BGP protocol component and the user configuration module to complete the user command configuration.
命令举例:Command example:
Router bgp as mum开启bgp构件 Router bgp as mum enables the bgp component
Neighbor ip remote as mum配置bgp邻居 Neighbor ip remote as mum configure bgp neighbor
c.BGP协议构件与路由管理构件的接口,以接收路由管理模块的路由更新信息。以BGP协议构件与路由管理构件的接口为例,进行输入接口细节描述(见附图3):c. The interface between the BGP protocol component and the routing management component to receive the routing update information of the routing management module. Taking the interface of the BGP protocol component and the routing management component as an example, carry out the detailed description of the input interface (see accompanying drawing 3):
步骤(1.1.2):描述构件输出接口的方法同1.1.1。Step (1.1.2): The method of describing component output interface is the same as 1.1.1.
BGP构件的输出接口包括:The output interfaces of BGP components include:
a.BGP协议构件与TCP的Socket接口,以完成协议报文的发送。a. The BGP protocol components interface with the TCP Socket to complete the sending of the protocol message.
b.BGP协议构件与用户配置管理构件的接口,以完成配置结果的返回。b. The interface between the BGP protocol component and the user configuration management component to return the configuration result.
c.BGP协议构件与路由管理构件的接口,将路由信息发送给路由管理构件,完成对全局路由表的路由更新。c. The interface between the BGP protocol component and the routing management component sends the routing information to the routing management component to complete the routing update of the global routing table.
下面以BGP协议构件与配置管理构件CFM的接口为例,进行输出接口细节描述。The following takes the interface between the BGP protocol component and the configuration management component CFM as an example to describe the details of the output interface.
配置信息的接口消息(见附图4):Interface message of configuration information (see Figure 4):
接口信息的消息接口(见附图5):Message interface of interface information (see accompanying drawing 5):
步骤(1.2):描述构件行为。包括如下几点的描述:Step (1.2): Describe component behavior. Include a description of the following points:
●接口中服务调用次序的约束;● Constraints on the order of service calls in the interface;
●构件的并发性约束:它的服务是否接受并发访问;有无需要互斥访问的数据和服务,如果有,罗列出来。● Concurrency constraints of components: whether its services accept concurrent access; whether there are data and services that require mutually exclusive access, and if so, list them.
●在服务的处理过程中产生异常的条件以及各种异常的处理。●Exceptional conditions and handling of various exceptions during service processing.
步骤(1.3):描述构件的外部特征。Step (1.3): Describe the external characteristics of the component.
步骤(1.3.1):描述构件对外的协议报文的收发要求:包括的具体内容是报文格式以及收发的触发条件。Step (1.3.1): Describe the sending and receiving requirements of the component's external protocol messages: the specific content included is the message format and the triggering conditions for sending and receiving.
步骤(1.3.2):描述构件对外的时限要求,主要包括满足协议状态机的各种定时器的时长和超时后的处理步骤。Step (1.3.2): Describe the external time limit requirements of the component, mainly including the duration of various timers satisfying the protocol state machine and the processing steps after timeout.
步骤(1.3.3):描述构件对外部的受控制性,主要包括构件接受何种形式和格式的配置信息的输入,以及配置时的反馈信息。Step (1.3.3): Describe the controllability of the component to the outside, mainly including the form and format of configuration information input that the component accepts, and the feedback information during configuration.
步骤(1.4):描述构件的环境。此处指构件所处的大的软件环境,包括操作系统和硬件平台,还包括编译器和已有的链接库等。Step (1.4): Describe the environment of the component. Here it refers to the large software environment where the component is located, including the operating system and hardware platform, as well as the compiler and the existing link library.
步骤(1.5):整理构件的基本静态信息,包括如下具体细节:Step (1.5): Organize the basic static information of the components, including the following specific details:
●构件标识(ID):系统中的唯一标识。●Component identification (ID): unique identification in the system.
基于各协议号唯一,可用协议号标识路由协议构件。Based on the uniqueness of each protocol number, the routing protocol component can be identified by the protocol number.
●构件名称。● Component name.
路由协议BGP构件直接命名为“构件BGP”。The routing protocol BGP component is directly named "component BGP".
●构件类型(基础\业务)。●Component type (basic\business).
BGP构件类型为路由协议。The BGP component type is a routing protocol.
●构件功能描述:该构件对外提供的所有服务(功能)、操作的描述。●Component function description: description of all services (functions) and operations provided by the component.
BGP提供的主要功能,一是基于自身的算法,生成并维护一个路由表供路由管理模块使用,另一个是向其它自治系统发布该自治系统的网络可达信息,The main functions provided by BGP are: one is to generate and maintain a routing table based on its own algorithm for use by the routing management module; the other is to publish the network reachability information of the autonomous system to other autonomous systems,
●接口描述。●Interface description.
■提供给其他构件或程序使用的接口■ Interfaces provided to other components or programs
接口名称(参数列表):返回值(包括异常)。interface name (parameter list): return value (including exceptions).
要启用BGP协议,系统需要调用BGP构件提供给系统的接口函数bgp_open(),该函数参数为空,返回值为int类型,成功启动返回0,启动失败返回1。To enable the BGP protocol, the system needs to call the interface function bgp_open() provided by the BGP component to the system. The parameter of this function is empty, and the return value is int type. It returns 0 for successful startup and 1 for startup failure.
■要求其他程序或构件支持的接口。■ Interfaces that require support from other programs or components.
BGP要求系统提供定时器,消息处理等系统调用,还要求通过TCP收发消息。BGP requires the system to provide system calls such as timers and message processing, and also requires sending and receiving messages through TCP.
●构件约束(语义描述):如一个操作只有在某一性质落在指定范围内才可调用,一个操作必需在另一方个操作调用后调用等。●Component constraints (semantic description): For example, an operation can only be called if a certain property falls within the specified range, and an operation must be called after another operation is called.
BGP在建立socket连接时,listen与connet等操作需在bind操作之后进行。When BGP establishes a socket connection, operations such as listen and connet must be performed after the bind operation.
●其它构件特性:●Other component characteristics:
■有无状态,能否服务多个客户程序。■With or without state, whether it can serve multiple client programs.
■部署描述:部署的限制条件。如组件运行的操作系统、所需空间等。■ Deployment description: the constraints of deployment. Such as the operating system the component runs on, the required space, etc.
■定制能力:定制构件可以提供的服务。■Customization ability: customize the services that components can provide.
■构件维护者信息(姓名\创建日期)。■Component maintainer information (name\creation date).
■构件版本。■ Component version.
步骤(2):构件的生成Step (2): Generation of components
步骤(2.1):编码实现构件的功能,主要可通过以下两种方式:Step (2.1): Code to realize the function of the component, mainly in the following two ways:
●方式一:开发者可以利用元构件库中的元构件来组成构件,过程如下●Method 1: Developers can use the meta-components in the meta-component library to compose components, the process is as follows
■选取组成构件所需的元构件■ Select the meta-components required to make up the component
■为所要实现的构件命名■Name the component to be realized
■选取构件框架和模板■Select component framework and template
■系统根据开发者的选择配置,将选择的元构件代码进行部分修改(包括文件名修改,makefile修改,工程文件修改等),打包至所要生成的构件的工程中■The system partially modifies the selected component code according to the developer's choice and configuration (including file name modification, makefile modification, project file modification, etc.), and packages it into the project of the component to be generated
■开发者对系统自动由配置生成的代码进行编辑■The developer edits the code automatically generated by the system from the configuration
●方式二:如果元构件库中并没有符合所要开发的构件的元构件,则开发者可以完全自主式开发构件入库●Method 2: If there is no meta-component that meets the component to be developed in the component component library, the developer can completely independently develop the component into the library
■为所要实现的构件命名■Name the component to be realized
■开发者自主定义各接口功能■Developers independently define the functions of each interface
步骤(2.2):根据步骤1的描述编码实现构件的接口Step (2.2): According to the description of step 1, code to realize the interface of the component
步骤(2.3):编译上述两步产生的代码,生成可执行的目标文件Step (2.3): Compile the code generated in the above two steps to generate an executable object file
步骤(2.4):将构件放入构件库中,即将构件的组成文件拷入指定目录,并在构件表中加入该构件。Step (2.4): Put the component into the component library, that is, copy the constituent files of the component into the designated directory, and add the component into the component table.
步骤(3):构件测试;Step (3): component testing;
在经过上述步骤生成构件后,需要进行构件测试。After the components are generated through the above steps, component testing is required.
步骤(3.1):构件接口功能测试;Step (3.1): component interface function test;
针对一个单独的构件,对该构件描述中定义的接口进行的数据传递与接收进行测试,保证数据有被正确的传递与接收以及在正确接收到数据后,对数据的处理与最终产生的结果数据符合预期。For a single component, test the data transmission and reception of the interface defined in the component description to ensure that the data is correctly transmitted and received, and after the data is received correctly, the data is processed and the final result data is generated In line with expectations.
针对bgp构件,具体如下:For bgp components, the details are as follows:
构件bgp是否能够通过接收到配置管理构件CFM的配置命令信息而执行相应的动作。例如配置bgp开始运行并且邻居配置好以后,bgp构件能否与所配邻居建立tcp连接并进行路由学习过程。Bgp收到路由后能否正常处理,能否争取保存路由并讲路由信息以步骤1.1.1中规定的格式交给路由管理构件。Whether the component bgp can execute corresponding actions by receiving the configuration command information of the configuration management component CFM. For example, after the bgp is configured to start running and the neighbors are configured, can the bgp component establish a tcp connection with the configured neighbors and carry out the route learning process. Whether Bgp can process normally after receiving the route, whether it can strive to save the route and deliver the route information to the route management component in the format specified in step 1.1.1.
步骤(3.2):构件功能测试;Step (3.2): component function test;
对于开发完成的构件,对本构件应有的功能进行测试。保证构件的功能符合对构件功能的描述。For the developed components, test the functions that the components should have. Ensure that the function of the component conforms to the description of the function of the component.
针对bgp构件,具体的构件功能测试为:测试BGP构件是否从其他bgp对等体学到的路由,其他对等体是否从本机的bgp协议学得了路由,本机的bgp构件是否将学得的路由正确的交给了路由管理构件。For the bgp component, the specific component function test is: test whether the BGP component has learned the route from other bgp peers, whether other peers have learned the route from the local bgp protocol, and whether the local bgp component will learn The routing is correctly handed over to the routing management component.
步骤(3.3):构件性能测试;Step (3.3): component performance test;
对于能够正确完成功能的构件,需要对构件的运行时间,占用内存,处理器等情况进行测试。如果测试结果符合预期,则通过。For components that can complete functions correctly, it is necessary to test the running time, occupied memory, processor, etc. of the components. Pass if the test results are as expected.
针对bgp构件,可以进行压力测试:向该构件压入100000条路由信息的时候,查看bgp构件是否有丢失路由的情况,查看bgp构件是否将所有学得的路由都正确交给了路由管理构件。For the bgp component, a stress test can be performed: when 100,000 pieces of routing information are pushed into the component, check whether the bgp component has lost routes, and check whether the bgp component has correctly handed over all learned routes to the routing management component.
传统的路由器软件开发在适应新需求的时候,都要进行大量的重复代码编写的工作。而且对于现有的代码的重用方面,做的并不十分理想。采用软件构件化的方法,可以一定程度上提高代码重用度及提高效率。When traditional router software development adapts to new requirements, a lot of repetitive code writing is required. And for the reuse of existing code, it is not very ideal. Using the method of software componentization can improve code reuse and efficiency to a certain extent.
在严格按步骤1,2,3执行后,就可以得到一个功能完善耦合度低的软件构件。After strictly following steps 1, 2, and 3, a software component with complete functions and low coupling can be obtained.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102504897A CN101719921B (en) | 2009-12-10 | 2009-12-10 | Method for generating routing protocol component in software development of reconfigurable router |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102504897A CN101719921B (en) | 2009-12-10 | 2009-12-10 | Method for generating routing protocol component in software development of reconfigurable router |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101719921A CN101719921A (en) | 2010-06-02 |
CN101719921B true CN101719921B (en) | 2012-05-23 |
Family
ID=42434436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009102504897A Expired - Fee Related CN101719921B (en) | 2009-12-10 | 2009-12-10 | Method for generating routing protocol component in software development of reconfigurable router |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101719921B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101950269B (en) * | 2010-08-30 | 2012-09-05 | 清华大学 | Automatic test method for software members |
CN101977160B (en) * | 2010-11-30 | 2012-08-22 | 中国人民解放军信息工程大学 | Reconfigurable method for routing protocol software components in reconfigurable route switching platform |
CN103685015B (en) * | 2013-12-17 | 2016-08-17 | 清华大学 | The expandable route task allocating method of Component-Based Development |
CN104539506A (en) * | 2015-01-27 | 2015-04-22 | 浪潮集团有限公司 | Network transmission service component and network transmission system |
CN105119836B (en) * | 2015-09-14 | 2018-03-30 | 上海红神信息技术有限公司 | A kind of routing protocol component dynamic operation method based on state pool |
CN108008977B (en) * | 2017-12-27 | 2021-01-15 | 遵义职业技术学院 | Software development service platform oriented to function outsourcing |
CN108170405B (en) * | 2017-12-27 | 2021-01-19 | 遵义职业技术学院 | Software development scheme generation method oriented to business variables |
CN109361710B (en) * | 2018-12-14 | 2021-03-09 | 中国人民解放军战略支援部队信息工程大学 | A security protocol reconstruction method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1556641A (en) * | 2004-01-01 | 2004-12-22 | 浙江大学 | Component-based Realization Method of Communication Protocol |
CN101442442A (en) * | 2008-12-17 | 2009-05-27 | 华为技术有限公司 | Management apparatus, control apparatus, management control apparatus and router system |
-
2009
- 2009-12-10 CN CN2009102504897A patent/CN101719921B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1556641A (en) * | 2004-01-01 | 2004-12-22 | 浙江大学 | Component-based Realization Method of Communication Protocol |
CN101442442A (en) * | 2008-12-17 | 2009-05-27 | 华为技术有限公司 | Management apparatus, control apparatus, management control apparatus and router system |
Non-Patent Citations (2)
Title |
---|
贾凤根,王伟明,丁丞.支持IPv4_IPv6的可重构路由器构件化建模技术研究.《信息工程大学学报》.2009,第10卷(第1期), * |
陈文龙,徐恪,徐明伟,杨扬.基于构件的可重构路由开发环境.《信息工程大学学报》.2009,第10卷(第1期), * |
Also Published As
Publication number | Publication date |
---|---|
CN101719921A (en) | 2010-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101719921B (en) | Method for generating routing protocol component in software development of reconfigurable router | |
Meyer et al. | Automating data exchange in process choreographies | |
JP2007157149A (en) | Ubiquitous computing application assembly model and assembly verification algorithm | |
CN111913721B (en) | Automatic deployment method, device, equipment and storage medium | |
Riedel et al. | Using web service gateways and code generation for sustainable IoT system development | |
Kraemer et al. | Automated encapsulation of UML activities for incremental development and verification | |
Jan et al. | Flex‐eWare: a flexible model driven solution for designing and implementing embedded distributed systems | |
Abouzaid et al. | A calculus for generation, verification and refinement of bpel specifications | |
Iglesias-Urkia et al. | Enabling easy Web of Things compatible device generation using a Model-Driven Engineering approach | |
Hackmann et al. | Extending BPEL for interoperable pervasive computing | |
Alberti et al. | A novagenesis proxy/gateway/controller for openflow software defined networks | |
CN117560380B (en) | A data pragmatic extraction system based on smart contracts | |
Bocchi et al. | From BPEL to SRML: a formal transformational approach | |
Brogi et al. | A service-oriented model for embedded peer-to-peer systems | |
Dalibor et al. | Tagging Model Properties for Flexible Communication. | |
CN116094919A (en) | Communication network operation method, device and system and electronic equipment | |
Mena et al. | Assembling the Web of Things and Microservices for the Management of Cyber-Physical Systems. | |
Schwerdel et al. | A building block interaction model for flexible future internet architectures | |
Mordinyi et al. | Foundations for a model-driven integration of business services in a safety-critical application domain | |
Tan et al. | Dynamically loadable protocol stacks-a message parser-generator implementation | |
Singh et al. | Flexible service oriented network architecture for wireless sensor networks | |
Thramboulidis et al. | Towards a service-oriented IEC 61499 compliant engineering support environment | |
Fernando | Designing Microservices Platforms with NATS: A modern approach to designing and implementing scalable microservices platforms with NATS messaging | |
De et al. | Semantic Synergy Exploration in Interface Description Models of Heterogeneus Vehicle Frameworks: Towards Automotive Meta Interface Description Model | |
Jahed | Automatic Distribution and Cloud-Native Deployment of Executable Component and Connector Model |
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: 20120523 Termination date: 20181210 |
|
CF01 | Termination of patent right due to non-payment of annual fee |