In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of SuperIO communication mechanism and device driver docking, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on SuperIO communication mechanism and device driver docking. Let's take a look at it.
1.1 description of communication mechanism
The overall mechanism of communication adopts the call response mode, that is, the upper computer software actively sends the request data command, and the lower computer terminal receives the command, verifies successfully and returns the corresponding data.
The main contents are as follows: (1) the serial communication mechanism includes: polling mode.
Serial bus involves one-to-one communication and one-to-many communication. in order to avoid data conflict and environmental interference on the bus, only polling communication mechanism is adopted on the premise of ensuring the stability of communication. After one device sends and receives the data, the communication of the next device is carried out. But this kind of communication efficiency is relatively low, if we want to improve the communication efficiency, we can increase the serial port server to realize the communication of one serial port corresponding to multiple field devices on the SuperIO platform, that is, to balance the load of all the devices on the field to different serial ports.
(2) the network communication mechanism includes polling mode, concurrent mode and automatic control mode.
The polling mode is the same as the polling mode in the serial communication mechanism, but for network communication, the efficiency of this mode is very low and can not reflect the advantages of network communication. Based on this consideration, concurrent mode and automatic control mode are added on the basis of polling mode.
The concurrent mode is coordinated by the interior of SuperIO. The command packet sent is obtained by calling the GetSendBytes function of the IRunDevice device interface, and the data of all devices is sent centrally. The receiving data part adopts the asynchronous monitoring mode to receive the data of the corresponding equipment. The communication cycle of the concurrent mode is uniformly scheduled by the SuperIO platform, and the period of the request data can not be controlled autonomously. On this basis, the automatic control mode is added.
In the automatic control mode, when developing the device driver, the secondary developer can regularly send the request data command through the OnSendDataHandler, and the receiving data part adopts the asynchronous monitoring mode to receive the data of the corresponding device to achieve the immediate request and immediate response.
In another case, the on-site hardware terminal will actively send status word data to the host computer software, so it needs to be able to actively monitor and receive data events, which can not be done by polling mode. In such a situation, it is recommended to use automatic control mode for communication.
1.2 Communication mechanism and device driver docking
SuperIO includes two parts: communication part and device driver part.
(1) how does the communication part coordinate with the device driver? The two parts are mainly through the IRunDevice interface to achieve the coordination between the two parts, thread, asynchronous, synchronous and other mechanisms are completed by the SuperIO.
(2) how to transmit the data to the corresponding equipment after receiving the data in the communication part? This problem does not exist in polling mode, which mainly involves concurrent mode and automatic control mode, because these two parts listen to data asynchronously. There are two ways to solve this problem: first, the device ID is obtained by receiving the protocol driver to identify the corresponding device. Second, the corresponding device is identified by the IP address set by the device. Today's SuperIO platform adopts the second approach.
(3) how to realize the communication interrupt state in concurrent mode and automatic control mode? When the link is down, the request command is sent, the corresponding data is not returned, and the interface of the running device is triggered, so the communication status will not change and will not make any response. The way to solve this problem is to send the request data command more than 3 times, each time no corresponding data is returned, the running device interface will be triggered to complete the whole process of running the device.
This is the end of the article on "what is the connection between SuperIO communication mechanism and device driver". Thank you for reading! I believe you all have a certain understanding of the knowledge of "what is the connection between SuperIO communication mechanism and device driver". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.