EXP402 Developing Point of Service (POS) Applications with POS...

23

Transcript of EXP402 Developing Point of Service (POS) Applications with POS...

Page 1: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS
Page 2: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Introduction to Microsoft Windows Embedded for Point of Service (WEPOS) and Microsoft Point of Service for .NET

Unified Point of Service (UPOS) and Point of Service (POS) for .NET

POS for .NET Applications

Page 3: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Retail and POS markets widely use Microsoft operating systems

WEPOS offers a standard platform for the retail industry, and much more

POS 1.11 SDK on Microsoft.com Downloads

Page 4: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Unified Point Of Service is

Abstract hardware and software

one application supports many POS devices of the same type

No recompile of applications if hardware fails

Combines OPOS and JavaPOS specifications

POS Device

Application

UnifiedPOS Device

UnifiedPOSControl Object

UnfiedPOSService Object

UPOS

Page 5: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

POS for .NET is a .NET implementation of UPOS

Plug and Play is at the heart of POS for .NET

Legacy support for OPOS

POS for .NET SDK

Develop POS Applications and service objects in .NET

Run time for Microsoft Windows XP Professional, WEPOS, Windows Vista Business, and Windows Vista Ultimate, 32bit and 64bit

POS for .NET 1.11 supports UPOS v1.11

Page 6: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

POS Device

Application

Device Driver

PosExplorer

Service Object

POS for .NET

OPOS DriverService Object

POS Device

Application

Control ObjectActiveX

OPOS

InterOp

Page 7: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

PosExplorer enumerates POS devices

Service Object DLLs with the paths listed in the following registry key:

HKLM\SOFTWARE\POSfor.NET\ControlAssemblies

Configuration XML files for Service Objects listed in the following registry key:

HKLM\SOFTWARE\POSfor.NET\ControlConfigs

OPOS drivers in the following registry key:HKLM\SOFTWARE\OLEforRetail\ServiceOPOS(\<type>\<device>)

Page 8: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Finally, there is a set sequence to enable/perform action/disable the device

1. OPEN – Open access to the SO

2. CLAIM – Get exclusive access to the device

3. DeviceEnable – Enable the device

4. Perform device action

5. DeviceDisable – Disable the device

6. RELEASE – Release exclusive access to the device

7. CLOSE – Close access to the device

Page 9: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Each device needs to be handled differently

USB Devices – Implement an DeviceAddedEvent and DeviceRemovedEvent

Printer and cash drawer sharing the same COM port – disable/enable to alternate between the two devices

Poll Display – Initialize on application startup and never shut down

Scanner – Re-enable device after a DataEvent

Page 10: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

One form in a multi-form application controls the POS devices

Keyboard wedges – Many Bar Code Scanners and MSR act as keyboard wedges

Devices can be added and removed without changing the application

No Service Object available for keyboard wedges

Focus must be on the control (Text Box) to scanned or swipe in data

A POS for .NET’s key feature is data event handling

Page 11: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Applications

Page 12: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

BumpBar

CashChanger

CashDrawer

Cat

CheckScanner

CoinDispenser

FiscalPrinter

HardTotals

Keylock

LineDisplay

Micr

MotionSensor

Msr

PinPad

PointCardRW

PosKeyboard

PosPower

PosPrinter

Scale

SignatureCapture

SmartCardRW

Bill Acceptor

RemoteOrderDisplay

Electronic Journal

ToneIndicator

Image Scanner

Biometrics

CoinAcceptor

Scanner

Bill Dispenser

Page 13: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Typically written by device manufacturers and shipped with the device

May be installed by Infor stand alone installer (drag-and-drop)

Derive from either Interface, Basic, or Base class

Scanner

Scanner Device

Scanner Service Object

Device Driver

Page 14: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

POS for .NET SDK comes with two service objects with source code

Sample Service ObjectsUSB bar code, Scanners and MSRs

Microsoft.PointOfService.ExampleServiceObjects.dll –.

SimulatorsScanners, MSR, LineDisplays etc

Microsoft.PointOfService.DeviceSimulators.dll –

Page 15: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Posdm.exe command-line tool

Exposes WMI via command line

Manual setup required to address Firewall

WMI Classes (root\MicrosoftPointOfService)

ServiceObject – Information about installed SOs

POSDevice – Information about installed devices

LogicalDevice – Alias for POSDevice

DeviceProperty – name/value pair set on POSDevice

WMI Server Extensions for .NET applications

MMC snap-in coming

All tools support remote management

Performance Monitor Counters

Page 16: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

POSDM.EXE SOManager.exePerformance Monitor (ensure POS Perf Counters Service Started)

Page 17: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Check for Application and Service Object compatibility

POS for .NET 1.11 loads .NET Framework 2.0

POS for .NET 1.1x and older loads .NET Framework 1.1

POS for .NET version in the registry:

HKLM/Software/POSfor.NET/Setup/ProductVersion

Page 18: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Check for Compatibility

POS for .NET Application Service Object Compatible

POS for .NET 1.11

(synchronized with

UPOS v1.11

UPOS v1.11 UPOS v1.11 Yes

UPOS v1.11 UPOS v1.8 or v1.9 No

UPOS v1.8 or v1.9 UPOS 1.11 Workaround

required

POS for .NET 1.1

(synchronized with

UPOS v1.9)

UPOS v1.8 UPOS v1.8 Yes

UPOS v1.8 UPOS v1.9 Yes

UPOS v1.9 UPOS v1.8 Yes

UPOS v1.9 UPOS v1.9 Yes

POS for .NET 1.0

(synchronized with

UPOS v1.8)

UPOS v1.8 UPOS v1.8 Yes

UPOS v1.8 UPOS v1.9 No

UPOS v1.9 UPOS v1.8 No

UPOS v1.9 UPOS v1.9 No

Check the versions of SO and applications

Page 19: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Older POS for .NET applications running under POS for .NET 1.11 will fail to load properly

Application will attempt to load .NET Framework 1.1

Is unable to load POS for .NET 1.11 because POS for .NET 1.11 needs .NET Framework 2.0

There are a few solutions…

Page 20: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Solutions for older POS for .NET applictions:

1. Uninstall the .NET Framework 1.1 from the machine.

1. An application built against .NET Framework 1.1 will load the .NET Framework 2.0 if the .NET Framework 1.1 is not installed.

2. Add a Config file that instructs the application to load the .NET Framework 2.0 instead of the .NET Framework 1.1

Foo.exe – config file will be Foo.exe.config

Foo.exe.config must be in the same directory as Foo.exe

Foo.exe.config file would look like the following:<?xml version ="1.0"?><configuration><startup><supportedRuntime version="v2.0.50727"

/></startup></configuration>

3. Recompile the application against the .NET Framework 2.0

Page 21: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

POS for .NET is .NET implementation of UPOS

Write applications in Visual C# or Visual Basic .NET

Architect the application to handle multiple devices

Service Objects and managing Service Objects

are at the center of POS for .NET

Page 22: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

Visit the Windows Embedded for Point of Service Web page

http://www.microsoft.com/windows/embedded/wepos

Evaluate Windows Embedded for Point of Service 120-day

trial version

http:// www.windowsembeddedkit.com/

Visit WEPOS support page at XPe Center @ seanliming.com

http:// www.seanliming.com

Sign up for the Embedded DevWire

http://msdn.microsoft.com/embedded/community/community/devwire/default.aspx

Engage with Windows Embedded Partners

http://www.mswep.com

Page 23: EXP402 Developing Point of Service (POS) Applications with POS fordocshare02.docshare.tips/files/31010/310105509.pdf · 2017. 1. 17. · POS for .NET is a .NET implementation of UPOS

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it

should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.