Superio Download: The Role of http://pan.baidu.com/s/1pJ7lZWf1.1 service interface
Based on the data collected by the device driver module, a variety of application services are available on demand, such as data uploading service, data request service, 4-20ma service, SMS service, LED service and OPC service. To ensure the real-time and stability of the data, the service interface can provide a wealth of functional service mechanisms to facilitate developers to develop two times.
1.2 Interface Function Description
Development of the device output interface, primarily taking into account the output of various data formats in the integration process or in the integration process. The SuperIO.Export.IExportData interface needs to be inherited, and the interfaces include:
1) StartService
This interface function is automatically invoked when the platform loads the service when the service is started (Isautostart) as "auto-start".
2) Releaseservice
Releases the service resource interface.
3) OnClick
When the service type (servicetype) is "display Mode", the name of the service is displayed in the "Services" menu, and when you click on the service item, the Click Interface function is called, and the form can be called in this interface function.
4) Writeloghandler
Log event interface, which can be used to display the log information in the "Running Monitor".
5) ServiceType
Service type, divided into: display mode and hidden mode. The service that displays the module displays the service name in the Services menu, and the hidden mode is not displayed on the menu menu, so you can set the service to start automatically and the software will start the service automatically during the loading process.
6) Isautostart
The service startup type that identifies whether to start automatically.
7) ThisKey
Returns the form ID, and unique, if the same form exists, the form is not displayed again.
8) Thisname
The form name.
9) Updatedevice
Updates the device data, receiving the device Ondeviceobjectchangedhandler event incoming object instance.
) Removedevice
Remove the device and call this function interface when the device is deleted.
One) Dispose
Frees the resource function.
1.3 Development Service-driven
1) Add a reference to the Superio component.
2) New class, Inherit SuperIO.Services.AppService abstract class, and implement interface function.
3) The cache data of the device can be updated through the Updatedevice interface function.
1.4 Commissioning Service Drivers
Interface mode test is a form interface, must inherit the "Superio.ui." MainForm "class, and use code to set the software platform to debug mode" SuperIO.Device.DebugDevice.IsDebug = true; ",
Initializes the instance in Form_Load, and loads the debug graphics display module, primarily creating an instance, such as: this. Debugappservice ((SuperIO.Services.IAppService) _service) statement. Such as:
1.5 Mount Service Driver
In the "Industrial serial and network software communication platform _superio" directory found "ConfigTool.exe" application, select the "Service Configuration" tab, click on the "Mount Service" button to attach the service driver module just developed to the platform. Such as:
1.6 Running under the software platform
Service type and startup type are used together, the service type is display mode, both manual start and auto start mode are available, the service type is hidden mode, set to auto start mode, so that the service starts automatically during the loading process.
Such as:
Author qq:504547114
QQ Group: 54256083
Official website: http://www.bmpj.net
Source Article address: http://www.bmpj.net/index.php?m=article&f=view&id=7
"Industrial serial and network software Communication Platform (Superio) tutorial" seven. Two-time development service-driven