Summary of the invention
In view of this, the present invention provides a kind of automatic vending machine and industrial computer method for communicating of being used for.
A kind of automatic vending machine and industrial computer method for communicating of being used for provided by the invention, after the initialization of automatic vending machine was accomplished, this method comprised:
Automatic vending machine utilizes packet to report the report of the operation information that carries this user's operation and wait for that when this user's action need is replied receiving industrial computer utilizes replying of this user's operation of response package to industrial computer after user's operation takes place this machine;
And automatic vending machine periodically utilizes packet to the industrial computer poll whether indication to be arranged;
If receiving industrial computer, automatic vending machine after by poll, utilize the feedback operation of packet issue to indicate; Then carry out corresponding feedback operation and utilize packet to corresponding the replying of industrial computer response according to the indication information that carries in this feedback operation indication; And, utilize packet to report the report of the operation information that carries this feedback operation, also wait for that receiving industrial computer utilizes replying of this feedback operation of response package to industrial computer;
After by poll, utilize the state reporting of packet issue to indicate if automatic vending machine receives industrial computer, then utilize packet to report the report of the status information that carries corresponding running status to industrial computer;
If receiving industrial computer, automatic vending machine after by poll, utilize the operation control of packet issue to indicate; Then carry out the control operation of corresponding running status according to the control information of carrying in this operation control indication; And,, this operation control indication utilize packet when need replying to corresponding the replying of industrial computer response.
Preferably, after the initialization of automatic vending machine was accomplished, this method further comprised:
Automatic vending machine is after the report that reports the corresponding informance that carries user's operation to industrial computer; If not receiving industrial computer in the given time utilizes replying of response package, then utilize packet to report the report of the corresponding informance that carries this user's operation again to industrial computer;
Automatic vending machine is after the report that reports the corresponding informance that carries the feedback operation to industrial computer; If not receiving industrial computer in the given time utilizes replying of response package, then utilize packet to carry the report of the corresponding informance of this feedback operation again to the industrial computer response to industrial computer.
Preferably, after the initialization of automatic vending machine was accomplished, this method further comprised:
Automatic vending machine utilizes packet to report to industrial computer and carries the report that the status information of this fault takes place in expression after this machine has fault to take place.
Preferably, after the initialization of automatic vending machine was accomplished, this method further comprised:
Automatic vending machine when any indication that needs industrial computer, utilize packet to industrial computer send the correspondence sign carry this indication request, and successively receive this indication of replying and utilizing the packet issue that utilizes response package after industrial computer is receiving request.
Preferably, after the initialization of automatic vending machine was accomplished, this method further comprised:
Automatic vending machine is by after being switched to service mode and attended operation being taken place, utilize packet report to industrial computer this attended operation corresponding informance report and receive industrial computer and utilize replying of response package.
Preferably, after the initialization of automatic vending machine was accomplished, this method further comprised:
Automatic vending machine if not receiving industrial computer in the given time utilizes replying of response package, then utilizes packet to report the report of this attended operation incident again to industrial computer after reporting the attended operation incident to industrial computer.
Preferably, said replying comprises that successful respond and failure reply.
Preferably, the initialization of automatic vending machine comprises:
Automatic vending machine utilizes packet to report the report of this machine of expression electrifying startup, also wait for that receiving industrial computer utilizes replying of response package to industrial computer behind this machine electrifying startup;
Automatic vending machine utilizes packet to report the order of this machine of carrying essential information, also wait for that receiving industrial computer utilizes corresponding the replying of response package to industrial computer after the successful respond of industrial computer to the electrifying startup incident;
Automatic vending machine periodically utilizes packet to the industrial computer poll whether indication to be arranged after the successful respond of industrial computer to this order;
If receiving industrial computer, automatic vending machine after by poll, utilize the operation control of packet issue to indicate; Then carry out the control operation of corresponding running status according to the control information of carrying in this operation control indication; And,, this operation control indication utilize packet when need replying to corresponding the replying of industrial computer response.
Utilize the initialization of packet issue to finish indication if automatic vending machine receives industrial computer, then confirm the initialization completion and utilize packet to reply to the industrial computer response success.
Preferably, this method further comprises:
Automatic vending machine is after representing the report of this machine electrifying startup to industrial computer; If not receiving industrial computer in the given time utilizes replying of response package, then utilize packet to report the report of this machine of expression electrifying startup again to industrial computer;
Automatic vending machine is after reporting the order of this machine of carrying essential information to industrial computer; If not receiving industrial computer in the given time utilizes replying of response package, then utilize packet to report the order of this machine of carrying essential information again to industrial computer to industrial computer to industrial computer.
Preferably, comprise in the packet:
Beginning label is used to represent the beginning of this packet;
Length field is used to represent this length of data package;
The response flag position is used to represent whether this packet needs response;
The version flag position is used to represent the protocol version of this packet;
Type field is used to represent the implication of this packet;
Sequence number is used to represent the serial number of this packet;
Data field is used to carry the information that this packets need is carried;
Verification with, be used for the verification of this packet.
As above visible; The present invention can realize unitized communication the between automatic vending machine and the industrial computer; And can make automatic vending machine report various users operation and the operation information of feedback operation and the status information of this machine running status to industrial computer, the execution that can also make automatic vending machine under the control of industrial computer, accomplish various feedbacks to operate, to the execution of the control operation of this machine running status.Thus, can and share the maintenance management efficient that improves automatic vending machine, also can realize intellectuality control by means of the hardware capabilities of industrial computer to automatic vending machine by means of the information gathering of industrial computer.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, to further explain of the present invention.
The embodiment of the invention provides a kind of VM of being used for and IPC method for communicating to the problem that prior art exists.This method can realize unitized communication the between VM and the IPC; And make VM report various users' operations and the operation information of feedback operation and the status information of this machine running status to IPC based on this communication, the execution that can also make VM under the control of IPC, accomplish various feedbacks to operate, to the execution of the control operation of this machine running status.
Wherein:
User operation can comprise: the inserting coins of coin device, the operation of inserting coins, select the goods button of bank note device, the operation of game keys etc.;
Feedback operation can comprise: the shipment of moving back coin, goods road of moving back the deducting fees of coin, bank note device, bank note device of the deducting fees of coin device, coin device etc.;
Running status (whether fault and other operational factors) can comprise: the state in goods road, the state of showing the position, the state of coin device, the state of bank note device, the state that selects the goods button, the state of game keys, the state of refrigeration compressor, the state of lighting circuit etc.;
Control operation can comprise: the configuration in goods road, the configuration of showing the position, the configuration of coin device, the configuration of bank note device, the configuration of selecting the goods button, the configuration of game keys, the opening and closing of refrigeration compressor, the opening and closing of lighting circuit etc.
Thus, can realize the full spectrum information of VM is collected and to the comprehensive control of VM by IPC.Because IPC has the function of telecommunication and enough hardware capabilities; Thereby; Can realize long-range share (for example realizing long-range sharing) of the information of VM through network by the telecommunications functions of IPC, improving maintenance management efficient to VM, and can realize intellectuality control to VM by enough hardware capabilities of IPC.
Fig. 1 for the embodiment of the invention be used for VM and IPC method for communicating based on the hardware structure synoptic diagram.As shown in Figure 1; For realizing being used for VM and IPC method for communicating in the embodiment of the invention, can in VM, be provided with a master control borad (Vending Machine Controller, VMC), this VMC for example passes through serial ports such as RS232 and link to each other with IPC; And, realize communicating by letter of VM and IPC by this VMC.
In addition, also comprise hardware device and the circuit of realizing the VM basic function among the VM: be used to control VM goods road goods road control circuit, be used to control displaying position control circuit that VM shows the position, be used to realize VM select goods select the goods button, be used to realize VM insert coins and move back coin the coin device, be used to realize VM insert coins and move back coin the bank note device, be used to realize the VM game function game keys, be used to control the VM refrigeration compressor temperature control circuit, be used to control the illumination control circuit of VM illumination.Certainly, for other functional structures that also might comprise among the VM, this paper enumerates no longer one by one.
Fig. 2 is used for the structural representation of the packet that VM and IPC method for communicating be suitable for for the embodiment of the invention.VMC can realize based on packet as shown in Figure 2 with communicating by letter of IPC.Specifically, each byte in the packet as shown in Figure 2 is from low paramount being followed successively by:
The beginning label of 1 byte is used to represent the beginning of this packet;
The length field of 1 byte is used to represent this length of data package;
The tag field of 1 byte; The response flag position whether its highest 1 need respond for this packet of expression; Its minimum 3 are the version flag position (can support 8 versions at most) of the protocol version of this packet of expression, and middle 4 for being used for the reserved place of subsequent expansion;
The type field of 1 byte is used to represent the implication of this packet;
The sequence number of 1 byte, be used for representing this packet at the serial number of reciprocal process (with incremental manner counting capable of circulation;
The data field of 0~255 byte is used to carry the data that this packets need is carried under one's arms;
The verification of 1 byte with, be used for the verification of this packet.
In order to realize that VMC reports the various user's operations of VM and operation information, the running state information of feedback operation to IPC; And; Realize that VMC accomplishes execution, the configuration of parameter and the execution of control operation of the various feedback operations of VM under the control of IPC, the embodiment of the invention has defined corresponding packet.
Please, illustrated in the table 1 by VMC and represented the definition of VM to the various packets of IPC transmission at first referring to table 1.In table 1, be example as type field in order to the value of distinguishing different implication packets with metric numerical value, the value that the value that also need respond as the response flag bit representation with " 1 ", " 0 " need not to respond as the response flag bit representation is an example.
Table 1
Please, the definition to the various packets of the VMC of VM transmission by IPC has been shown in the table 2 again referring to table 2.In table 2, be example as type field in order to the value of distinguishing different implication packets with metric numerical value, the value that the value that also need respond as the response flag bit representation with " 1 ", " 0 " need not to respond as the response flag bit representation is an example.
Table 2
Below, in conjunction with the packet of above-mentioned definition, each flow process that is used for VM and IPC method for communicating in the embodiment of the invention is elaborated respectively.
1) initialization flow process
Fig. 3 is used for the initialization schematic flow sheet of VM and IPC method for communicating for the embodiment of the invention.As shown in Figure 3, the initialization flow process that the embodiment of the invention is used for VM and IPC method for communicating comprises:
S301, VMC utilize packet STARTUP_RPT to report the report of expression VM electrifying startup to IPC behind the VM electrifying startup.
S302, VMC receives the successful respond that IPC utilizes the packet ACK.
In the practical application; Do not utilize packet ACK if receive IPC in the given time; Then might be because packet STARTUP_RPT no show IPC or the issued packet ACK of IPC can't arrive VMC; At this moment, can utilize packet STARTUP_RPT to report the report of this machine of expression electrifying startup again to IPC.
Certainly, VMC also might receive IPC and utilize the failure of packet NAK response to reply, and at this moment, promptly representes the initialization failure, and can utilize packet STARTUP_RPT to report the report of this machine of expression electrifying startup or control VM to close again to IPC;
S303, VMC utilize packet VMC_RPT to report the order of this machine of carrying essential information to IPC after IPC utilizes the successful respond of packet ACK to the electrifying startup incident of packet STARTUP_RPT.
S304, VMC receives the successful respond that IPC utilizes the packet ACK.
In the practical application; If do not receive the successful respond that IPC utilizes the packet ACK in the given time; Then might be because packet VMC_RPT no show IPC or the issued packet ACK of IPC can't arrive VMC; At this moment, can utilize packet VMC_RPT to report the order of this machine of carrying essential information again to IPC.
Certainly; VMC also might receive IPC and utilize the failure of packet NAK response to reply; At this moment, promptly represent the initialization failure, and can return S301 and utilize packet STARTUP_RPT to report the report of this machine of expression electrifying startup or control VM to close again to IPC.
Receive IPC in the given time and utilize after the successful respond of packet ACK, can begin periodically to utilize packet POLL whether indication to be arranged to the IPC poll.
In Fig. 3, comprise that to the operation control indication of POLL issue the response flag position is that to operate equal successful execution be example for 1 HUODAO_IND and POSITION_IND and control corresponding with IPC in the initialization procedure.
S305, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S306; VMC receives IPC and after by poll, utilizes the operation control of packet HUODAO_IND issue to indicate; The configuration operation to the running status in goods road is carried out in the control indication of in according to this operation control indication, carrying, for example, and the corresponding relation in configuration commodity and goods road.
S307, VMC utilizes packet ACK_RPT to reply to the IPC response success behind the configuration operation of completion to the running status in goods road.
S308, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S309; VMC receives IPC and after by poll, utilizes the operation control of packet POSITION_IND issue to indicate; The configuration operation to the running status of showing the position is carried out in the control information of in according to this operation control indication, carrying; For example, a goods number that is shown and the corresponding relation of commodity price are showed in configuration.
S310, VMC utilizes packet ACK_RPT to reply to the IPC response success behind the configuration operation of completion to the running status of displaying position.
Above-mentioned S305~S310 can be regarded as the control of shaking hands first in the initialization flow process, promptly to the goods road and the initial configuration of showing the position, after the initialization flow process is accomplished still can this realization shake hands control, promptly to the config update of goods road and displaying.Certainly, the operation control indication for other packet issues also is in like manner.
Thus, can come to realize neatly maintenance management to the control of VM, thereby improve maintenance management efficient through IPC.
S311, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S312, VMC receive IPC and utilize the initialization of packet INITIAL_OK issue to finish indication, then confirm the initialization completion.
S313, VMC utilize packet ACK_RPT to reply to the IPC response success.
So far, initialization flow process finishes, also can make VM get into mode of operation or service mode.
2), user's operating process and feedback operating process
Fig. 4 is used for user's operating process synoptic diagram of VM and IPC method for communicating for the embodiment of the invention.As shown in Figure 4, be operating as example with Coin operated this user, user's operating process that the embodiment of the invention is used for VM and IPC method for communicating comprises:
S401, VMC the coin device of VM or bank note device take place Coin operated after, utilize packet PAYIN_RPT to report the report that carries this Coin operated operation information to IPC.
After this step; Do not utilize replying of packet ACK or NAK response if receive IPC in the given time; Then might be because packet PAYIN_RPT no show IPC or the issued packet ACK of IPC or NAK can't arrive VMC; At this moment, can utilize packet PAYIN_RPT to report the report that carries this Coin operated operation information again to IPC.
S402, VMC receives IPC and utilizes this Coin operated successful respond of packet ACK.
In this step, it is that expression IPC successfully writes down or other processing this Coin operated operation information that IPC utilizes this Coin operated successful respond of packet ACK.If IPC fails this Coin operated operation information is write down or other processing, then can utilize packet NAK response failure to reply.
So far, the flow process of user's operation finishes.
Certainly, be applicable to above-mentioned flow process as shown in Figure 4 too for the pairing button operation of goods button and game keys that selects of packet BUTTON_RPT.
Fig. 5 a and Fig. 5 b are the feedback operating process synoptic diagram that the embodiment of the invention is used for VM and IPC method for communicating.Fig. 5 a is that IPC indication VMC moves back the coin flow process; Fig. 5 b is that VMC moves back the coin flow process automatically.
Shown in Fig. 5 a, to move back this feedback of coin operation with IPC indication VMC and be operating as example, the feedback operating process that the embodiment of the invention is used for VM and IPC method for communicating comprises:
S501, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
What S502, VMC received that IPC utilizes packet PAYOUT_IND issue after by poll moves back coin operation indication, then moves back the indication information that carries in the coin operation indication according to this and carries out corresponding coin operation of moving back.
S503, VMC complete successfully move back coin operation after, utilize packet ACK_RPT to reply to the IPC response success.
In the practical application, move back the coin operation, then can utilize packet NAK_RPT to reply, promptly need not to carry out again subsequent step this moment to the IPC response success if VMC fails to accomplish.
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; Do not utilize replying of packet ACK or NAK response if receive IPC in the given time; Then might be because packet PAYOUT_RPT no show IPC or the issued packet ACK of IPC or NAK can't arrive VMC; At this moment, can utilize packet PAYOUT_RPT to report again and carry the report that this moves back the operation information of coin operation to IPC.
S505, VMC reception IPC utilizes the packet ACK, and this moves back the successful respond of coin operation.
In this step, it is that expression IPC successfully writes down or other processing the operation information that this moves back the coin operation that IPC utilizes this successful respond of moving back the coin operation of packet ACK.If IPC fails this operation information that moves back the coin operation is write down or other processing, then can utilize packet NAK response failure to reply.
So far, a feedback operating process finishes.
Shown in Fig. 5 b, initiatively to move back this feedback of coin operation with VMC and be operating as example (VMC initiatively move back coin situation occur in user's point beat back coin button, the perhaps overtime coin that moves back of VMC), the feedback operating process that the embodiment of the invention is used for VM and IPC method for communicating 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; Do not utilize replying of packet ACK or NAK response if receive IPC in the given time; Then might be because packet PAYOUT_RPT no show IPC or the issued packet ACK of IPC or NAK can't arrive VMC; At this moment, can utilize packet PAYOUT_RPT to report again and carry the report that this moves back the operation information of coin operation to IPC.
S522, VMC reception IPC utilizes the packet ACK, and this moves back the successful respond of coin operation.
In this step, it is that expression IPC successfully writes down or other processing the operation information that this moves back the coin operation that IPC utilizes this successful respond of moving back the coin operation of packet ACK.If IPC fails this operation information that moves back the coin operation is write down or other processing, then can utilize packet NAK response failure to reply.
So far, a feedback operating process finishes.
Certainly, deduct fees operation and the shipment in VENDOUT_IND and the pairing goods of VENDOUT_RPT road operation for packet COST_IND and pairing coin device of COST_RPT and bank note device are applicable to the above-mentioned flow process shown in Fig. 5 a and Fig. 5 b too.
Based on user's operating process mutual between VM and the IPC and feedback operating process, can make IPC can in time collect the Transaction Information of VM, thereby improve maintenance management efficient.And, because the feedback of VM operation can be controlled by IPC, thereby can control the intellectuality of VM through IPC and realize intelligentized transaction.
Fig. 6 a, Fig. 6 b are based on the synoptic diagram like Fig. 4 and the transaction instance that flow process realizes shown in Fig. 5 a and Fig. 5 b.
At first referring to Fig. 6 a, the process of exchange of buying commodity with user is an example.In Fig. 6 a, comprise:
S601, VMC utilizes packet PAYIN_RPT to report the report that carries this Coin operated operation information to IPC after the bank note device generation of VM is Coin operated.
S602, VMC receives IPC and utilizes this Coin operated successful respond of packet ACK.
S603, VMC utilizes packet BUTTON_RPT to report the report that carries this button operation information to IPC behind the commodity displaying button generation button operation of VM.
At this moment, VMC judges whether to satisfy the shipment condition according to commodity displaying button corresponding commodity storage, commodity price and the user amount of money of inserting coins.When satisfying the shipment condition, the shipment incident will take place.That is, VMC can realize automatic shipment rather than must wait for the indication that IPC utilizes packet VENDOUT_IND to issue.
S604, VMC judges commodity commodity shipment result according to the goods result that falls who falls Cargo Inspection slowdown monitoring circuit feedback.If shipment success, then will deduct user's middle commodity price equivalent amount of inserting coins, and utilize packet VENDOUT_RPT to report the report that carries the shipment object information to IPC by VMC; If the shipment failure, VMC also need utilize packet VENDOUT_RPT to report the report that carries the shipment object information to IPC.
S605, VMC receive the successful respond that IPC utilizes this shipment operation of packet ACK.
After transaction was accomplished, user's point was beaten back the coin button and is moved back the coin time, perhaps moved back coin automatically and moved back the coin incident by VM according to flow process shown in Fig. 5 b according to flow process shown in Fig. 5 a,
S606, after moving back the coin incident, 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 reception IPC utilizes the packet ACK, and this moves back the successful respond of coin operation.
So far, once the flow process of transaction finishes.
Please again referring to Fig. 6 b, with user play, the process of exchange of middle prize is example.After the S601 to S605 in having carried out Fig. 6 a, also comprise among Fig. 6 b:
S626, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S627, VMC make illumination control circuit open the light of gamepad according to the indication that IPC utilizes packet CONTROL_IND to issue.
S628, VMC utilize packet BUTTON_RPT to report the report of the operation information that carries this button operation to IPC behind the gamepad generation button operation of VM.
S629, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S630, VMC make illumination control circuit that the light of gamepad is closed according to the indication that IPC utilizes CONTROL_IND to issue.
S631, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S632, because the user gets the winning number in a bond, therefore, IPC can utilize packet VENDOUT_IND issue shipment operation indication after by poll.Correspondingly; VMC can receive IPC and after by poll, utilize the shipment operation of packet VENDOUT_IND issue to indicate; Corresponding shipment operation is carried out in indication information control goods road according to carrying in this operation indication, offers the user with the commodity with shipment as the recreation prize.
S633, owing to need the commodity of shipment to sell out in the goods road, therefore, VMC utilizes packet NAK_RPT to reply to IPC response failure after the goods road fails completion shipment operation.
S634, VMC utilize packet POLL to the IPC poll whether indication to be arranged.
S635; In order to receive that to failing the user of prize compensates, IPC can utilize packet PAYOUT_IND issue to move back coin operation indication after by poll, so that to the money of user's return with the prize single-candidate; Therefore; What VMC received that IPC utilizes packet PAYOUT_IND issue after by poll moves back coin operation indication, then moves back the indication information control coin device that carries in the coin operation indication according to this and carries out the corresponding coin operation of moving back, so that the user obtains the coin with the prize single-candidate.
S636, VMC complete successfully move back coin operation after, utilize packet ACK_RPT to reply to the 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 reception IPC utilizes the packet ACK, and this moves back the successful respond of coin operation.
So far, once the flow process of transaction finishes.
Flow process like above-mentioned two transaction instances is visible; Because the VMC of VM can communicate with IPC; Therefore; Make that not only transaction that VM realizes can be by the timely record of IPC, but also the transaction that can make VM realize can realize intelligent adjustment neatly according to actual conditions, thereby can improve maintenance management efficient, and realize the intellectuality control of transaction VM.
3) state reporting flow process and control operation flow process
Fig. 7 is used for the state reporting schematic flow sheet of VM and IPC method for communicating for the embodiment of the invention.As shown in Figure 7, be example to report goods road state, the state reporting flow process that the embodiment of the invention is used for VM and IPC method for communicating comprises:
S701, VMC utilize packet POLL to the IPC poll whether indication to be arranged.Wherein, this packet POLL periodically sends.
S702, VMC receive IPC and after by poll, utilize the state reporting in the goods road of packet GET_HUODAO issue to indicate.
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 finishes.
Certainly; The state reporting of the state reporting that whether breaks down for packet GET_STATUS and pairing other hardware devices of STATUS_RPT and circuit and the operational factor of GET_INFO and pairing other hardware devices of INFO_RPT and circuit is applicable to above-mentioned flow process as shown in Figure 7 too.
And HUODAO_RPT can directly report when the goods road breaks down, and STATUS_RPT can directly report when other hardware devices and circuit break down.
Fig. 8 is used for the State Control schematic flow sheet of VM and IPC method for communicating for the embodiment of the invention.As shown in Figure 8, show that with control the running status of position is an example, the State Control flow process that the embodiment of the invention is used for VM and IPC method for communicating comprises:
S801, VMC utilize packet POLL to the IPC poll whether indication to be arranged.Wherein, this packet POLL periodically sends.
S802; VMC receives IPC and after by poll, utilizes the operation control of packet POSITION_IND issue to indicate; The configuration operation to the running status of showing the position is carried out in control information according to carrying in this operation control indication; The goods number that the displaying position that disposes during for example, with initialization is shown and the corresponding relation of commodity price upgrade.
S803, VMC utilizes packet ACK_RPT to reply to the IPC response success behind the configuration operation of completion to the running status of displaying position.
In the practical application, accomplish configuration behaviour, then utilize packet NAK_RPT to reply to IPC response failure to the running status of showing the position if VMC fails.
So far, once the flow process of operation control finishes.
Certainly, the configuration operation for the corresponding goods road of packet HUODAO_IND is applicable to above-mentioned flow process as shown in Figure 8 too.And, need not to reply to IPC again, and can directly return execution initialization flow process as shown in Figure 3 again after restarting resetting for the corresponding reboot operation that resets of packet RESET_IND.
Fig. 9 a and Fig. 9 b are the synoptic diagram based on the intelligent control examples that realizes like Fig. 7 and flow process as shown in Figure 8.
At first referring to Fig. 9 a, reporting the running status in goods road with IPC request VMC is example.In Fig. 9 a, comprise:
S901, VMC utilize packet POLL to the IPC poll whether indication to be arranged.Wherein, this packet POLL periodically sends.
S902, VMC receive IPC and after by poll, utilize the state reporting in the goods road of packet GET_HUODAO issue to indicate.
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.
The flow process of primary information request so far ,/reply finishes.
Please again referring to Fig. 9 b, reporting the operational factor in goods road with IPC request VMC is example, in Fig. 9 b, comprises:
S911, VMC utilize packet POLL to the IPC poll whether indication to be arranged.Wherein, this packet POLL periodically sends.
S912, VMC receive IPC and after by poll, utilize the operational factor in the vending machine of packet GET_INFO issue, such as vending machine accumulative total sales data, active user insert coins total charge information, vending machine clock information etc.
S913, VMC utilize packet INFO_RPT to report information requested among the GET_INFO to IPC.
So far, primary information request, the flow process that reports finish.
It more than is the detailed description that the embodiment of the invention is used for VM and IPC method for communicating.
In practical application, the embodiment of the invention is used for the hardware configuration that VM and IPC method for communicating can be carried on VMC and is achieved.
Figure 10 is used for the exemplary configurations synoptic diagram of the VMC of VM and IPC method for communicating for supporting the embodiment of the invention.Shown in figure 10, can realize in the embodiment of the invention that the VMC of this method comprises:
Can receive the processor of indication to the IPC reporting information and from IPC;
Can supply the mutual external interface of processor and IPC;
Can supply processor respectively with VM in hardware device and the mutual some corresponding internal interface of circuit.
Wherein, external interface can be a serial line interface, for example the RS232 interface; Internal interface then is the interface of the interface protocol coupling of hardware device corresponding with it or circuit.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.