This article is very early to study the procedure analysis of procedures, and it is the first technical article I wrote (now I don't seem to have any technical content). :) The reason why dares to put it here, mainly for my blog to make commemoration. It has been more than three years from the beginning, from the beginning, C is, I haven't heard of the road to today's computer, full of bumpy and bitterness, left hard and sweat, of course also got a fruitful fruit. These helpments from CSDN can't open, here I not only learned the technology, but more importantly, I learned how to be a person, be a person who is passionate about life, be a helpful person ... Thanks CSDN, thank you I am honored to be a programmer, I am willing to be a programmer.
I will put on my usual learning and feelings to help those friends who have only walked on the road to learn. Don't be like me ---- less walking, the same as I am also a senior rookie, friends in thinking resonance. Get your pointing from a friend who is already a old bird.
Thank you! !
The customer's information is required to be placed in the database, but in order to describe clearer, we describe the data structure. If the principle is understood, the database problem is solved.
For queuing systems, you should first consider its main logic function, that is, customer queuing, and all other features
They are all carried out.
First solve the function of the so-called sign ticket, carefully consider it is not difficult to find, we can use the queue to be implemented.
First, due to the performance of the system, the cyclic queue is used. The units in each queue are a structure, and each structure should be included:
Service information and logo
2. Service category number
3. Queue serial number
4. Accept the same service waiting customers
5. Date, time, etc.
That is, the information on the waiting ticket.
Whenever a new user is sent, you will be registered by the signboard. Since each user needs to serve different services, the service needs to be told when registered, which is part of the human-machine interface. Then you need to use the head pointer of the queue. When each desk needs to serve the user, the service person gives a "call" instruction, then use the head pointer to read the user of the current pointer to the current customer. After the data, you should display the current customer number, and the main screen must also display which desk reading data, thinking that the main screen display is actually completed by the current reading of the customer data, it is better. The service desk will be sent to the home screen to the home screen, and then you can display the information correctly: for example the bank system
Once the service person starts serving customers, the service person should issue a "determination" instruction. At this time, the queue should be modified, which is queue. The head pointer of the queue refers to the next structural unit, which is in the system to continue to serve other customer service, ensuring that other service desk can continue to read the customer who is not served.
Other parts are hardware programming, as long as the hardware interface criteria are provided, the target is clear, and it is not very difficult.
Understand the main logic function, look at the organization of the entire system:
A class can be set separately with the service desk: the system requires up to 64 desk, we can quickly expand, generate the desk object.
For customers, only one curler is required, and each of the client records can be added, and then the system adds a structure according to the number of records, and there is a problem here. Since we don't know how many customers have to serve the day, the system has established a structural array, so we should consider chain storage structures, so we have to join in the above structure. Structural pointers, whenever a customer is registered, then the system should assign the structural address address of this new customer to the structural pointer in the structure of the previous customer. (This is a better design, but because the system is one of the schemes requires a limited time limit, it is possible to establish an array when the system starts. Ok, since it understands the description of the data structure, let's take a look at the implementation of the database:
The individual properties in the structure is actually a lot of fields in the database, of course, the system requires a lot of fields. For customer information that makes an appointment in advance, we only have to create a data table. When this customer arrives, it is possible. If there is a customer's information, the current customer service is over, and immediately serve the reservation customer.
The previous queue modification, etc., the real database is replaced, you don't need to worry, I told it just to understand the database role in the database, but you must be familiar with the database operation command of the development tool.
There is only one database, and each desk should be operated. When a service desk begins to serve the customer service, the current customer information should be deleted to save resources (there is no value in this information service), and this time Information about other customers (such as the number of customers in front) is not accurate), it doesn't matter, because the main screen will display which customer needs service. So you can estimate the time you have to wait.
OK, I feel that this is the most important, but nothing is also very important, because I don't know what you want, so I wrote this first. If you don't know, you say the specific point, I do my best . Hardware control section, I have not done, but it is not difficult, just give specific hardware standards, there is no problem.
There are a lot of system requirements, but the main problems are solved, and other functional requirements are only slowly improved.
Let me talk about the sort of the system requirements, which is sorted from the client to the server's database, I am not necessarily necessary, because each customer gets the ticket, you can get yourself from the data of the last customer. Several, otherwise add hardware costs, not cost-effective. Because reading a database is required to write, while writing is to write twice before reading.