The Design and Implementation of Control System of the Automatic Gate Machine
|School||Harbin Institute of Technology|
|Keywords||Automatic fare collection system Automatic ticket machines Snapshot Memory pool|
With the rapid development of urban rail transit AFC system is becoming increasingly important. Automatic ticket machines , also known as gates , is one of the key equipment of urban rail transit automatic fare collection system , which uses the intelligent recognition system of internal movement of individual behavior on the environment through the turnstiles channel identification, in order to achieve the automatic ticket . The turnstiles previous system real strong, unexpected power failure cause damage to files , device drivers are not unified code maintainability , excessive memory fragmentation problems . In this paper, propose practical solutions to these problems and achieve . First , the problem of poor code maintainability , the main solution structure of the system re- design of the control system is divided into three parts , based on hierarchical thinking , namely: the interface layer device communication layer , business logic processing layer , the rights transferred to the business logic layer interface control from the underlying driver to control . Secondly , the gates are often abnormal case of power failure , although the uninterruptible power protection software system to perform complete data file trading , but still often the case of file corruption , address this issue , the main solution is to use the snapshot technology , by writing before copy technology to protect files and to restore the file . Third , excessive memory fragmentation problems , memory pool handle , not only can improve the speed of the application memory , you can also prevent memory leaks . This paper not only proposed a reasonable solution of the above problems , the concrete realization of the control system of the automatic ticket machine in a Linux system environment using C language . The test results show that the above problem has been solved , and improved performance , better able to be applied to the gates of the high-volume devices .