Introduction
With the rapid development of mobile and Internet technologies, mobile networks will be the development trend of the Next Generation Network. Wireless sensor networks, one of the most important subnets of mobile networks, can greatly expand the Internet tentacles. Due to the low power consumption, low cost, distribution, and limited resources of wireless sensor networks, the development of protocols related to wireless sensor networks has become one of the key technical factors in the development of wireless sensor networks. The traditional software development method is obviously not suitable for the development of wireless sensor protocols, and the new development model is based on component-based software development.
The component-based SOFTWARE development (CBSD, comp onent-based SOFTWARE development) method is a development method that provides SOFTWARE reusability. A component is a basic unit used for software development, reuse, and assembly. In component-oriented technology, an application is described by a limited number of components instead of a large amount of code, as shown in 1 (. Different from traditional embedded software, componentized embedded software is composed of a group of software components. one or more of these components are combined into a complete application; new applications can also use existing components to improve software reusability. The embedded software developed in the traditional mode provides specialized services. The software and applications correspond one by one, as shown in 1 (B. The entire process involves a large amount of code, high complexity, low code reusability, and difficult to update, which does not meet the requirement of limited resources for wireless sensor nodes.
TinyOS is a component-based wireless sensor network operating system, which is itself a component library. The development language nesC provides technical support for software components. By flexibly assembling chip-level components with various fixed functions, you can easily build components of different hardware platforms. Therefore, the method for developing componentized wireless sensor protocols in TinyOS has been widely used. However, because developers rely too much on existing integration components, the Protocol Performance developed is not ideal.
Figure 1 componentized embedded software and traditional Embedded Software
1 description of existing development methods
To simplify developers' development, the system componentized components of each chip. Call the most basic functional interfaces provided by the underlying components of the hardware to combine and implement some functional modules, such as the preparation Chip Module, data transmission module, and data receiving module. The system's integrated operations on the hardware abstraction layer of each chip are basically the same. Figure 2 shows the relationship between the CC2420 system integration component and the calling of the hardware abstraction layer component.
Figure 2 Relationship between system integration components and hardware abstraction layer components
As shown in figure 2, the system integration component serves as a bridge to simplify development. However, the system integration component repeatedly calls the hardware abstract component to implement its own functions. The CC2420SpiC component is used in different layers (system integration layer and hardware abstraction layer), which makes the system integration layer and thing
Abstract layer relationships are blurred and complex, making development more difficult.
According to the component-based system programming, it is known that the interface of the calling component must implement the event in the interface component. If multiple components reuse the same interface of the same component, each component using this interface must execute the event once. When the system integration component calls the interface commands in the same hardware abstraction layer component at the same time, the signal event that completes the command notifies each component that uses this interface. This leads to a common programming problem in a componentized system: fan-out ). To solve this problem, the system had to change the component nature to the generic type. This introduces a new component call mode. All these make the call of the system integration component to the hardware abstraction layer component more complex than the actual, and the code execution efficiency is greatly reduced.