Embedded Internet is a new concept and technology generated by the extensive application of embedded systems and the development of computer network technology. Embedded systems are application-centric, based on computer technology, and software and hardware can be tailored. Won a huge market. With the development of the Internet, various devices have created connectivity requirements. From the refrigerator to the meter, it seems that all appliances need to be connected to the Internet. By expanding the Internet access capability of existing embedded systems to expand its functions, and using the Internet as the medium to realize information interaction, an embedded Internet technology is generated. To realize the networking of embedded devices, it is necessary to implement a TCP/IP network protocol stack. However, due to the high requirements of various communication protocols on the Internet for computer memory and computing speed, the development of the embedded system protocol stack is not smooth.
At present, two key factors affect the development of the network protocol stack, one is performance and efficiency, and the other is development and debugging. Traditional operating systems generally only consider one aspect of them. For example, in Linux and FreeBSD, the network protocol stack is implemented as part of the system kernel. It usually has high communication efficiency, but it is not convenient for users to add new user protocols and adjust the implementation details of the protocol according to special needs. Maintenance, debugging and development are also inconvenient. This shortcoming is particularly prominent in the embedded field.
Due to the diversity of embedded devices and the diversity of communication requirements, the reuse rate of the network protocol stack in the embedded field is very low. This paper introduces component technology into the development of network protocol stack, and implements a componentized network protocol stack on the domestic and Xin operating system, which solves the problem of development and efficiency.
1 and Xin embedded operating system CAR component technology
1.1 and Xin embedded operating system
Hexin operating system is based on microkernel, and the service is dynamically loaded. The kernel includes hardware drivers (serial port, USB, Ethernet card, wireless communication module), memory management and other basic system services, as shown in Figure 1. The TCP/IP protocol stack is completely implemented by components. It is a service component running on the component platform. After the data is obtained from the underlying network card and serial port, the data is processed by the upper layer service component.
Hexin embedded operating system is based on component software model. The component software design idea runs through the design and implementation of the whole system. The system implementation itself is the component mode. Except for the lowest control part of the kernel, all system functions are component interfaces. The form is provided. In addition, the operating system provides the necessary operating environment for the componentized software model. Components from different sources can interoperate in the environment. The system provides automatic member addressing/autoloading mechanism. The user does not need to know that the called component program is local. It still comes from the Internet, that is, the component runtime environment is transparent to users. The implementation of the componentized system makes the operating system itself highly flexible and scalable. He Xin adopted the CAR component technology.
1.2 CAR component technology
Based on the development history and experience of object-oriented programming and component-oriented programming technology, CAR component technology was invented to better support the development of next-generation network application software represented by Web services. The CAR (Component Assembly RunTIme) component technology defines a set of component programming models and programming specifications for the era of network programming. It specifies a set of criteria for calling each other between components, making binary components self-describing and dynamically linked at runtime.
CAR component technology solves the dynamic upgrade of software and the dynamic replacement of software through binary encapsulation and dynamic link technology. Component-oriented technology encapsulates a combination of a set of classes and represents a specific service that performs one or more functions, and is also a user. Provide multiple interfaces. The entire component hides the concrete implementation and only provides services with interfaces. In this way, at different levels, the components can combine the underlying multiple logic into new components with higher granularity at higher levels. The components exchange data and information through the agreed interfaces. The positions of the components are transparent to each other. One or different user process spaces, different machine settings, different components are written in different languages â€‹â€‹as long as they conform to the pre-agreed component specifications.
2 Features and Implementation of TCP/IP Protocol Stack on Hexin Operating System
2.1 Features of the TCP/IP Stack on Hexin Embedded Operating System
Due to the limitations of the embedded system in terms of the amount of hardware resources and the processing power of the processor, the embedded implementation of the TCP/IP protocol is quite different from its implementation in the general-purpose operating system. First of all, due to the low clock frequency of the embedded processor and the narrow address and data bus, the embedded system needs more processor time to process a common IP packet, thus affecting the execution of other tasks, so it needs to be huge. The complex TCP/IP protocol stack is tailored to make it simple and efficient. At the same time, the size of the interrupt handler should be properly controlled when designing the embedded TCP/IP protocol stack, so that the interrupt handler runs as short as possible; Move those non-real-time requirements and time-consuming tasks to the main program to ensure the correct execution of the protocol. Specifically, put the processing of TCP/IP protocol into the main program and use the loop of the control chip of the network interface. In the query mode, the TCP/IP protocol is processed in the execution gap of other interrupt tasks, in order to sacrifice the response time of the system in exchange for the reliability of the system, and because the storage space of the embedded system is limited, generally only a few KB bytes can be opened. The buffer area receives the packet and its storage space is fixed, not dynamically allocated. Therefore, a buffer overflow error occurs when a large packet is encountered. Generally, the type of data packets received by the embedded system is only a system state configuration package, a control action command packet, a communication control packet, etc., and these packets have a small capacity, and the data packets sent by the real-time data or the webpage to the network are relatively long, but can pass The design format is controlled.
Hexin operating system is a microkernel-based operating system. The TCP/IP protocol stack can be run in user mode or in kernel attitude. It has a common interface and a convenient framework for users to develop their own domain or special. The required network protocol stack, because the Hexin operating system provides efficient process context switching and inter-process communication, so the entire network protocol stack serves as a user-mode process. Create a network artifact instance before using it and then register the service with the operating system. The user can then use the network programming interface. If the user has higher efficiency requirements for the network protocol stack, the protocol stack can be loaded into the kernel mode.
Electronic Drawing tablet Features: (drawing with pressure, slim and convenience, erase button, environment-friendly, sturdy and durable)
1.Non-toxic and environment-friendly health eraser board: it can be used as an educational toy, dictation board, calculation paper, drawing board, message board
2. No oil, no ink, dust, pressure painting, the key to clear, environment-friendly health, anti-fall-resistance
3. Reuse, save resources, save 20 trees of 10 age trees in one lifetime, add green for the earth
Digital drawing tablet Instructions:1. Using the pen's own pen to write and draw, different pen pressures produce different line thicknesses
2. Press the clear key to clear the contents of the tablet
When cleared, the LCD Drawing Pad Tablet screen will flicker
12 Inches LCD Writing Tablet,LCD Tablet,LCD Writing Board,Digital Handwriting Pads
Shenzhen New Wonderful Technology Co., Ltd. , https://www.sznewwonderful.com