The Software Design of Modular Instrument Based on Proxy Pattern
Nan Sheng, Yahai Wang · 2018
Modular instrument has the advantages of small volume, low cost, and strong flexibility. It has been widely used in testing systems and testing instruments. In the design of the traditional modular instrument software, the function of each module calls from the top layer to the underlying hardware to read and write between different interfaces, including the external application interface, the command parsing interface, and the hardware reading and writing interface. To increase or decrease the module function, it is necessary to re edit the contents of the above interface. If the modular instrument itself does not have an independent development interface, each change needs to be compiled by an external host and downloaded into the module and then verified by the external host. This repeated download and verification caused great inconvenience to the debugging and maintenance of software. This paper introduces the design pattern to the development of module software, and designs proxy software for the software in the modular instrument. The proxy software has a general data interface, and as a solid data interaction and data processing core, agents for each measurement mode of data from the external application layer to the kernel hardware layer transmission, analysis, reading and writing. Taking the software design of LXI wide band down conversion module as an example, this paper starts with the requirement analysis of the wide band down conversion module, and gives the module software design architecture based on the proxy mode. The internal software of the wide band down conversion module is designed as proxy software, and the solution is given for the complex data transmission and the generality of the agent in the proxy software.