6.3.4 Audit
Audit information is provided by OPC UA Events. The VendingBaseAuditEventType defined in 7.26 and its subtypes are used for all audit information. The general audit collect is supposed to subscribe to all Events of VendingBaseAuditEventType from all UIs, all machine engines, the payment service and all payment devices having their own OPC UA Server of the Vending Machine. The optional, specialized tax audit component would only subscribe to Events relevant for the tax regulations.
An audit collect may need identification information of the components its accesses, and as special case for the payment service also the identification of the payment devices. This is provided by the IdentificationType.
For some payment devices, it is required to access configuration information in order to interpret the audit information. Potentially, also the current content of those payment devices needs to be accessed, which in principle could be calculated out of the Events if the initial content is known. This information is provided by Objects of PaymentDeviceType.
As a Vending Machine may be configured not to work when no audit is collected, the audit collect provides a IsCollectingAudit Variable which may be supervised by the payment service, which may reject new requests while the audit is not collected.
In Figure 17, an overview of the needed components and the interfaces used is given.

An OPC UA Server may represent several components of a Vending Machine, and as a special case, for the payment service, the payment devices. All those components individually generate Events of VendingBaseAuditEventType, in order to relate the Events to the corresponding component. The audit collect should subscribe to the 0:Server Object and filter for Events of VendingBaseAuditEventType to receive all audit information of the individual components of an OPC UA Server. In Figure 18, an example is given of an OPC UA Server AddressSpace, providing a machine engine and a payment service with two payment devices. X:MyMachineEngine, X:MyPaymentService, X:MyCoins and X:MyBills are all of TypeDefinitions generating Events of VendingBaseAuditEventType. At the bottom of Figure 18 some examples of Events are sketched, showing how the SourceNode and SourceName of the Events are identifying the source of the Events.
