UNIFIEDPOS V2

UNIFIEDPOS V2
Target Audiences

Vendor developers
New to UnifiedPOS
 Used UnifiedPOS V1


Application Vendors






Thin client developers need it all
Teaching a class on UnifiedPOS V2
ARTS Designers for other 29 devices or other new
devices.
ARTS UnifiedPOS Infrastructure Developer
new UnifiedPOS Members
Finally college students
One goal of training


One goal is to provide an intermediate step
between those who only want to implement
against the framework and the detailed
documentation.
It provides an oriented overview to UnifiedPOS V2
What are your benefits and how simple is it to use the framework






No programming language restrictions due to web
service approach
Enabler technology for integrating customer apps
and thin clients into shops
Easy vendor integration by compatibility bridges
Easy consumer integration by language specific Apis
Advanced and completed functionality compared to
V1
Single approach, no different standards like
JavaPOS, WSPos, OPOS etc
General Overview


UnifiedPOS V2 is the Next Generation
Architectural Specification for Flexible
Connectivity Scenarios Between POS
Applications, Local and Mobile Terminal Devices,
and Local, Mobile and POS Hardware Devices.
UnifiedPOS V2 Expands Upon the Experience
Gathered Over the Years with the ARTS
UnifiedPOS V1 Standard.
Design Goals… Why V2
UnifiedPOS V2 is Intended to be Both Operation System (OS) Independent and Application
Development Language Neutral and Encompasses the Following Design Tenets:
 Expands the Core Principals Developed With the First Generation UnifiedPOS V1 Devices
 Supports a Set of Retail Device Behaviors for a Wide Range of Local and Distributed POS
Solutions
 Based on a Distributed Processing Architecture
 Increases Hardware Modularization
 Network Connected Systems
 Internet Connectivity and Its Usage for POS systems
 Support for Virtual POS Systems
 Utilizes XML Messaging Technologies
 Supports for Cloud Based Services
 Support for Software as a Service (SAAS)
 Support for Hardware as a Service (HAAS)
 Support Mobile Terminal Devices and mobile POS Hardware usage
V2.0 Release

UPOS 1 POS Devices –








POS Printer
Barcode Scanner
MSR
Scale
Cash Drawer
MICR
Motion Sensor
Infrastructure Implementation

POS For .NET only in UPOS V2 First Release



Visual Studio – C# code
Java in Future Release
Documentation


EA Implementation Drawings
Help & Manual HTML documentation
UPOS V2 First Release Deliverables





.NET Reference Implementation in C#
HTML Documentation using Help & Manual V7
and Enterprise Architect V12.1
7 out of the UPOS V1.x 36 POS Devices
Instructive POS Device Simulator to Help Ease
the Learning Curve and Foster Faster Adoption
WSDL’s for the Devices
Worst Case Scenario





What happens if it doesn’t work?
How do I troubleshoot it?
What if the problem is a bug in the
infrastructure?
What if I’m misusing it and don’t realize it?
My boss doesn’t care whose problem it is, he has
a deadline or an unhappy customer and wants it
fixed. It is the developer who has to figure it out.
UnifiedPOS V2 Architecture
UPOS V1 Architecture Components

UnifiedPOS defines a multi-layered architecture in which a POS
Application interacts with the Physical or Logical Device through the
UnifiedPOS Control layer.
POS Application
UnifiedPOS Device
UnifiedPOS Control
UnifiedPOS Service
Physical (or logical) Device
Client Application
UPOS V2
Components
UPOS V2 Consumer Layer
N
E
T
W
O
R
k
Process or System
Boundary
UPOS V2 Provider Layer
UPOS
V2
Device
Service
UPOS V2 Vendor Device Service
Device Hardware
Consumer Layer




Don’t want to bother the app dev with binding
information, special restrictions, protocols.
One interface which shields technical problems
Vendor doesn’t need to understand all the
classes but only have to take care of the
methods specific for my device.
Describe how to use the methods
Provider Layer




How do you choose which binding is for you –
rest, soap, …
“Vendor Framework”
- audience who wants to use framework
- Audience who wants to dig deeper.
Vendor Layer



Devices support primitives, typical of the
category
Business use cases are integrated by the
provider layer, e.g. complex formatting of
documents
Simple programming model, concurrency,
security issues, web service technology is
provided by the framework
act UnifiedPOS V2 Architecture
Application
Session
Management
UnifiedPOS Device Specific Interface
Discovery Interface
UnifiedPOS V2
Infrastructure
UnifiedPOS Application Programming Interface (API)
Security Interface
Security
UnifiedPOS Device Object - E.G. Instance of a Printer
Serv ice Consumer Adapter (Proxy)
SOAP
(WSDL)
Service Consumer
REST
Factory
In-Proc
UPOSMessage - Semantic Message
Interface
Service Provider
:Security
Device Service
Serv ice Prov ider Adapter
UnifiedPOS Device Service Interface (SPI)
Vendor Device Service
Dev ice Driv er (Vendor Defined Driv er)
OS Specific Hardware Driver (USB, Serial, Parallel,
Network...
Hardw are
Exception
Architecture
How do I connect?
UnifiedPOS Device Discovery




How do you find the devices?
Local registry, similar to the V1 concepts, but
homogenous and central for all supported
platforms
Central repository (will be designed with V 2.x)
Web based technologies, like UDP
Session Semantics
flow chart SessionSemantics
Consumer Side
Prepare my environment
POS Application
Returns device
properties. Filled
with
category/vendor
specific defaults
Local Read
Reads and Sets
device properties
locally
Local Write
Consumer side
collection of device
properties
Provider Side
Return Session ID
Use my session ID
OpenDeviceSession
GetDeviceProperties
Idle Session
Claim Device
Use the consumer
cached collection of
device properties
SetDeviceProperties
Active Session
Some operation, e.g.
PrintNormal are
executed in the
context of the desired
device properties
Session Management
Business Process SessionManagement
Application
ClaimDevice
GetDeviceProperties
ReleaseDevice
OpenDeviceSession
Consumer
Claim Device
Release Device
Close Device Session
KeepAlive
IsClaimed
Prov ider
OnOpenDeviceSession
OnClaimDevice
OnReleaseDevice
OnCloseDeviceSession
Vendor
Session Timing
sd SessionTimingDiagram
Applicatin 1
Application 2
MyPrinter
OpenProviderSession()
SessionID()
OpenProviderSession()
SessionID()
GetDeviceProperties()
Device Properties()
GetDeviceProperties()
Set Printer Specific Properties()
TypeFace,
Size,
Bitmap,
etc.
Device Properties()
Set Printer Specific Properties()
Type Face,
Size,
Bitmap,
Claim Device()
etc.
Set Device Properties()
Print Normal()
Release Device()
Claim Device()
Set Device Properties()
Print Normal()
Release Device()
CloseDeviceSession()
CloseDeviceSession()
Apply Delta of
properties. If the
session is the same as
the last active session,
then build delta to
previous session.
Otherwise build delta
for Upos/vendor
default
Security
Security

Security consists mainly of three different things:
 Am
I authenticated to make this connection?
 Am I authorized to perform the requested action?
 Can anybody intercept and read my communication
along the chain?
UnifiedPOS Security
flow chart Security Authentication/Authorization (AutAut)
POS Application
Consumer API
Passes Credentials
Provider API
Access to
chosen protocol
Verifies
Authentication and
Authorization
Vendor Security
Implementation
Either a device vendor or
a POS application vendor
specific implementation of
Authorization/Authentication
Vendor
Implementation
Device Authentication
sd Dev iceAuthentication Timing
POS Application
Consumer API
AuthenticateDeviceRequest()
Provider API
Vendor Device
Needs Reviewing
AuthenticateDeviceRequest()
AuthenticateDeviceResponse()
AuthenticateDeviceResponse()
Does this go to the Vendor?
When a device is successfully authenticated, a StatusUpdateEvent with the following StatusUpdateNotification fields
should be sent:
StatusUpdateEvent => StatusUpdateNotification
⦁
StatusSource = "DeviceAuthentication"
⦁
StatusValue = "DeviceAuthenticated"
Device Deauthentication
Needs Reviewing
sd Dev iceDeAuthentication Timing
POS Application
Consumer API
Provider
DeauthenticateDeviceRequest()
DeauthenticateDeviceRequest()
DeauthenticateDeviceResponse()
DeauthenticateDeviceResponse()
When a device is successfully deauthenticated, a StatusUpdateEvent with the following
StatusUpdateNotification fields should be sent:
⦁
StatusSource = "DeviceAuthentication"
⦁
StatusValue = "DeviceDeauthenticated"
Vendor Device
UnifiedPOS V2 Events



How do you register for events?
When programming against the consumer API:
use language specific event patterns (Listeners,
Delegates)
When programming directly against the provider
API: either polling approach or callback
approach, depending on security issues and
capabilities of programming language
UnifiedPOS Exception Architecture
Business Process Exception Architecture
Prov ider
Inproc - Exception
Rest - 500 with payload
Vendor
Consumer
Inproc - pass exception through
Sync - throw exception
Exception
SOAP - convert to fault
Async - Fire Error
Application
Exception Examples
flow chart Exception Architecture Example
Use Case: Consumer API
Calls PrintNormal
without claim
POS Application
Fires UposException with
UposProviderError as detail or
sends OperationalFailedEvent with
UposException as event message
Vendor API
Provider API
Consumer API
Fires UposException,
contains
UposProviderError as
detail
Returns
UposProviderError
Use Case: REST Consumer
Call
PrintNormal
without claim
REST Client
Vendor API
Provider API
Receives HTTPSTATUS (400, 500)
and UposProviderError serialized as
JSON/XML as payload
Fires UposException,
contains
UposProviderError as
detail
Use Case: raw SOAP consumer
Calls
PrintNormal
without claim
SOAP client with
generated proxy
Provider API
Receives HTTPSTATUS (400,500)
and UposProviderError serialized as
JSON/XML as payload
Vendor API
Fires UposException,
contains
UposProviderError as
detail
Asynchronous Operation
Async Queue Control
Business Process Queue Control
Async Queue
Execute Method Requests
as stored in the queue
Owns
Delivers AsyncComplete event (incl. Response)
to consumer and POS Application + Error Event
Device Category
Instance
Provider Instance, e.g.
printer or scale
Owns
Delivers StatusUpdate Notifications to the
consumer and thus the POS Application
Heartbeat Queue
Calls PollStatusNotifications method
and signals the Keep Alive
This is the only place where the heartbeat queue is shown
Is that right?
Heartbeat








Inside consumer
Keep alive scenario is modeled
Do not rely on callback channels need continuous
Consumer fires these to the provider. When stops after
configurable time – session cleared and auto cleaned up
Should be on the session only on the thick client one of
the reasons there is a consumer layer
Vendor doesn’t care about this
Queues are part of the consumer layer – the app or
vendor do not have to deal with this
If session goes idle for too long application hangs at
some point the provider will detach itself from the
consumer and become available for other consumers.
Async Input Timing
sd Async Input Timing
POS Application
Consumer API
Consumer
Thread/Queue
Scale Provider
Service Instance
Async Mode True()
Initialize Thread()
What is the difference
between input and output
slides?
ReadWeight()
Enqueue ReadWeight Request()
ReadWeight()
ReadWeight OK()
Push DataEvent()
Deliver DataEvent()
Async Output Timing
sd Async Output Timing
POS Application
Consumer API
Consumer
Thread/Queue
POSPrinter
Provider Service
Instance
AsyncMode True()
Initialize Thread()
PrintNormal()
Enqueue PrintNormal Request()
PrintNormal()
PrintNormal OK()
Push Output Complete Event()
Deliver Output Complete Event()
Async Continuous Timing
sd Async Continuous Timing
Consumer Side
POS Application
Consumer API
Provider Side
Consumer
Thread/Queue
UnifiedPOS
Scanner Provider
Instance
UnifiedPOS Async
Input Thread
Vendor Driver
Implementation
AsyncMode True()
Initialize Thread()
AsyncMode True()
Initialize Thread()
Peek Data()
Peek Data()
InputData Event()
InputData Event()
GetInputData()
Returns array of InputData()
DataEvent 1()
DataEvent 2()
Architecture options
Interface Options




In Proc
Web Services
Rest
Custom bindings (acc to the web service
implementations with Java / .net)
Thin Client
Thin client application

This person needs to have deep understanding
because they are implementing the whole thing.
UPOS V2
Thin Client View
Thin Client Application
S
O
A
P
R
E
S
T
UPOS V2 Device Service
Device Hardware
Process or System
Boundary
Thick Client
UPOS V2
Thick Client View
Thick Client Application
C# or Java Method Calls
UPOS V2 Consumer Layer
S
O
A
P
R
E
S
T
UPOS V2 Device Service
Device Hardware
Process or System
Boundary
In proc models
UPOS V2
In-Proc Client
View
Thick Client Application
C# or Java Method Calls
UPOS V2 Consumer Layer
C# or Java Method Calls
UPOS V2 Device Service
Device Hardware
Vendor Perspective
Thick Client Application
Vendor Perspective
C# or Java Method Calls
UPOS V2 Consumer Layer
S
O
A
P
R
E
S
T
Process or System
Boundary
UPOS V2 Provider Layer
UPOS
V2
C# or Java Method Calls
Device
Service
UPOS V2 Vendor Device Service
Device Hardware
Device Categories
Device Categories (first release)







Barcode Scanner
Cash Drawer
MICR
Motion Sensor
MSR
POS Printer
Scale
Device Category Architecture
UnifiedPOS Common
Device Category Common
Device Category Specific
Consumer
Provider
Vendor
Common to 2 or more
device categories
Common across a
device category
Device category specific
Device Category Example
UnifiedPOS Common
Non-changeable
characteristics
of the device
Changeable
characteristics
of the device
UnifiedPOS Common
Device Capabilities
Behavior
Device Settings
Device Status
Common Methods
performed by/on
the device
Current status
of the device
UnifiedPOS Common Device Capabilities










Compare Firmware Version
Consumer Version
Device Category
Device Name
Firmware Version
Power Reporting
Supported Status Types
Update Firmware
Update Statistics
Vendor Version
UnifiedPOS Common Device Settings









Settings are changed by a Behavior
Clear Map
Clear Value
Get Enumeration
Get Map
Get Raw Hash Map
Get Setting Object
Merge Settings
Reset Modifier Flag
Set Value
Session and Settings
Get Settings
Inactive
Session
Consumer
SessionID
OpenDeviceSession
Read Only
Settings
Default Settings
SessionID + Device Settings
Apply Settings
Provider Side
Session Cache
Active
Session
Update Device Settings,
Only changed settings
UnifiedPOS Common Behaviors










Async (Input/Provider)
Buffered Operation
Calibrate
Callback
Check Health
Consumer
Data Encryption
Device Configuration
Device Housing
Device Setting










Device Status
Diagnostics
I18n
Output
Power Reporting
Provider
Security
Session
Statistics
Vendor
Buffered Operation
the TransactionPrint functionality of the
printer uses this principle. The idea is to
start a transaction from that on all items
are not printed directly but buffered on
provider side until a “commit” releases the
sequence to the device or a “clear output”
discards the buffered transaction.
Buffered Operation
sd BufferedOperation Timing
POS Appl i cati on
Consumer
Provi der
Provi der Buffer
Create Sessi on()
Sessi onID()
Sessi onID()
Start T ransacti on()
Start T ransacti on()
Operati onT ransacti onID
()
Operati onT ransacti onID()
Conti nue T ransacti on()
Buffer T ransacti on Request()
Conti nue T ransacti on()
Buffer T ransacti on Request()
Commi t T ransacti on()
Commi t T ransacti on()
Pri nt Request()
Abort T ransacti on()
Abort T ransacti on
Cl ear Buffer()
Vendor
Check Health
The request parameter contains a checkHealthLevel property which indicates the
type of health check to be performed on the device. The following values may be
specified:
•
CheckHealthLevel.Internal = 1: Perform a health check that does not
physically change the device. The device is tested by internal tests to the
extent possible.
•
CheckHealthLevel.External = 2: Perform a more thorough test that may
change the device.
A text description of the results of this method is placed in the CheckHealthText
property. The CheckHealth text is vendor specific.
The CheckHealth method is always called in a synchronous way.
Return - One of the following values is returned by the method:
•
bool Succeeded - Indicates that the health checking procedure was initiated
properly and, when possible to determine, indicates that the device is healthy.
•
Exception, e.g. ECommonErrorNumbers.ILLEGAL - The specified health check
level is not supported.
Check Health Timing
sd CheckHealth
POS Application
Consumer
Producer
Vendor Device
CheckHealthRequest()
CheckHealthRequest()
CheckHealthResponse()
CheckHealthResponse()
UnifiedPOS Common Device Status








Status Identifier
Status Source
Status Value
Estimated Duration in Seconds
Notification Occurred At
Provider Tick Count
Tick Count
Operational State
Device Category Common








Configuration
Capabilities
Behaviors
Settings
Statistics
Status
Data Types
Request/Response
Consumer, Provider, Vendor
Device Category Consumer





Check Health
Claim Device
Execute Vendor Command
Release Device
Retrieve Statistics
Device Category Provider




Apply Settings
Get Settings
Is Alive
RetrieveStatistics
Device Category Vendor Architecture Base




Cache
Session
Device Status
Vendor Commands
Device Category Vendor – Cache Methods





AddCacheItem
ContainsCacheItem
GetCachedItem
GetCacheItemsCount
RemoveCacheItem
Device Category Vendor – Session Methods









DeInitializeVendorAPI
EnsureClaimed
IsClaimed
IsClaimed4Session
OnClaimDevice
OnCloseDevice
OnOpenDeviceSession
OnReleaseDevice
ResetSessionTimeouts
Device Category Vendor – Device Settings










getProviderVersionInfo
OnApplySettings
OnCheckHealth
OnGetFirmwareVersionInfo
OnGetProviderConfiguration
OnGetUposDefaultSettings
OnGetVendorDefaultSettings
OnGetVendorVersionInfo
OnInitializeDeviceStatus
OnRetrieveStatistics
Device Category Vendor – Vendor Commands

OnExecuteVendorCommand
How do I my extensions to the standard
V1 devices in V2 (the Bridge)
How do I handle a Hydra type devices
Reference Code Simulator Example


Simulation: MSR Device
Demonstrates Powerful Features New to V2,
One Service That Supports:
.NET Thick Client
 Java Thin Client (Thick Client in Future Release)
 Browser Based Thin Client

UnifiedPOS V2 Documentation
UnifiedPOS V2 Navigation
UnifiedPOS V2 Navigation
Business Process UnifiedPOS V2 Ov erv iew
UnifiedPOS V2 Navigation
Hands on Audience
If you desire to go
directly to the
Consumer, Provider,
or Vendor, then click
on the related image
UnifiedPOS V2
Consumer API
Traditional POS / Web
Based Application /
Script Based
UnifiedPOS V2 Prov ider
API
Structured Overview
If you desire to see
the entire design,
then click on the
Architecture Overview
image
UnifiedPOS V2
Architecture Ov erv iew
To navigate, click
on images with the
infinity symbol
UnifiedPOS V2 Vendor
API [ Vendor Driv er ]
UPOS V2 Documentation


HTML Based.
Uses:
Sparx Enterprise Architecture, V 12.1
 EC Software, Help & Manual, V7
 Extensive Use of “Hot Links”




More Programmer Friendly Documentation
Easier to Update and Maintain
UnifiedPOS V2.0 Documentation Demonstration
Scale Device Category Modeling

Sample of EA Documentation Using Scale Device
as Example
Device Specific Common Components


What support is provided by the UnifiedPOS V2
implementation
What does the vendor need to do
POS Printer
Business Process BoxingMechanism Model
POS Printer Boxing Mechanism Model
+Y Direction
Origin
(0,0)
+ X Direction
Document [Box]
Box 1 Origin
Box Attributes
- Height
- Width
- Rotation
- Border
- Visible
- Color
- Line Style
Box #1 (Header)
Header Height
Content
Content
fills its
containing
box
Header Width
Box 3
(Body)
Box 2 Origin
Box #2 (Body)
Body attributes
- Letter Quality Flag (true High Quality, false - High
Speed)
- Line Spacing
- Line Height
- Line Width
- Justification (Right, Left,
Center)
Box +Rotation
Box 3 Origin
Box 4 Origin
Box #4 (Footer)
Thank You for Shopping
Document = Device Capabilities + Media
Document ID
Y-Coordinate
Separate layout and content information
This is the model by the wire and not for the printer. The printer driver must interpret it.
Sensors
Device Capabilities
BothSidesPrint
VerticalPrintDirection
- Cover
PrintSide
Papercut
- Top_To_Bottom
- Empty
- Side1
LinesToPaperCut
- Bottom_To_Top
- Near End
- Side2
FlagWhenIdle
Cartridge
- Unknown
- Sensor
ErrorLevel
Orientation
- State
+ Direction
ErrorStation
- Portrait
- Current
ErrorString
- Landscape
Origin (0,0)
- Notify
+X
RuledLine??
Box #1
Origin (0,0)
Header
Header Height
-Y
123 N Main
Mustang Ok
Header Width
Origin (0,0)
Box #2
LineSpacing
LineHeight
+ Direction
Rotate box
With respect to
containing Image
Height
ContentRotation
LineWidth
Y
x
Box #4
Footer
Thank you for shopping
OutputWidth
OutputHeight
Bar Code
Box #3
Origin (0,0) Width
Body
MSR
V1.0 MSR Methods
V1.0 MSR
Properties
V2.0 MSR Category
How do we add new devices categories?
How do I use this from the Application?


What area is covered by the UnifiedPOS V2
implementation
What area does the application consumer have
to do
Installation
What components do I need?
Where do I get V2 components
How do I install/setup V2?
Code Design
Contact Information
Bridge





how to bridge from 1x to 2x
Need map from v1 to v2
Check out the scale or msr example
Put out text, select font, turn text – collection of
primitives
Start with needs of the device and then use the
framework to help provide that
Use boxing drawing to show which printer
command is needed for each area.
What Do you Want to Do?
flow chart Flow Chart
Thin Clients and other
progr. Languages
then .net/java
Application
Java/.net
Application?
Vendor
No
Provider API
Java or .net
Yes
Binds
Consumer API
Reuse Consumer
API Reference
Impl?
Use Vendor
API or buid
your own Yes
provider
No
Take a look at
Reference impl
Build your own
provider
Build your own provider
Use Vendor API
Yes
Read Vendor API
Read Consumer API
No
How does ARTS support this effort?

How do they submit questions?
 maybe
use the collaboration area
How do you get access to what is done?



setup svn area for application folks
we can populate that with content that is
relevant to the consumer
Use hello world example
How do you go about testing?

Use the sample implementation of the POS
How do you review the documentation?

Show the Help and Manual documentation