Iii. SuperIO secondary development process. superio Secondary Development
1.1 secondary development Flowchart
1.2 reference related components
Find the "Development Kit" and reference the relevant components. For example:
1.3 Develop the device driver module 1.3.1 develop the sending protocol driver
Inherit from SuperIO. device. the DeviceSendProtocol interface overwrites related FunctionXX interface functions for data packaging. "XX" indicates hexadecimal data. For example, Function31 uses this. sendProtocol. call the GetSendCmdBytes (addr, new byte [] {0x32}, null, false) function.
The interface function can correspond to the interface function in the receiving protocol.
1.3.2 develop the receiving protocol driver
Inherit from SuperIO. device. the DeviceReceiveProtocol interface overwrites related FunctionXX interface functions for data packaging. "XX" indicates hexadecimal data. For example, Function31 uses this. receiveProtocol. call the GetAnalysisData (data, null,-1) function.
The interface function can correspond to the interface function in the sending protocol.
1.3.3 parameter data and real-time data persistence
Can inherit from SuperIO. device. deviceParameter and SuperIO. device. the DeviceRealTimeData class adds a new attribute to the subclass to overwrite the SaveSerializePath attribute to specify the path for storing data, and stores and obtains data through serialization and deserialization.
Secondary developers can customize the data persistence class of the SuperIO. SerializeOperation. SerializeOperation type.
1.3.4 develop and run device drivers
Inherit the SuperIO. Device. RunDevice1 abstract class, and rewrite the corresponding function interface to complete the corresponding function.
For detailed function descriptions, refer to the subsequent development instances.
1.3.5 create a ContextMenu
The context menu is displayed through the ShowContextMenu function of the device interface. This menu interface is displayed when you right-click the menu in the software platform list.
1.4 develop the Graphic Display Module
The graphic display interface must inherit both the Form class and SuperIO. Show. IGraphicsShow interface for displaying the Form and driver data.
Different data information can be integrated into one interface for display, which is more intuitive and convenient.
1.5 development data output module
For the same type of devices, data in different formats is output without changing the device driver module, and more data is used for interconnection with other integrated systems.
1.6 Development Service Module
Various services for devices and platforms can be developed here. For example, the platform collects data and uploads it to the service center. Such interfaces are widely used.
1.7 debug drivers and modules
You can inherit the MainForm, call the debugging interface, and debug the interface.
Yes. You can use DebugDevice. GetDebugInstance () to obtain the debugging instance and debug the instance without boundaries.
1.8 Mount drivers and modules
Run the configtool.exe Configuration tool to mount the developed drivers and modules. For example:
Author: QQ: 504547114
QQ group: 54256083
Http://www.bmpj.net
Source Article address: http://www.bmpj.net/index.php? M = article & f = view & id = 3