Face the component development approach of the wireless sensory network
Look over in the resent 90 days adding the desk-top instrument of the new product makes perfectly up most: Interconnect intelligence and debug the latest electronic devices and components materials and download and send Rui electronic TI lottery-attached question and answer – send 3D car mouse ultralow noise DC/DC miniature module LTM4606/12IR free easily Introduce, adopt metallic car grades of insulated-gate bipolar transistor accord with the intersection of balancer and global electronic the intersection of interface unit and manufacturer of human engineering and samtec newest circuit breaker protect weld, brand of boot Tektronix global ondoscope first
Summary: The component development mode makes developers fully transfer in the component storehouse in the course of developing the Off-The-Shelf component serve it. Develop modal method and characteristic, direct against the defect in the wireless sensor network protocol development approach at present after studying the component, propose one is adjusted the usage by directness of the component of component direct call bottom layer of application layer. Analyze that has realized IEEE802.15.4 standard of the mainstream in the wireless sensor network with this method, the test after passing system implementation proves, this scheme has more high development efficiency and codes that carry out efficiency.
Foreword
With moving technology and technical development at full speed of Internet, the mobile network will be the main trend of development of Next Generation Network. And the one of the important subnet of the mobile networks wireless sensor network can expand the feeler of Internet greatly. Because wireless sensor network low power consumption, low-cost, distributed and such characteristics as resources are limited, one of the critical technology factors that makes it become development of wireless sensor network to develop the relevant agreement of the wireless sensor network. The traditional software development approach has not obviously already been fit for the development of the wireless sensor agreement, and the new development mode that has risen recently is the software development approach based on component.
Software development (CBSD, comp onent-based software development) on the basis of the component The method is a development approach that can offer the software reusability. The component is used for carrying on software development, multiplexes and the composing basic cell of software. In the technology facing component, a application software is not described through a large number of codes, but describe through the definite component of quantity. Different from traditional embedded software, the component embedded software is formed by a series of software components, one or several of these components make up an intact application; And new application can have been used and already had components, thus raise the software reusability. What the embedded software developed out under the traditional mode offered is specialized service, software and application are one-one. Take the place of big codes quantity in the whole course, complexity is high, the code is small, and upgrade the difficulty, definite requirement of nodal resource of wireless sensor of the inadaptation.
TinyOS is a kind of network operating system of wireless sensor based on component, this system is a component storehouse. Its development language nesC has offered the support to component technology of the software. Can put up and build up one grade of components of different hardware platforms conveniently through the flexible chip level component which assembles each fixed function. So the method to develop the component wireless sensor agreement under TinyOS system has already been used extensively. However, because the developer excessively depends on the Off-The-Shelf integrated component at present, lead to the fact that it is unsatisfactory to develop the agreement characteristic out. Embedded software and traditional embedded software on component of Fig. 1
An existing development approach is described
The system, in order to simplify the developer’s difficulty of development, has carried on component packaging to the bottom layer component of every chip. Transfer the most basic functional interface that the component of bottom layer of hardware offered, to make up and realize some function module, such as formulate chip module, sending the data module, receiving the data module,etc.s. System pair every the intersection of hardware and abstraction layer of chip integrate, it operates to be uniform basically, 2 Fig. whether the intersection of CC2420 and the intersection of department and integrated component transfer the intersection of hardware and the intersection of abstraction layer and relation of component. The component of system integration of Fig. 2 and component relation of abstraction layer of hardware
Can be found out by Fig. 2, the system integration component plays a function served as bridge, make developers simplify the development. However, the system integration component is adjusting and transferring the question repeatedly while realizing by abstract component of the hardware one’s own function. And the component CC2420SpiC is on different floor (system integration floor and hardware abstraction layer) Have, use, itself this make system integration layer and thing
Become fuzzy and complicated to pay attention to the abstraction layer relation, strengthen developers and develop the difficulty.
Knowing according to component systematic programming, the interface which transfers the component needs to realize that offer event incident in the interface component. If a plurality of components reuse the same interface of the same component, each component which use this interface needs to carry out event incident in this interface once. It is at hardware abstraction layer component been identical in system integration component simultaneous call at the time of interface command, finishing signal incident of the order will notify each component which uses this interface. This causes the component to make the programming Q&A systematically: Fan-out (fan-out) . The system has to change component properties into generic type in order to solve this problem. And this will introduce the new component and transfer the mode. All these things make the system integration component become more complicated to the call on component of abstraction layer of the hardware than actually, the execution efficiency of the code is reduced greatly.
2 direct call bottom layer component methods are described
Transfers the hardware abstraction layer component while transferring the system integration component finally in the finding on component to system integration, the component of the application layer, but system integration component integration get some loud integrated component again the intersection of hardware and the intersection of abstraction layer and component, help users look for the interface. In fact, because such characteristics as embedded software and hardware associative property high, hardware resource are limited, in order to make the system performance of software reach the highest, the embedded software developer has already very familiar with the hardware been before development. Is it in this case unnecessary to be rigid to add the systematic abstraction layer to above the intersection of hardware and abstraction layer. As to developer, the component of bottom layer hardware abstraction layer of direct call will be more ocular, more simple.
Concrete implement method, can stride the whole system integration component in the component conductor arrangement of conductor arrangement at time at the component not introducing the new function in the component is operated, will not influence the system function, and can simplify the development process and raise operating efficiency. Abbreviated this method as to adjust the usage directly as follows. Course that the component of Fig. 3 is simplified
The component 1 and component 2 do not offer the component of functions of the bottom in Fig. 3, they carry on integration again on bottom layer component 3, the component 4 and component 5, it was the component 3, function on the component 4 and component 5 that used finally. So pass after the improvement in the scheme, let, employ the intersection of component and direct call component 3, the component 4 and component 5, let the function on the component 1 and component 2 give and employ the component to finish, raise the execution efficiency of the code and develop efficiency like this. In fact, it is knowing to combine the component system, the simple course of Fig. 3 has solved the fan and gone wrong, employ the component to only transfer an hardware abstraction layer component, can transfer the interface China command that the abstract component of the hardware offered any required place in employing the component. The intersection of conductor arrangement and whom component change too during conductor arrangement simple, have system integration a plurality of the intersection of hardware and the intersection of abstraction layer and component mix wire operation repeatedly in the component.
Research and analyse component system and hardware abstract component and every concrete chip of bottom layer knowingly, the system integration component plays an above-mentioned role, while introduce the new problem. If the developer is familiar with the abstract component of the hardware, can well stride the system integration component and use the component that the hardware abstraction layer will offer directly. Simplify the miscellaneous transferring the relation between the system integration components in the original scheme in this way, the more important thing is that be able to raise the operating efficiency of the system greatly, take CC2420 system integration component as examples, it component improve, transfer the scheme: Fig. 4 improves the relation between the component in the scheme
Knowing by Fig. 4, the component of floor of one grade of components of system integration in fact in the scheme is not the call, and direct call hardware abstraction layer component. Contrasted with Fig. 2 by Fig. 4 to find, can move in fact one layer of components * of system integration in PhyP component and finish, have avoided to the repeated use on component of bottom layer, the whole structure is clearer and simpler like this. So, need to improve PhyP component and make it can finish the initialized radio frequency chip, transfer the radio frequency chip and send and accept the data. Though it seems that PhyP component is greater than to take the place of codes quantity actually, show to the test result running systematically after the improvement, raise 10% of the operating efficiency, reduce taking the place of codes quantity of 3000 lines.
3 tests that adjust the usage directly
Will adjust the design that the usage employs IEEE802.15.4 and realize directly. IEEE802.15.4 standard has already become the de facto wireless sensor standard at present, and develop this agreement on each hardware platform. Take IEEE802.15.4 standard as examples, use this text to adjust the usage under the environments of TinyOS system, CC2420 radio frequency chip directly to design realizing this standard, and test its in-service behavior.
Design and go on according to the component thinking of programming of TinyOS system. The physical layers will be designed two components (PhyP, PhyC) ,Two pieces of interface through defining in the standard of relevant operation go on: Interface of access to data (PD) , management interface (PLME) . The component PhyP is mainly realizing the component of physical layer, it has initialized component, transmission data, accepts three basic functions of data. Design two components in MAC layer: MacC, MacP, among them MacP is the master execution component. There are two kinds of apparatuses in the MAC layer: The node of the coordinator and it is not nodes of coordinators. The node of the coordinator is responsible for setting up the network: Establish network number (PANID) , a nodal short address, and produced the loaded part of the beacon framing. It is not the node of the coordinator that adds into network set up of the node of the coordinator and makes up bigger personal domain network.
3.1 Functional test
It is tested that program execution is divided into two stage test on two even nodes. Test the communication situation of the physical layer at first: A node produces a payload on the first: Send the node to for the other second from 0 to 9 ten machine format data packets, the node remains untouched after receiving the above-mentioned data packet and sends this data packet back to to the sender just now again on the second. The content of the data packet sent and received is concerted, and the indicator light glimmers normally, prove communication between the node normal, physical layer design operate normally. Further test the working condition of the MAC layer: Set node of the first as the node of the coordinator, it is not a node of a coordinator that the node is set up as on the second. Set up a PAN network in and the node initialization of the first, the node asks to add into network that the node establishes No. one on the second, prove whether the network operates normally. It is knowing to pass function test, the whole working phase runs according to the regulation of IEEE802.15.4 standards, have realized the function of this standard.
3.2 Efficiency test
Operating efficiency employs and produces 50 data packets, while testing transfers the MAC layer and sends the interface and sends these 50 data packets, begin to time while employing transferring the data interface of MAC layer, till the application layer receive and charter the confirmed message succeeded in sending. Note this response time, and increase the payload of sending the data packet sequentially, response time when rise to 90 from 10 bytes, note and increase in valid year. Efficiency goes on while testing in the primitive scheme separately and adjusting the agreement that the usage will be developed out directly, count the job parameters of two kinds of different methods, the time distribution got finally. Fig. 5 receives and dispatches the efficiency of the data to compare
Knowing by Fig. 5, in case of 50 data packets, the disparity of response time of two is not big when the payload of the data packet is to the 50 bytes in 10, response time has been raised by 10% from side to side, when payload rises to one byte more than, response time improves by 30%, help to meet the real-time nature requirement for the embedded system
Conclusion
This scheme passes the deficiency to analyze Off-The-Shelf development approach of the wireless sensor network, propose adjusting the usage directly, and realize IEEE802.15.4 standard with this method and reach the re-set target finally. The transplantation of the scheme is high, good stability, take the place of small codes quantity, suitable wireless sensor resources are limited, critical characteristic of the real-time nature. It is can be used for developing other communication protocols adjusting the usage directly at the same time, for instance: 802.11, LEACH, bluetooth,etc..
Tags: Face the component development approach of the wireless sensory network