In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 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 "what is the architecture and components of SuperIO". The editor shows you the operation process through an actual case. The method of operation is simple, fast and practical. I hope this article "what is the architecture and components of SuperIO" can help you solve the problem.
1.1 Architectural structure diagram 1.1.1 hierarchical diagram
1.1.2 schematic diagram of model object
1.2 IO Manager
IO manager is the management and scheduling of serial port and network communication link. According to the characteristics of serial port and network communication link, serial port management and network management are derived on the basis of IO manager interface.
1.2.1 Serial port management
Serial port management responds timely to the creation of serial port IO instances, the opening of serial port IO, the closure of serial port IO and the release of resources, as well as the management of IO operation examples.
1.2.2 Network Management
When the device adopts the network communication mode, the working mode of the device is divided into: Tcp Server and TcpClient.
When the working mode is TcpServer, the communication platform will monitor the network connection, the client connects to the server, and the connection instance will be placed in the IO manager in the form of IO interface.
When the working mode is TcpClient, the communication platform will actively connect to the remote server, and when the connection is successful, it will put the connection instance to the IO manager in the form of IO interface.
Heartbeat detection is carried out regularly for all network connection instances, and the resources of network connection instances are actively released in response to false connection, dead connection, remote disconnection, hardware link disconnection and other phenomena.
The network IO manager responds in time to events such as receiving data, sending data, connecting operations, disconnecting operations, and so on.
1.3 device Manager
The main responsibility of the device manager is to uniformly manage serial devices, network devices and virtual devices, and to provide interfaces for external operable devices. The main functions are implemented, as shown below:
1.3.1 main interfaces of equipment
The equipment has a unified interface, which is used as an operational example during the operation of the communication platform. Interfaces include: event class interface, function class interface, attribute class interface. As shown below:
The functions of the main components of the equipment and the responsibilities of the functions are described below.
1.3.1.1 Command caching
Each device has a command cache, which can put the instructions to be sent by the device into the command cache. When the communication platform is polling communication mode or concurrent communication mode, it will actively call the instruction data interface and judge whether the current command cache has data information. When the command buffer has data, the command cache data will be sent, otherwise the real-time data instruction interface will be called to send real-time data instructions. As shown below:
1.3.1.2 Protocol driver
Protocol driver is divided into: sending data protocol driver and receiving data protocol driver, as two necessary attributes in the device instance, so that the communication platform can be called.
The sending data protocol driver drives different functions through the command interface, packages the command data, and then sends the data through the IO interface.
The receiving data protocol driver drives different functions through the parsing command interface, parses the data information according to the command status word, and returns the operable object for business processing.
1.3.1.3 data retention
Data retention can be divided into two types of data: real-time data and parameter data. Both types of data are saved to XML file format through the serialization interface.
When the device is initialized, the XML file is loaded and de-serialized into an instance object, which is used as the property interface of the device, so that the communication platform can operate the parameters and real-time data of the device.
In addition, secondary developers can also inherit the serialization interface and customize the persistent processing of data, such as using the database as the carrier to avoid file damage caused by high real-time performance.
1.3.1.4 Virtual device Interface
The corresponding virtual devices can be developed for the same type of devices, virtual formulas can be set for virtual devices, and the corresponding data of multiple devices of the same type can be processed by business logic.
1.3.1.5 run authorization
Each device has an authorization attribute, which does not operate on the IO interface for unauthorized devices, and the device cannot communicate effectively. In the process of secondary development, developers can set authorization.
1.3.1.6 Video Interface
Each device has a video attribute operation interface, and the equipment on the spot can choose to configure the video server, and the file data and video data can be fused and displayed on the server side.
1.3.1.7 Channel Monitoring
It can monitor the data sent and received by the device IO, the data is displayed in hexadecimal, and the source data of hexadecimal is saved, which is convenient for equipment debugging.
1.3.1.8 priority
There are two types of priorities: high-level and normal-level, which can be set for devices and commands, respectively, and priority scheduling of devices and commands can be made in the IO Control Manager.
1.4 Control Manager
The IO control manager mainly schedules the communication mechanism, and the serial port is different from the network communication mechanism.
So the control manager is also different, but the interface for the communication platform is unified.
1.4.1 Serial Port Control
There are several serial port controllers in the IO control manager, and each serial port controller has a separate thread, which is responsible for polling communication mechanism scheduling for the devices that set the serial port. As shown below:
1.4.2 Network Control
There is only one network controller in the IO control manager, and there is a single thread in the network controller, which is responsible for polling, concurrency, automatic control mode communication and scheduling of all network devices, as well as asynchronous monitoring of IO channel data, and distributing the received data to the corresponding device drivers. As shown below:
1.5 module debugging 1.5.1 debugging interface
Debugging interface defines debugging equipment, debugging interface view, debugging data export, debugging application service and other interfaces, through which the program module of secondary development can be debugged.
Definition of debug interface:
Void DebugDevice (IRunDevice dev)
Void DebugGraphicsShow (IGraphicsShow show)
Void DebugExportData (IExportData export)
Void DebugAppService (IAppService appService)
1.5.2 debugging mode 1.5.2.1 interface debugging
You can inherit MainForm forms, and the form instance provides a debug interface, and you can define whether it is debug mode through the SuperIO.Device.DebugDevice.IsDebug property. If this property is true, you can dynamically load the program module through the debug interface to debug; if this property is false, the program will load the program module in the directory configuration file, and will not be able to track and debug.
1.5.2.2 Command console debugging
The debugging example can be obtained through DebugDevice.GetDebugInstance (). This debugging example does not have the function of interface display, but it can debug the program module more conveniently and quickly.
1.6 component controller
The main responsibility of the platform controller is to assemble the main components of each part and coordinate the orderly work between the components; and to provide external accessible interface, debugging interface and so on.
1.7 operator
The runner is mainly responsible for monitoring the running status of all equipment, including: device name, address, communication type, IO parameters, channel status, communication status, equipment status, alarm status, device type and so on.
At the same time, it also includes: operation monitor, which is responsible for displaying the log display of equipment operation; serial port status monitoring, which is responsible for displaying the status of serial port control; and network status monitoring, which is responsible for displaying the status of network connection.
1.8 Monitor
The monitor mainly monitors the log information generated during the operation of the platform software, and displays it in the operation monitor, as well as monitoring unknown abnormal information.
1.9 external interface
Mainly in the form of configuration files, mount assemblies, and then dynamically load assemblies through configuration files to provide accessible interface services.
1.9.1 mounting device
The device driver module that inherits the IRunDevice interface can save the device driver information to the configuration file through the configuration form. The configuration information includes: program module file, assembly ID (automatically generated), file name, device type (ordinary device, virtual device), instance name (namespace and class name), device name, remarks, etc.
After the equipment is mounted successfully, the corresponding devices can be added to the device management menu of the communication platform, and the serial port or network communication mode can be selected when adding devices.
1.9.2 Interface display
The view display module which inherits the IGraphicsShow interface can save the information to the configuration file by configuring the form. The configuration information includes: program module file, file name, instance name, title name and so on.
The successfully mounted view display module will display items in the interface view menu, and when the configuration item is clicked, the corresponding view will be displayed in the form of Tab.
1.9.3 external programs
Executable applications can be configured in the external tools menu and used as tools for the communication platform.
1.9.4 data export
The data export module that inherits the IExportData interface can save the information to the configuration file by configuring the form. The configuration information includes: program module file, file name, instance name, title name and so on.
The successfully mounted data export module will not be displayed in the interface, and the platform software will automatically load the instance of the export module.
1.9.5 Application Services
The application module inheriting the IAppService interface can save the information to the configuration file by configuring the form. The configuration information includes: program module file, file name, instance name, title name, service type and startup type.
Service types include: display mode and hidden mode. The service that displays the model can display the service item in the menu, and the corresponding service form interface can be called by clicking the event to configure, manage and other functions of the service. Through this mode, the service can be started and stopped manually. Hidden mode services do not display service items in the menu. This service type should be used in conjunction with the startup type. The startup type is set to start automatically, and the service will automatically start the service when the platform software starts.
Startup types include: manual startup and automatic startup. Manual start mode, the service will not be started automatically when the communication platform starts, and the automatic start mode will automatically start the service when the communication platform starts.
This is the end of the content about "what are the architecture and components of SuperIO". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.