ElectronicJournal Class

2/27/2008

Defines the programmatic interface for an Electronic Journal device.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public MustInherit Class ElectronicJournal
    Inherits PosCommon
public abstract class ElectronicJournal : PosCommon
public ref class ElectronicJournal abstract : public PosCommon
public abstract class ElectronicJournal extends PosCommon
public abstract class ElectronicJournal extends PosCommon

Remarks

The Electronic Journal device stores transaction records on digital media as electronic data. If the recording function of the Electronic Journal device is enabled, it stores all printer data that is output to the PosPrinter device. For the FiscalPrinter device, the Fiscal Printing output is always stored.

The Electronic Journal is primarily tasked with storing and transferring transaction data, but may also have the following capabilities:

  • Print stored data on the attached PosPrinter or FiscalPrinter.

  • Erase stored data.

  • Initialize recording medium.

In fiscal environments, Electronic Journal may also let you reprint whole fiscal documents and tickets, specifying a range of ticket numbers or ticket dates and times.

Programming Model

The Electronic Journal writing process is started implicitly when a printing method for the PosPrinter or FiscalPrinter is performed. All output is performed on a first-in first-out basis. Therefore, an ErrorEvent event is delivered if the writing process fails.

ElectronicJournal always performs the following methods synchronously: AddMarkerRetrieveCurrentMarkerRetrieveMarkerRetrieveMarkerByDateTime and RetrieveMarkersDateTime. These methods will fail if output to the PosPrinter or FiscalPrinter is outstanding.

The SuspendPrintContent and SuspendQueryContent methods are also always performed synchronously. But these methods try to stop printing at the next printer operation and may be called when asynchronous output is outstanding. These methods are primarily intended for use in exception conditions when asynchronous output is outstanding.

The following methods are performed either synchronously or asynchronously, depending on the value of the AsyncMode property: EraseMedium, InitializeMedium, PrintContent, PrintContentFile, and QueryContent. When AsyncMode is false, these methods are performed synchronously. A marker can be added where data is stored to be used as an index. The data range can be obtained by adding markers at the beginning and at the end of the data when getting or printing stored data. During asynchronous data printing or transfer process, it can be suspended by interrupt methods.

In fiscal environments the markers are set implicitly by the FiscalPrinter device. The stored data is organized in sessions that correspond to the fiscal days that contain documents that correspond to fiscal tickets. Sessions and documents can be queried by the application indirectly by using the RetrieveMarker, RetrieveMarkerByDateTime, and RetrieveCurrentMarker methods. The returned markers are intended to be used with the PrintContent and QueryContent methods. The content and format of the markers are implementation-specific and do not have to be known or analyzed by the application.

An Electronic Journal device combines both the properties of an input device (query) and an output device (store and print). The data that is stored in the medium is data output into PosPrinter and FiscalPrinter that is electronic data of receipts and its data format depends on the physical device model. The data should be stored in nonvolatile memory, and flash cards; memory cards, CD-RW, and HDD can all be used as physical media. You do not have to distinguish the differences between the physical media.

If the recording medium can be removed from or inserted into the device, a StatusUpdateEvent is delivered when the medium status is changed. Additionally, the medium status can be checked and it can be initialized if it is necessary. The primary responsibility is storing transaction data as it is. Therefore, there are no functions to convert or reprocess the data.

Device Sharing

The Electronic Journal is an exclusive-use device, as follows:

  • The application must claim the device before the application enables it.

  • The application must claim and enable the device before accessing many of the Electronic Journal-specific properties.

  • The application must claim and enable the device before it calls methods that manipulate the device.

Platforms

The ElectronicJournal class requires POS for .NET 1.10 or later versions.

Inheritance Hierarchy

System.Object
   Microsoft.PointOfService.PosDevice
     Microsoft.PointOfService.PosCommon
      Microsoft.PointOfService.ElectronicJournal
         Microsoft.PointOfService.BasicServiceObjects.ElectronicJournalBasic

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

ElectronicJournal Members
Microsoft.PointOfService Namespace