Multi-purpose meter reading machine adapter based on microkernel plug-in and realization method thereof
An implementation method and micro-kernel technology, applied in the field of instruments, can solve the problems of meter reading machines without a unified standard interface, incomplete encapsulation, and inability to meet cross-browser requirements.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0029] figure 1 , figure 2 Described in detail the internal schematic diagram of the universal meter reading machine adapter based on the microkernel plug-in of the present invention, the program application of the microkernel is to realize plug-and-play based on the plug-in, according to the drivers provided by the different types of meter reading machines of various manufacturers Carry out standardized adapter interface encapsulation, set three-layer standardized interface to provide a unified meter reading machine call interface for the application layer to call, the details are as follows:
[0030] The microkernel includes a first layer and a second layer, the first layer is used to abstract the standard adapter interface in the microkernel from the proprietary interfaces of different types of meter reading machines of various manufacturers, and the second layer is used to The standard adapter interface in the microkernel provides an external standard interface;
[0031...
Embodiment 2
[0062]图2、图3给出了本发明具体实现方法,在本实施例中微内核的程序应用是基于插件来实现即插即用的,根据各个厂商的不同种类抄表机提供的驱动程序进行标准化适配器接口封装,设置三层标准化接口对外提供统一的抄表机调用接口,供应用层调用,所述三层标准化接口的实现步骤如下;在微内核分两层进行接口封装,
[0063]步骤一、在第一层内从各个厂商的不同种类抄表机的专有接口中抽象出微内核中的标准适配器接口;第一层用于对抄表机厂商提供的驱动程序进行封装形成动态链接库,接口定制的原则为,将各种抄表机通用的操作抽取出来,参数返回值统一约定,比如上传文件或者下载文件可以分别作为一个接口函数,参数为文件名,返回值为调用抄表机的错误代码。对特定抄表机厂商提供的驱动程序(动态链接库dll形式)进行标准化适配器接口封装。封装代码以类的形式,继承统一接口类HCD_Driver,实现抄表机发送文件(方法sendFileToPC),向抄表机发送文件(方法sendFileToHC),向抄表机发送程序(方法sendProgramToHC)等功能,然后编译成适配器动态链接库,对上层提供类HCD_Driver定义的统一方法。
[0064]步骤二、在第二层内对第一层抽象出的标准适配器接口提供对外的标准接口;采用微软的ActiveX技术,对步骤一提供的抄表机适配器动态链接库进行进一步封装(sendFileToPC、sendFileToHC、sendProgramToHC等方法)与管理,实现抄表机接口在IE浏览器下采用javascript的调用支持。定义类CMeterReaderCtrl,该类对步骤一提供的抄表机适配器提供的每个方法进一步封装,为上层调用,并提供了对抄表机适配器的加载方法useDriver和释放方法unuseDriver等进行管理。
[0065]步骤三、在第三层,即高级应用接口,基于第二层提供的对外标准接口,进一步屏蔽各厂商抄表机语义和缓冲参数的差异,为应用层调用提供语义一致的调用接口。
[0066]利用javascript技术为应用程序提供统一的抄表机调用接口,这层的封装也采用了和步骤一类似的适配器实现方法,提供统一调用OBJECT,名称为MeterReaderCtrl,将步骤二封装的接口提供的各种方法进行第三次封装为各种functinon:sendFileToPC、sendFileToHC、se...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com