poscx.h header

This header is used by pos. For more information, see:

poscx.h contains the following programming interfaces:

Functions

 
POS_CX_ATTRIBUTES_INIT

POS_CX_ATTRIBUTES_INIT initializes a POS_CX_ATTRIBUTE structure.
PosCxClaimDevice

PosCxClaimDevice is called to claim a device for exclusive use. The caller should call PosCxReleaseDevice when the device is no longer needed.
PosCxCleanPendingRequests

PosCxCleanPendingRequests is called to cancel all pending requests for a given caller, identified by the open instance.
PosCxCleanupEvents

PosCxCleanupEvents is called to clean up all pending events for a given caller, identified by the open instance.
PosCxClose

PosCxClose is called to delete an opened PosCx library instance. This function releases the device if the caller is the owner, and cancels pending requests. It should be called from the driver's EVT_WDF_FILE_CLOSE callback.
PosCxGetDeviceInterfaceTag

PosCxGetDeviceInterfaceTag returns the device interface tag that is set in PosCxOpen.
PosCxGetPendingEvent

PosCxGetPendingEvent is called either from the device read callback, or when a new event arrives.
PosCxInit

PosCxInit is called to initialize the PosCx library's internal resources. The resources are tied to the device, and are released when the device goes away.
PosCxIsDeviceOwner

PosCxIsDeviceOwner checks if the caller currently owns the claim on the device.
PosCxIsPosApp

PosCxIsPosApp checks if the open instance is associated with a point-of-service application.
PosCxMarkPosApp

PosCxMarkPosApp marks the open instance as associated or not associated with a point-of-service application.
PosCxOpen

PosCxOpen is called to create an open PosCx library instance. This function initializes all resources it needs to manage a single open instance. It should be called from the driver's EVT_WDF_DEVICE_FILE_CREATE callback.
PosCxPutPendingEvent

PosCxPutPendingEvent creates a new event object, copies the event data to the new event object, and tries to delegate it to the waiting caller.
PosCxPutPendingEventMemory

PosCxPutPendingEventMemory tries to delegate a memory object containing the event data to a waiting caller.
PosCxReleaseDevice

PosCxReleaseDevice is called to release a device that was previously claimed with PosCxClaimDevice. Once the device is released, the next pending claim requester is promoted.
PosCxRemoteRequestRelease

PosCxRemoteRequestRelease is called whenever a remote device asks for the device to release. This initiates claim negotiation.
PosCxRetainDevice

PosCxRetainDevice is called to extend the ownership of the device.

Callback functions

 
EVT_POS_CX_DEVICE_OWNERSHIP_CHANGE

The EVT_POS_CX_DEVICE_OWNERSHIP_CHANGE callback is called during the API claim ownership transition. The driver is expected to set the device back to a default state in this routine.
EVT_POS_CX_DEVICE_REMOTE_CLAIM

The EVT_POS_CX_DEVICE_REMOTE_CLAIM callback is called when the device is transitioning from unclaimed to claimed and allows the driver to do additional work.
EVT_POS_CX_DEVICE_REMOTE_RELEASE

The EVT_POS_CX_DEVICE_REMOTE_RELEASE callback is called whenever the device is released and left with no owner and allows the driver to do additional work.
EVT_POS_CX_DEVICE_REMOTE_RETAIN

The EVT_POS_CX_DEVICE_REMOTE_RETAIN callback is called whenever PosCx attempts to hold onto a claim on a network device and allows the driver to do additional work.

Structures

 
POS_CX_ATTRIBUTES

The POS_CX_ATTRIBUTES structure contains pointers to event callback functions implemented by the client driver.

Enumerations

 
POS_CX_EVENT_ATTRIBUTES

The POS_CX_EVENT_ATTRIBUTES describes the priority and access rights for the POS events coming from the device. The values are a combination of the values defined in POS_CX_EVENT_DEST and POS_CX_EVENT_PRIORITY.
POS_CX_EVENT_DEST

The POS_CX_EVENT_DEST defines which applications receive this event.
POS_CX_EVENT_PRIORITY

The POS_CX_EVENT_PRIORITY defines the importance of the event and the order it will be delivered to the client application.