Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize Special Communication Mode in SuperIO

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is a detailed introduction to "SuperIO how to realize special communication mode". The content is detailed, the steps are clear, and the details are properly handled. I hope this article "SuperIO how to realize special communication mode" can help you solve your doubts. Let's go deeper and learn new knowledge together with the ideas of the small editor.

1.1 Unified IO interface

Develop a set of device drivers with both serial and network communication capabilities, the communication interface is logically unified, on this basis serial and network also have their own IO communication characteristics, according to different communication methods, IIOChannel instances can be converted into ISessionSocket or ISessionCom instances. As shown below:

1.2 communication requirements

A request command is sent twice, and the serial parity bit is different when sending data each time. First send address information, then serial port configuration is Baud,m,8,1; then send request command information, then serial port configuration is Baud,s,8,1. This completes a command requesting data. As shown below:

1.3 rewrite communication interface

The device driver inherits the SuperIO.Device.RunDevice1 abstract class, which has a virtual function Send(IIOChannel io, byte[] sendbytes). The io parameter is the communication operation instance, and the sendbytes parameter is the data information to be sent. This interface function can be rewritten to fulfill special data sending requirements. As shown below:

After receiving the data, you need to modify the serial port setting to the default configuration to avoid affecting the communication of other device drivers, as shown in the following figure:

Read here, this article "SuperIO how to achieve special communication methods" article has been introduced, want to master the knowledge points of this article also need to practice to understand, if you want to know more related content articles, welcome to pay attention to 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report