Application and Research Software Design on Rescue Communication System of Embedded Mine-Underground

,


INTRODUCTION
The mainly existing communication equipment is mine rescue calls, whose information is limited and can't fully accurate reflect the reality of the scene which result in poor rescue command.Therefore, it's very necessary to research and develop a mine rescue command platform that meeting the needs of mine rescue.The mine rescue command platform can transfer the video and audio information from the mine rescue scene to the rescue command center instantaneously and accurately and support three parties that the mine rescue scene, the underground base and the rescue command center call instantaneously and instantaneously reflect the environment parameter information of the mine rescue scene.Mine rescue command platform play an important role on the rescue command center decisively command, enhancing decision ability of mine rescue, improving national mine rescue ability and disaster research and accident responsibility.(Li et al., 2007a;Su, 2006)

SOFTWARE REQUIREMENT ANALYSIS
The schema of mine rescue command platform is as Fig. 1: Underground information recorder: Underground signal acquisition side, it's mainly complete acquisition of various signals in underground scene, including video signal and environment information parameters.The recorder is still completing the video signal compression, display, transmission and storage.

Underground base:
The middle of the device connect underground information recorder and rescue command center.

Ground command center:
The command center of mine rescue command platform, it's in charge of directing rescue operations, material and manpower scheduling.It plays a decision-making role on rescue command.
Three party of mine rescue command platform mainly implement functions as follows: • Three party call in real time  The software platform uses the Berkeley developed specifically for wireless sensor networks, TinyOS.TinyOS operating system, developed for the high degree of concurrency, the scarcity of hardware resources of embedded systems is written in nesC language support for wireless sensor network architecture.
The main run in the TinyOS sensor node "motes", while the motes themselves rely on battery-powered and its inside and outside the limited memory resources.TinyOS operating system design a lot of careful design and optimization, the main features are as follows: • The architecture of the hierarchical components, the so-called hierarchical component, is based on the closeness of the components and hardware components are divided into different levels.The bottom of the component processing hardware related operations, the highest level of user-defined application components and component implementation of middle level of abstraction to the hardware.The programmer can choose the use of system code.In this sense, TinyOS is actually an optional component library • TinyOS event-based concurrency model.Event corresponds to the external interrupt this type of emergency, it can seize the task (task processing background calculation process) or other events that takes precedence, so that from a macro point of view, between tasks and events (as well as between events and events) On the macro level is to move forward, namely the concurrent task with the event (or events) • TinyOS using the mode of operation based on finite state automata.Each resource corresponds to a component and this component is the description of the form of finite state automata, component by using the commands and events between the different states rapid migration, the number of finite state automata can share the same operating environment.Another advantage of using finite state automata operating mode is a very natural mode of operation of the hardware to convert the mode of operation of the software.As the hardware components to respond to changes in the pin state in TinyOS components to respond to commands and events (event equivalent to the input command is equivalent to the output).

THE MODULE FUNCTION
Video display module: In addition to displaying live video, it also shows the real time, including date and clock time, video window zoom and also implements video forwarding.Showing time has to use the timer and through the Set Timer (1, 1000, NULL) to set the timer to display time.Environmental parameters display module: Environmental parameters are drawn by real time curve, which accomplish sensor data intuitive graphic display in real time.It's easier for users to view data and timely report dangerous information about underground as in Fig. 3.
WinCE provides powerful Graphics Device Interface (GDI).The CDC class device context class is used in this design.It uses the SelectObject method in GDI elected to GDI drawing tool brush (CPen) to draw.The x-axis of curve window displays real time when the y-axis shows the real-time values of environmental parameters.
Alarm module: It includes environmental parameters concentration outlimit alarm, network failures alarm, equipment failure alarm.Alarm is divided into different levels.The form is alarm sound or flash.It's very humane of the settings of alarm module to take timely measures to avoid personal injury occurred.
Network status monitoring: It can monitor network connection status by real time and check whether or not indicating the check box to show that the network is connected or disconnected.

Database storage module:
When you try to communicate, In order to achieve sensor data storage by real time, system joined the operations on the database at design when communication.It stores all the collected data from site information recorder.

Development environment:
The software development environment is VS2005 and uses C\C++ language to develop.The embedded operating system is WinCE 6.0.
Visual Studio 2005 supports application development of Microsoft.Net Framework version 2 and integrates with all development environment languages of Microsoft.All languages uses the same set of tools and develop in the same development environment and improve a variety of tools that environment contains.It integrates with the Platform Builder software, which is convenient for system customization.
We create WinCE project to custom system software of underground information recorder and underground base when we develop platform software and application software.We export customized SDK on account of mine rescue command platform and start to develop application program in VS2005 after installing it (Zhou, 2005).
Popular embedded real-time operating system, uC/OS-II.UC/OS-II is based on the priority can be the 1 st to the hard real-time kernel.Around the world since the 92 years since the release of a wide range of applications, it is the kernel of a special design for embedded devices, has been ported to 40 different structure of the CPU, running in from 8-64 on top of a variety of systems.Is worth mentioning that, since the 2.51 version of the system by the U.S. FAA certification, you can run above the most demanding systems such as spacecraft safety.In view of the uC/OS-II can get free code embedded RTOS uC/OS is undoubtedly the most economical choice.Software design in a very secure and stable operating system will work.UC/OS-II has a great advantage, take up memory is very small and so I chose it as the operating system.UC/OS-II can be deprived of the real-time multitasking kernel.The type of real-time kernel running ready at all times the highest priority task of uC/OS-II Task scheduling is based entirely on the task priority preemptive scheduling, which is the highest priority task in the ready state, immediately to seize the low priority tasks are running processor resources.To simplify system design, uC/OS-II requires the priority of all tasks, because the priority of the task is also the only marks the task itself.For works in all functions can be divided into several modules, to form a single task.Each mandate different priorities and perform the appropriate task when the subject of the request signal, not only real-time and very stable.
In order to facilitate user operations and rational use of resources and reduce consumption, the various modes according to the microprocessor, at a specific time and place of the microprocessor are set to a different state.
According to the functional requirements for the level and other aspects of security considerations, the operating system task scheduling can be divided into the following tasks: • A switching machine and reset • Data acquisition and analysis processing • The methane gas concentration in excess of the alarm control Each task has different priorities should be noted here that the priority of Task 3, Task 2 followed.

Software design process:
This design uses a multithreaded to implement the software modules.It includes the main program; receive thread (receiving video and audio data and environmental parameters), the display thread and judge alarm thread.The software works as follows:  show.We use H.264 codec in this design (Zhou, 2005;Stanislav and Pavel, 2007).• Judgment alarm thread compares the data received with alarm threshold.It use MoveTo, LineTo function to draw a line of alarming.The color of curve will turn red and start the buzzer if out the limit.Then waiting for the alarm purge and determine whether exit or not as shown in Fig. 4 (Zhou and Dai, 2004).

CONCLUSION
The underground embedded application software of rescue communication system has been nearly completed and is in debug optimization phase.At present, the test result shows that it has implemented video display, environmental parameters display, alarm display, network status monitoring, volume adjustment, time display and other functions.Command center can know underground rescue situations in real-time.I believe that it can bring great convenience in the course of mine rescue and improve rescue efficiency.Although it is designed for mine rescue applications, it also applies to other rescue.

Fig. 2 :
Fig. 2: Software functionality structure chart of mine rescue command platform is divided into several main functional modules.Functional structure diagram is as shown in Fig. 2.The software platform uses the Berkeley developed specifically for wireless sensor networks, TinyOS.TinyOS operating system, developed for the high degree of concurrency, the scarcity of hardware resources of embedded systems is written in nesC language support for wireless sensor network architecture.The main run in the TinyOS sensor node "motes", while the motes themselves rely on battery-powered and its inside and outside the limited memory resources.TinyOS operating system design a lot of careful design and optimization, the main features are as follows:

Fig. 3 :
Fig. 3: LCD part Three party call display module: Displaying 3-party contacts, including mine rescue team, Underground base and ground command center, as well as their online status.Displaying call objects and time, when calling.It can also adjust the volume size and other functions.We set 2 icons to indicate their online status.OnPaint () function uses Image interface object to display icon.It adjusts the volume size through the waveOutSetVolume (handleX, volume) function.