Clear division of labor between the driver layer and the Application Layer

Source: Internet
Author: User

The peripheral devices of the ATM include card readers, cryptographic keyboards, and flow printers. they interact with the ATM host through the serial port to implement the communication between the host and the peripheral devices.ProgramThe driver library is called, and the software on the screen of the user's ATM machine is the application layer. The application layer calls the driver library to implement various functions of the ATM.

In this mode, Project Division issues often occur: Are some functions stored at the application layer or on the driver layer? The company's developers will face these issues.

In fact, the driver layer only needs to implement simple operations, such as hardware initialization, data transmission, hardware shutdown, card reading, card return, and so on... the logic functions should be implemented at the application layer. For example, when the card will be returned and when the card cannot be entered ..

An image metaphor: The driver layer is a knife, and the application layer is a knife user. This simply implements the cutting function, and this tool is used as a small Li Fei knife, the user (Application Layer) needs to be fully regarded ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.