Summary of the invention
In view of this, the invention provides a kind of method communicated with industrial computer for automatic vending machine.
A kind of method for communicating with industrial computer for automatic vending machine provided by the invention, after the initialization of automatic vending machine completes, the method comprises:
Automatic vending machine, after the machine generation user operation, utilizes packet to report the report of the operation information carrying this user operation to industrial computer and wait-receiving mode industrial computer utilizes the response of this user operation of response package when this user operation needs to reply;
And automatic vending machine periodically utilizes packet whether to have instruction to industrial computer poll;
If automatic vending machine receives industrial computer in the polled rear feedback operation instruction utilizing packet to issue, then perform corresponding feedback according to the indication information carried in this feedback operation instruction operate and utilize packet to the response of industrial computer response correspondence, and, utilize packet to report the report of operation information of carrying this feedback operation and the response that utilizes this feedback of response package to operate of wait-receiving mode industrial computer to industrial computer;
If automatic vending machine receives industrial computer in the polled rear state reporting instruction utilizing packet to issue, then packet is utilized to report the report of the status information carrying corresponding running status to industrial computer;
If automatic vending machine receives industrial computer and controls instruction in the polled rear operation utilizing packet to issue, the control information then controlling to carry in instruction according to this operation performs the control operation of corresponding running status, and controlling instruction in this operation needs to utilize packet to respond corresponding response to industrial computer when replying.
Preferably, after the initialization of automatic vending machine completes, the method comprises further:
Automatic vending machine is after the report reporting the corresponding informance carrying user operation to industrial computer, the response that industrial computer utilizes response package if do not receive in the given time, then utilize packet again to report the report of the corresponding informance carrying this user operation to industrial computer;
Automatic vending machine is after the report reporting the corresponding informance carrying feedback operation to industrial computer, the response that industrial computer utilizes response package if do not receive in the given time, then utilize packet again to carry the report of the corresponding informance of this feedback operation to industrial computer response.
Preferably, after the initialization of automatic vending machine completes, the method comprises further:
Automatic vending machine, after the machine has fault to occur, utilizes packet to report the report carrying and represent the status information that this fault occurs to industrial computer.
Preferably, after the initialization of automatic vending machine completes, the method comprises further:
Automatic vending machine, when any instruction needing industrial computer, utilizes packet send the request of the correspondence mark carrying this instruction to industrial computer and successively receive this instruction that industrial computer utilizes the response of response package upon receiving a request and utilize packet to issue.
Preferably, after the initialization of automatic vending machine completes, the method comprises further:
Automatic vending machine is being switched to service mode and after there is attended operation, is utilizing packet to report the report of the corresponding informance of this attended operation to industrial computer and receive the response that industrial computer utilizes response package.
Preferably, after the initialization of automatic vending machine completes, the method comprises further:
Automatic vending machine is after reporting attended operation event to industrial computer, and the response that industrial computer utilizes response package if do not receive in the given time, then utilize packet again to report the report of this attended operation event to industrial computer.
Preferably, described response comprises successful respond and unsuccessfully replys.
Preferably, the initialization of automatic vending machine comprises:
Automatic vending machine, after the machine electrifying startup, utilizes packet to report the report that represents the machine electrifying startup and wait-receiving mode industrial computer utilizes the response of response package to industrial computer;
Automatic vending machine, after industrial computer is to the successful respond of electrifying startup event, utilizes packet to report the order that carries local basic information and the response that utilizes response package corresponding of wait-receiving mode industrial computer to industrial computer;
Automatic vending machine, after industrial computer is to the successful respond of this order, periodically utilizes packet whether to have instruction to industrial computer poll;
If automatic vending machine receives industrial computer and controls instruction in the polled rear operation utilizing packet to issue, the control information then controlling to carry in instruction according to this operation performs the control operation of corresponding running status, and controlling instruction in this operation needs to utilize packet to respond corresponding response to industrial computer when replying;
If automatic vending machine receives the initialization that industrial computer utilizes packet to issue terminate instruction, then confirm that initialization completes and utilizes packet to reply to industrial computer response success.
Preferably, the method comprises further:
Automatic vending machine is after reporting the report representing the machine electrifying startup to industrial computer, the response that industrial computer utilizes response package if do not receive in the given time, then utilize packet again to report the report representing the machine electrifying startup to industrial computer;
Automatic vending machine is after reporting the order carrying local basic information to industrial computer, the response that industrial computer utilizes response package if do not receive in the given time, then utilize packet again to report the order carrying local basic information to industrial computer.
Preferably, packet comprises:
Beginning label, for representing the beginning of this packet;
Length field, for representing the length of this packet;
Response flag position, for representing that this packet is the need of response;
Version flag position, for representing the protocol version of this packet;
Type field, for representing the implication of this packet;
Sequence number, for representing the serial number of this packet;
Data field, for carrying the information that this packets need is carried;
School Affairs, for the verification of this packet.
As above visible, the present invention can realize the unitized communication between automatic vending machine and industrial computer, and automatic vending machine can be made to report the operation information of various user operation and feedback operation and the status information of the machine running status to industrial computer, can also make automatic vending machine under the control of industrial computer, complete the execution of various feedback operation, the execution to the control operation of the machine running status.Thus, can by means of the information of industrial computer and share the maintenance management efficiency improved automatic vending machine, the intelligentized control method that also can realize automatic vending machine by means of the hardware capabilities of industrial computer.
Embodiment
For making object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment referring to accompanying drawing, the present invention is described in more detail.
The embodiment of the present invention, for prior art Problems existing, provides a kind of method communicated for VM and IPC.The method can realize the unitized communication between VM and IPC, and enable VM report the operation information of various user operation and feedback operation and the status information of the machine running status to IPC based on this communication, can also make VM under the control of IPC, complete the execution of various feedback operation, the execution to the control operation of the machine running status.
Wherein:
User operation can comprise: the coin of coin device, the coin of paper money device, select the operation of goods button, the operation etc. of game keys;
Feedback operation can comprise: the shipment etc. of moving back coin, goods road of moving back coin, the deducting fees of paper money device, paper money device of the deducting fees of coin device, coin device;
Running status (whether fault and other operational factors) can comprise: the state in goods road, show the state of position, state, the state of paper money device, the state selecting goods button, the state of game keys, the state of refrigeration compressor, the state etc. of lighting circuit of coin device;
Control operation can comprise: the configuration of the configuration in goods road, the configuration showing position, coin device, the configuration of paper money device, the configuration selecting goods button, the configuration of game keys, the opening and closing of refrigeration compressor, the opening and closing etc. of lighting circuit.
Thus, can be realized the full spectrum information collection of VM and the comprehensive control to VM by IPC.Because IPC has the function of telecommunication and enough hardware capabilities, thus, telecommunications functions by IPC can realize the information of VM teleengineering support (such as by real-time performance teleengineering support), to improve the maintenance management efficiency to VM, and the intelligentized control method to VM can be realized by enough hardware capabilities of IPC.
The method that Fig. 1 communicates for VM and IPC for the embodiment of the present invention based on hardware structure schematic diagram.As shown in Figure 1, for realizing in the embodiment of the present invention for method that VM and IPC communicates, one master control borad (Vending Machine Controller can be set in VM, VMC), this VMC is connected with IPC by serial ports such as such as RS232, further, the communication of VM and IPC is realized by this VMC.
In addition, also comprise the hardware device realizing VM basic function and circuit in VM: for control VM Huo Daohuo road control circuit, for control VM show position displaying position control circuit, for realize VM select goods select goods button, for realize VM coin and move back coin coin device, for realize VM coin and move back coin paper money device, for realize VM game function game keys, for control VM refrigeration compressor temperature control circuit, for control VM throw light on illumination control circuit.Certainly, for other functional structures also likely comprised in VM, will not enumerate herein.
The method that Fig. 2 communicates for VM and IPC for the embodiment of the present invention the structural representation of packet that is suitable for.The communication of VMC and IPC can realize based on packet as shown in Figure 2.Specifically, each byte in packet as shown in Figure 2 to be paramountly followed successively by from low:
The beginning label of 1 byte, for representing the beginning of this packet;
The length field of 1 byte, for representing the length of this packet;
The tag field of 1 byte, its the highest 1 represents the response flag position of this packet the need of response, its minimum 3 are the version flag position (can support at most 8 versions) of the protocol version representing this packet, and middle 4 is the reserved place for subsequent expansion;
The type field of 1 byte, for representing the implication of this packet;
The sequence number of 1 byte, for representing the serial number of this packet in reciprocal process (incrementally counting capable of circulation;
The data field of 0 ~ 255 byte, for carrying the data that this packets need is carried under one's arms;
The School Affairs of 1 byte, for the verification of this packet.
The various user operation of VM and operation information, the running state information of feedback operation is reported to IPC in order to realize VMC, and, realize VMC under the control of IPC, complete the execution of the various feedbacks operation of VM, the configuration of parameter and the execution of control operation, the embodiment of the present invention defines corresponding packet.
Please first see table 1, the definition being represented the various packets that VM sends to IPC by VMC is shown in table 1.In Table 1, for metric numerical value as type field in order to distinguish the value of different implication packet, also for " 1 " responsively marker bit represent value that needs respond, " 0 " responsively marker bit represent the value without the need to response.
Table 1
Please again see table 2, the definition of the various packets sent to the VMC of VM by IPC is shown in table 2.In table 2, for metric numerical value as type field in order to distinguish the value of different implication packet, also for " 1 " responsively marker bit represent value that needs respond, " 0 " responsively marker bit represent the value without the need to response.
Table 2
Below, in conjunction with packet defined above, each flow process in the method communicated for VM and IPC in the embodiment of the present invention is described in detail respectively.
1) initialize flow
Initialize flow schematic diagram in Fig. 3 method that to be the embodiment of the present invention communicate for VM and IPC.As shown in Figure 3, the initialize flow that the embodiment of the present invention is used in the method that communicates of VM and IPC comprises:
S301, VMC, after VM electrifying startup, utilize packet STARTUP_RPT to report the report representing VM electrifying startup to IPC.
S302, VMC receive the successful respond that IPC utilizes packet ACK.
In practical application, if do not receive IPC in the given time to utilize packet ACK, likely then cannot arrive VMC because packet STARTUP_RPT does not arrive the issued packet ACK of IPC or IPC, now, packet STARTUP_RPT can be utilized to IPC again to report the report representing the machine electrifying startup.
Certainly, VMC also likely receives the failed response that IPC utilizes packet NAK to respond, and now, namely represents initialization failure, and packet STARTUP_RPT can be utilized again to report the report of expression the machine electrifying startup or control VM to close to IPC;
S303, VMC, after IPC utilizes packet ACK to the successful respond of the electrifying startup event of packet STARTUP_RPT, utilize packet VMC_RPT to report the order carrying local basic information to IPC.
S304, VMC receive the successful respond that IPC utilizes packet ACK.
In practical application, the successful respond that IPC utilizes packet ACK if do not receive in the given time, likely then cannot arrive VMC because packet VMC_RPT does not arrive the issued packet ACK of IPC or IPC, now, packet VMC_RPT can be utilized to IPC again to report the order carrying local basic information.
Certainly, VMC also likely receives the failed response that IPC utilizes packet NAK to respond, now, namely represent initialization failure, and S301 can be returned utilize packet STARTUP_RPT again to report to IPC to represent that the report of the machine electrifying startup or control VM close.
Receive after IPC utilizes the successful respond of packet ACK in the given time, can start periodically to utilize packet POLL whether to have instruction to IPC poll.
Comprising response flag position for IPC in initialization procedure for the operation control instruction that POLL issues in figure 3 is HUODAO_IND and POSITION_IND of 1 and the corresponding equal successful execution of control operation.
S305, VMC utilize packet POLL whether to have instruction to IPC poll.
S306, VMC receives IPC and controls instruction in the polled rear operation utilizing packet HUODAO_IND to issue, the configuration operation to the running status in goods road is performed in the control instruction controlling to carry in instruction according to this operation, such as, the corresponding relation in configuration commodity and goods road.
S307, VMC, after completing the configuration operation to the running status in goods road, utilize packet ACK_RPT to reply to IPC response success.
S308, VMC utilize packet POLL whether to have instruction to IPC poll.
S309, VMC receives IPC and controls instruction in the polled rear operation utilizing packet POSITION_IND to issue, the configuration operation to the running status of showing position is performed in the control information controlling to carry in instruction according to this operation, such as, the goods number of configuration displaying shown by position and the corresponding relation of commodity price.
S310, VMC, after completing the configuration operation to the running status of showing position, utilize packet ACK_RPT to reply to IPC response success.
Above-mentioned S305 ~ S310 can be regarded as control of shaking hands first in initialize flow, Ji Duihuo road and shows the initial configuration of position, still can in the config update of this controls that realizes shaking hands, Ji Duihuo road and displaying position after initialize flow completes.Certainly, it is also in like manner that the operation of issuing for other packets controls instruction.
Thus, namely realize maintenance management neatly by the control of IPC to VM, thus improve maintenance management efficiency.
S311, VMC utilize packet POLL whether to have instruction to IPC poll.
S312, VMC receive the initialization that IPC utilizes packet INITIAL_OK to issue and terminate instruction, then confirm that initialization completes.
S313, VMC utilize packet ACK_RPT to reply to IPC response success.
So far, initialize flow terminates and VM can be made to enter mode of operation or service mode.
2), user operation flow process and feedback operating process
User operation schematic flow sheet in Fig. 4 method that to be the embodiment of the present invention communicate for VM and IPC.As shown in Figure 4, for this user operation Coin operated, the user operation flow process that the embodiment of the present invention is used in the method that communicates of VM and IPC comprises:
S401, VMC the coin device of VM or paper money device occur Coin operated after, utilize packet PAYIN_RPT to report the report carrying this Coin operated operation information to IPC.
After this step, if do not receive the response that IPC utilizes packet ACK or NAK to respond in the given time, likely then cannot arrive VMC because packet PAYIN_RPT does not arrive issued packet ACK or NAK of IPC or IPC, now, packet PAYIN_RPT can be utilized to IPC again to report the report carrying this Coin operated operation information.
S402, VMC receive IPC and utilize this Coin operated successful respond of packet ACK.
In this step, IPC utilizes this Coin operated successful respond of packet ACK to be represent that successfully Coin operated to this operation information of IPC records or other process.If IPC fails, the operation information Coin operated to this records or other process, then packet NAK can be utilized to respond and unsuccessfully reply.
So far, the flow process of a user operation terminates.
Certainly, for the above-mentioned flow process selecting the button operation of goods button and game keys to be applicable to as shown in Figure 4 too corresponding to packet BUTTON_RPT.
Feedback operating process schematic diagram in Fig. 5 a and Fig. 5 b method that to be the embodiment of the present invention communicate for VM and IPC.Fig. 5 a is that IPC indicates VMC to move back coin flow process; Fig. 5 b is that VMC moves back coin flow process automatically.
As shown in Figure 5 a, indicate VMC to move back coin operate this feedback and be operating as example with IPC, the feedback operating process that the embodiment of the present invention is used in the method that VM and IPC communicates comprises:
S501, VMC utilize packet POLL whether to have instruction to IPC poll.
S502, VMC receive IPC polled rear utilize packet PAYOUT_IND to issue move back coin operation instruction, then move back the indication information that carries in coin operation instruction and perform according to this and corresponding move back coin operation.
S503, VMC be successfully completed move back coin operation after, utilize packet ACK_RPT to reply to IPC response success.
In practical application, if VMC has failed move back coin operation, then packet NAK_RPT can be utilized to the response of IPC response success, now namely without the need to performing subsequent step again.
S504, VMC utilize packet PAYOUT_RPT to report to IPC and carry the report that this moves back the operation information of coin operation.
After this step, if do not receive the response that IPC utilizes packet ACK or NAK to respond in the given time, likely then cannot arrive VMC because packet PAYOUT_RPT does not arrive issued packet ACK or NAK of IPC or IPC, now, packet PAYOUT_RPT can be utilized again to report to IPC and to carry the report that this moves back the operation information of coin operation.
S505, VMC receive IPC utilize packet ACK this move back coin operation successful respond.
In this step, IPC utilizes this successful respond of moving back coin operation of packet ACK to be represent that the operation information that IPC successfully moves back coin operation to this records or other process.If IPC fail to this move back coin operation operation information record or other process, then packet NAK can be utilized to respond and unsuccessfully to reply.
So far, a feedback operating process terminates.
As shown in Figure 5 b, with VMC initiatively move back coin operate this feedback be operating as example (VMC initiatively move back coin situation occur in user point beat back coin button, or VMC time-out moves back coin), the feedback operating process that the embodiment of the present invention is used in the method that communicates of VM and IPC comprises:
S521, VMC utilize packet PAYOUT_RPT to report to IPC and carry the report that this moves back the operation information of coin operation.
After this step, if do not receive the response that IPC utilizes packet ACK or NAK to respond in the given time, likely then cannot arrive VMC because packet PAYOUT_RPT does not arrive issued packet ACK or NAK of IPC or IPC, now, packet PAYOUT_RPT can be utilized again to report to IPC and to carry the report that this moves back the operation information of coin operation.
S522, VMC receive IPC utilize packet ACK this move back coin operation successful respond.
In this step, IPC utilizes this successful respond of moving back coin operation of packet ACK to be represent that the operation information that IPC successfully moves back coin operation to this records or other process.If IPC fail to this move back coin operation operation information record or other process, then packet NAK can be utilized to respond and unsuccessfully to reply.
So far, a feedback operating process terminates.
Certainly, for the shipment operation in the goods road corresponding to operation and VENDOUT_IND and VENDOUT_RPT of deducting fees of the coin device corresponding to packet COST_IND and COST_RPT and paper money device, above-mentioned flow process is as shown in figure 5 a and 5b applicable to too.
Based on user operation flow process mutual between VM and IPC and feedback operating process, IPC can be enable to collect the Transaction Information of VM in time, thus improve maintenance management efficiency.And, because the feedback operation of VM can be controlled by IPC, thus intelligentized transaction can be realized by the intelligentized control method of IPC to VM.
Fig. 6 a, Fig. 6 b are the schematic diagram of the transaction examples based on such as Fig. 4 and flow process realization as shown in figure 5 a and 5b.
First see Fig. 6 a, the process of exchange of commodity is bought for user.Comprise at Fig. 6 a:
S601, VMC, after the paper money device generation of VM is Coin operated, utilize packet PAYIN_RPT to report the report carrying this Coin operated operation information to IPC.
S602, VMC receive IPC and utilize this Coin operated successful respond of packet ACK.
S603, VMC, after the commodity displaying button generation button operation of VM, utilize packet BUTTON_RPT to report the report carrying this button operation information to IPC.
Now, VMC judges whether to meet shipment condition according to commodity storage corresponding to commodity displaying button, commodity price and the user amount of money of inserting coins.When meeting shipment condition, shipment event will be there is.That is, VMC can realize automatic shipment instead of must wait for the instruction that IPC utilizes packet VENDOUT_IND and issues.
S604, VMC judge commodity commodity shipment result according to the goods result of falling falling Cargo Inspection slowdown monitoring circuit feedback.If shipment success, then will deduct commodity price equivalent amount in user's coin, and utilize packet VENDOUT_RPT to report the report carrying shipment object information to IPC by VMC; If shipment failure, VMC also needs to utilize packet VENDOUT_RPT to report the report carrying shipment object information to IPC.
S605, VMC receive the successful respond that IPC utilizes this shipment of packet ACK to operate.
After having concluded the business, user's point is beaten back coin button and is moved back the coin time according to flow process as shown in Figure 5 a or automatically move back coin according to flow process as shown in Figure 5 b by VM and also moves back coin event,
S606, after moving back coin event, VMC utilizes packet PAYOUT_RPT to report to IPC and carries the report that this moves back the operation information of coin operation.
S607, VMC receive IPC utilize packet ACK this move back coin operation successful respond.
So far, the flow process of once concluding the business terminates.
Please again see Fig. 6 b, carry out playing for user, the process of exchange of middle prize.After performing the S601 to S605 in Fig. 6 a, also comprise in Fig. 6 b:
S626, VMC utilize packet POLL whether to have instruction to IPC poll.
The instruction that S627, VMC utilize packet CONTROL_IND to issue according to IPC, makes illumination control circuit open the light of gamepad.
S628, VMC, after the gamepad generation button operation of VM, utilize packet BUTTON_RPT to report the report of the operation information carrying this button operation to IPC.
S629, VMC utilize packet POLL whether to have instruction to IPC poll.
The instruction that S630, VMC utilize CONTROL_IND to issue according to IPC, makes illumination control circuit be closed by the light of gamepad.
S631, VMC utilize packet POLL whether to have instruction to IPC poll.
S632, because user gets the winning number in a bond, therefore, IPC can utilize packet VENDOUT_IND to issue shipment operation instruction after polled.Correspondingly, VMC can receive IPC in the polled rear shipment operation instruction utilizing packet VENDOUT_IND to issue, control goods road according to the indication information carried in this operation instruction and perform corresponding shipment operation, so that the commodity of shipment are supplied to user as game prize.
S633, owing to needing the commodity of shipment to sell out in goods road, therefore, VMC, after goods road has failed shipment operation, utilizes packet NAK_RPT to respond to IPC and unsuccessfully replys.
S634, VMC utilize packet POLL whether to have instruction to IPC poll.
S635, in order to compensate the user failing to receive prize, IPC can utilize packet PAYOUT_IND issue to move back coin operation instruction after polled, so that return the money with prize single-candidate to user, therefore, VMC receive IPC polled rear utilize packet PAYOUT_IND to issue move back coin operation instruction, then move back the indication information that carries in coin operation instruction and control coin device according to this and perform and corresponding move back coin operation, obtain the coin with prize single-candidate to make user.
S636, VMC be successfully completed move back coin operation after, utilize packet ACK_RPT to reply to IPC response success.
S637, VMC utilize packet PAYOUT_RPT to report to IPC and carry the report that this moves back the operation information of coin operation.
S638, VMC receive IPC utilize packet ACK this move back coin operation successful respond.
So far, the flow process of once concluding the business terminates.
Flow process as above-mentioned two transaction examples is visible, because the VMC of VM can communicate with IPC, therefore, the transaction not only making VM realize can by the timely record of IPC, but also the transaction that VM can be made to realize can realize intelligent adjustment neatly according to actual conditions, thus can improve the maintenance management efficiency of VM and the intelligentized control method of realization transaction.
3) state reporting flow process and control operation flow process
State reporting schematic flow sheet in Fig. 7 method that to be the embodiment of the present invention communicate for VM and IPC.As shown in Figure 7, to report goods road state, the state reporting flow process that the embodiment of the present invention is used in the method that communicates of VM and IPC comprises:
S701, VMC utilize packet POLL whether to have instruction to IPC poll.Wherein, this packet POLL periodically sends.
S702, VMC receive the state reporting instruction of IPC in the polled rear goods road utilizing packet GET_HUODAO to issue.
S703, VMC utilize packet HUODAO_RPT to report the report of the status information of the running status of carrying in stockit is available road to IPC.
So far, the report flow of a running status terminates.
Certainly, the state reporting of the operational factor of the state reporting whether broken down for other hardware devices corresponding to packet GET_STATUS and STATUS_RPT and circuit and other hardware devices corresponding to GET_INFO and INFO_RPT and circuit, is applicable to above-mentioned flow process as shown in Figure 7 too.
And HUODAO_RPT directly can report when goods road breaks down, STATUS_RPT directly can report when other hardware devices and circuit malfunctions.
State control flow schematic diagram in Fig. 8 method that to be the embodiment of the present invention communicate for VM and IPC.As shown in Figure 8, to control to show the running status of position, the state control flow that the embodiment of the present invention is used in the method that VM and IPC communicates comprises:
S801, VMC utilize packet POLL whether to have instruction to IPC poll.Wherein, this packet POLL periodically sends.
S802, VMC receives IPC and controls instruction in the polled rear operation utilizing packet POSITION_IND to issue, the control information controlling to carry in instruction according to this operation performs the configuration operation to the running status of showing position, such as, the corresponding relation of the goods number shown by the displaying position configured during initialization and commodity price is upgraded.
S803, VMC, after completing the configuration operation to the running status of showing position, utilize packet ACK_RPT to reply to IPC response success.
In practical application, if VMC has failed to the configuration behaviour of the running status of showing position, then utilize packet NAK_RPT to respond to IPC and unsuccessfully replied.
So far, the flow process once running control terminates.
Certainly, for the configuration operation in goods road corresponding to packet HUODAO_IND, above-mentioned flow process is as shown in Figure 8 applicable to too.And for reset reboot operation corresponding to packet RESET_IND, without the need to again to IPC response, and execution initialize flow as shown in Figure 3 directly can be returned again after reset is restarted.
Fig. 9 a and Fig. 9 b is the schematic diagram of the intelligentized control method example based on such as Fig. 7 and flow process realization as shown in Figure 8.
First see Fig. 9 a, VMC is asked to report the running status in goods road for IPC.Comprise in fig. 9 a:
S901, VMC utilize packet POLL whether to have instruction to IPC poll.Wherein, this packet POLL periodically sends.
S902, VMC receive the state reporting instruction of IPC in the polled rear goods road utilizing packet GET_HUODAO to issue.
S903, VMC utilize packet HUODAO_RPT to report the report of the status information of the running status of carrying in stockit is available road to IPC.
So far, the flow process of primary information request/response terminates.
Please again see Fig. 9 b, ask VMC to report the operational factor in goods road for IPC, comprise in figure 9b:
S911, VMC utilize packet POLL whether to have instruction to IPC poll.Wherein, this packet POLL periodically sends.
S912, VMC receive the operational factor of IPC in the polled rear vending machine utilizing packet GET_INFO to issue, and such as vending machine cumulative sale data, active user insert coins total charge information, vending machine clock information etc.
S913, VMC utilize packet INFO_RPT to report the information of asking in GET_INFO to IPC.
So far, primary information request, the flow process reported terminate.
It is more than the detailed description to the method that the embodiment of the present invention communicates for VM and IPC.
In actual applications, the embodiment of the present invention can be carried in the hardware configuration of VMC for the method that VM and IPC communicates and be achieved.
Figure 10 is an example arrangement schematic diagram of the VMC supporting the method that the embodiment of the present invention communicates for VM and IPC.As shown in Figure 10, the VMC that can realize the method in the embodiment of the present invention comprises:
The processor that can indicate to IPC reporting information and from IPC reception;
Can for processor and the mutual external interface of IPC;
Can for processor respectively with the hardware device in VM and the mutual some corresponding internal interface of circuit.
Wherein, external interface can be serial line interface, such as RS232 interface; Internal interface is then the interface of the interface protocol coupling of a hardware device corresponding with it or circuit.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.