Equipment of content couplet network, because want the diversification of join network and application, the development difficulty that causes software and complex degree increase considerably, development means also is met to it before embedded facility is large different. Is the software development mode of current main trend how? We with a modelMCU WiFi/NB-IoT Of SoC frameworkIoTEquipment development is exemple (graphic representation one) , development staff needs to be aimed at specific wireless SoC/ module, develop the application of above of layer of MCU TCP/IP agreement, include MQTT, HTTP, Web Socket, business kind application is waited a moment. Once the user changed wireless chip or module, what wait because of interface of network agreement, process designing is skimble-scamble, superstratum application needs to do considerably alter should weigh a head to had come even.
(graphic representation one: Current software develops pattern)
And if used the SAL abstract layer of RT-Thread operating system (graphic representation 2) , developer need not consider what the system uses is which kinds of which kinds of wireless means, wireless chip, even which kinds of module, which kinds of interface, need to call the A of superstratum onlyPIInterface, can realize development, cross platform to use. Not only such, all sorts of IoT software that RT-Thread supports are wrapped, OK very convenient “ is installed namely use ” namely.
(graphic representation 2: The software that has SAL develops pattern)
Above is visible, the SAL it may be said that RT-Thread releases this is great to IoT industry meaning, implemented a system truly (MCU wireless chip / module) of the level cross platform software development to reach compatible, and ACS (ApplicaTiOn Cross SysTeM) , the application of later period is patulous also can become easy as my eyes.
SAL, namely the abbreviate of Socket Abstraction Layer, meaning for layer of abstraction of dowel joint word, be in network hardware layer and applied layer between. Its predecessor is the DFS_NET component of RT-Thread, because its have certain dependence to LwIP, put in limitation, RT-Thread had the give somebody a new lease on life that reframes approximately to its. The be pregnant with of SAL and piece, make RT-Thread OK enter sundry network chip or module without seam (for example: W5500/CH395 carries consultative pen this kind oneselfAether netChip, take the WiFi module that AT dictates, GPRS Module, NB-IoT module is waited a moment) , promoted RT-Thread to be in greatly IoT domain the compatibility to different network hardware. Its major attribute is as follows (graphic representation 3) :
L abstraction, unified interface of a variety of network agreement inn
L offers standard BSD Socket API
L unites Fd (File Descriptor) administrative pattern
(graphic representation 3: Network frame pursues)
Will stand in the module angle with SAL relevant couplet below, show the function of SAL and implementation:
Apply a layer: When applied layer is doing a network to develop, can use the port of BSD Socket API that SAL offers directly. The unity of interface layer is abstract, make our developer OK also and fast the IoT software package of the port of numerous support BSD Socket that applied RT-Thread offers. The user that allows us promoted software in huge of respect of network process designing but sex of put sb in a very important position.
SAL realizes a layer: This are located in the bottom of SAL, be aimed at different module, chip or consultative inn, finish the butt joint with SAL frame to come true. Receive after finishing, applied layer needs to care true network to receive kind scarcely, reduced those who apply layer and ground floorCoupling.
Layer of DFS file system: SAL and DFS are united in wedlock cheek by jowl, socket descriptor and Fd file descriptor are OK and complete correspondence rises, realized the centralized management of Fd. Make applied layer OK operate word of Socket dowel joint through interface of Read/write, Poll/select, standard of more compatible POSIX.
To receiving the network module that AT dictates
When using these AT module to do a network to develop, inevitably meeting applies the coupling in code in ours a lot of AT communication code related to module. Also can bring about so, the package that the BSD Socket that the level uses previously has developed does not have a law to be come over by put sb in a very important position.
Had SAL, need us to be aimed at the instruction means of AT module only, the butt joint interface that realizes SAL (the implementation that RT-Thread had offerred commonly used module, for example, le Xin’s ESP8266, move far M26) , superstratum application can undertake Socket process designing happily.
Here is carried a little, the AT component of RT-Thread already had afore-mentioned functions, will release very quickly, expect …… please
The network chip of inn of agreement of the buy inside the butt joint
As like W5500/CH395 of chip of this kind of network gain ground more and more, our MCU also does not need to run network agreement inn, the resource that reduced MCU greatly takes up circumstance. But follow AT module to also have similar problem, how can ability assure apply a layer to still use standard Socket very simply to undertake process designing? This problem gives SAL goes solving. SAL has been built comfortable the wheel that distributes these chip, the meeting is convenient we are all the developer of use RT-Thread W5500/CH395.
Be not the TCP/IP agreement inn of LwIP
In a few special domains, lwIP can not satisfy the likelihood our user requirement. Change TCP/IP agreement inn is inevitable. Because had SAL frame,be, new consultative warehouse, need to end to receiving with its only, superstratum application can be at ease use, the code previously also can be taken all the same put sb in a very important position.
Socket CAN serves asLinuxGo up a kind of means of CAN process designing, it is simple and easy use easily, process designing conveniently. A lot of users also want to realize Socket CAN process designing on RT-Thread, this moment entered the court with respect to need SAL. The interface that needs us to realize SAL frame correspondence in equipment of rock-bottom use RT-Thread CAN only can.