[Serialization] Design and Implementation of the C # communication (Serial Port and network) framework-2. Overall Design of the framework,

Source: Internet
Author: User

[Serialization] Design and Implementation of the C # communication (Serial Port and network) framework-2. Overall Design of the framework,

Contents

C # design and implementation of communication (Serial Port and network) framework... 1

(SuperIO)-overall framework design... 1

Chapter II Overall framework design... 2

2.1 Host Program Design... 2

2.2 communication mechanism design... 7

2.2.1 serial communication mechanism... 8

2.2.1.1 round robin mode... 9

2.2.2 network communication mechanism... 9

2.2.2.1 polling mode... 9

2.2.2.2 concurrency mode... 10

2.2.2.3 automatic control mode... 11

2.3 layers... 12

2.4 model object... 13

2.5 Summary... 13

 

Chapter 2 Overall framework design 2.1 Host Program Design

As a plug-in application framework, a Host Program is required to carry and load plug-ins, provide a runtime environment for plug-ins and drivers, and seamlessly interconnect the Host Program with the plug-ins. The relationship between the host Program and the plug-in is the relationship between water and fish. If there is no fish in the water, the water will lose its value. If there is no water in the fish, the fish will die. From the perspective of relationship, what is the purpose of the development framework? Is related to other things, including: developers, secondary developers, applications, plug-ins, and even other software or components. The more relationships occur and the more harmonious the relationship gets, the higher the value of this framework. Therefore, a good framework platform not only reflects the developer's technology, but also reflects the developer's emotional intelligence.

The SuperIO framework uses the NET reflection technology to develop plug-in management mechanisms. In this chapter, we will not detail the specific technical details, but will introduce the technical applications in detail in Chapter 8th plug-in engine design.

So how should the Host Program of a framework be designed? Or in what ways should we consider design issues? I have been thinking about this issue when developing the SuperIO framework. First, this problem should not be considered from the technical perspective, but from the perspective of people to consider how to do it, from the perspective of the application, the perspective of secondary developers to plan the Host Program.

From the application perspective, the host program should include: user Management, Device Driver Management, device status monitoring, custom UI plug-in display, custom output data plug-in operation, service mode of service plug-ins, monitoring mode of software operation, serial port i/O channel monitoring and network I/O channel monitoring. These are planned in the big direction and need to be further refined to guide our development work.

User Management: supports the allocation of multiple users and user permissions. For the real-time data collection framework, in the face of on-site applications, there will certainly be two roles involved: user and engineer personnel. For user permission positioning: You can view parameters and data information. Permission positioning for engineer personnel: not only has the permission to use personnel, but also can modify parameters. User-managed menus, such:

Author: Wei Xiaozhi

Email: 504547114@qq.com

QQ: 504547114

. NET Development Technology Alliance: 54256083

Document Download: http://pan.baidu.com/s/1pJ7lZWf

Http://www.bmpj.net

 

Related Article

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.