THIRD-PARTY XML INTEGRATION - METRA Australia

225
PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS THIRD-PARTY XML INTEGRATION MANUAL

Transcript of THIRD-PARTY XML INTEGRATION - METRA Australia

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

THIRD-PARTY XML INTEGRATIONMANUAL

2 PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

THIRD-PARTY XML INTEGRATION MANUAL

Contents

METRA Demo Client Software ........................................................................................................................ 3METRA Demo Server Software ....................................................................................................................... 6ELS NET ................................................................................................................................................................. 9 ELS NET - Clear Reservation .......................................................................................................................... 10

ELS NET - Event Info ....................................................................................................................................... 15

ELS NET - Info ................................................................................................................................................... 25

ELS NET - Locker Info ...................................................................................................................................... 32

ELS NET - Locker State and Past Events ......................................................................................................38

ELS NET - Locker State ................................................................................................................................... 44

ELS NET - Sale ................................................................................................................................................... 49

ELS NET - Unlock Specific Locker ................................................................................................................. 54

ELS NET - White List ....................................................................................................................................... 58

LCC NET ............................................................................................................................................................... 64 LCC NET - Card Info 1 ..................................................................................................................................... 65

LCC NET - Card Info 2 ..................................................................................................................................... 76

LCC NET - Event Info ....................................................................................................................................... 89

LCC NET - Exit .................................................................................................................................................. 99

LCC NET - External Interface Event .......................................................................................................... 104

LCC NET - External Interface ....................................................................................................................... 111

LCC NET - Get Card ..................................................................................................................................... 120

LCC NET - Interface ...................................................................................................................................... 127

LCC NET - Item Issue .................................................................................................................................... 135

LCC NET - Repair ............................................................................................................................................ 145

LCC NET - Tickets Erase ............................................................................................................................... 149

LCC NET External Interface ........................................................................................................................ 154 LCC NET - External Interface Event .......................................................................................................... 155

LCC NET - External Interface ....................................................................................................................... 162

LCC NET - Interface ....................................................................................................................................... 171

ELS Interface .................................................................................................................................................... 179 ELS Interface - Event Info ............................................................................................................................ 180

ELS Interface - Locker Info .......................................................................................................................... 190

ELS Interface - Locker State ......................................................................................................................... 196

ELS Interface - Unlock Specific Locker ...................................................................................................... 201

ELS Interface - White List ............................................................................................................................ 205

Format Media SN Encoding 1.8 ................................................................................................................... 211

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

METRA DEMO CLIENT SOFTWARE

 · Help: Metra DEMO Client Software

Metra DEMO Client software is used to test Metra Software XML interfaces. To create a XML package you can use different build-in wizards or you can import a XML package from a file (file can be created manually or exported from 3rd party software). Metra DEMO Client software can also be used to test XML interfaces of 3rd party software, when 3rd party software acts as a server and Metra software as a client (e.g. Metra ELS Delivery systems, 3rd Party Access Control systems with Metra access control devices, etc.).

NOTE: if all tabs are not displayed correctly try maximizing the window.

CONNECTION

To connect with a Server use a "XML over TCP/IP" or "Web services" connection. Metra Software supports both.

XML over TCP/IP connection: Fill in the Server field. Use "127.0.0.1" if the server software is installed on the same computer or computer's name (e.g. "mserver") if server software is installed on other computer in the network. For Metra Server Software use port "6771" and for 3rd party software as required. To establish the connection click on button "Connect".

Web services connection: Fill in the server's URL field. Use "http://127.0.0.1:6781" if you want to connect to Metra Server Software installed on the same computer or computer's name followed by port ":6781" (e.g. "//mserver:6781"). To connect to a 3rd party server software use the same type of URL address, but mind that the port may be different.

PREPARE PACKAGE

To prepare a XML package use one of the build in wizards or open the "XML samples" tab and all XML files stored in the same directory as the "client.exe" will be listed. You can also add your own samples.

After you configure a XML wizard or select a XML file from a list click on the "Prepare" button. Content of the XML package will be shown in the left bottom window. In this phase you still manually edit a prepared XML package before sending. NOTE: Double clicking the XML file in "XML samples" tab automatically prepares it.

SEND PACKAGE

To send a package over TCP/IP connection click on "Send - Receive" button along with server/port fields or to send a package over Web services click on a "Send - Receive" button along with URL field. Received reply from the server will be shown in bottom right window.

EXAMPLE

This example shows how to prepare, edit and send a "Locker ELS NET Info" XML package. Click Play icon bellow screen image. If your browser does not support flash animation, you can view the same video in different format here.

( Back )

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

METRA DEMO SERVER SOFTWARE

 · Help: Metra DEMO Server Software

Metra DEMO Server software is used to test 3rd party to Metra Software XML interfaces. Like Metra Software it supports different types of communication, a XML packages via TCP/IP or Web services. Build-in wizards allow you to define/change XML results for some XML interfaces and for the other XML interfaces there are editable XML result files included.

START THE SERVER

Start the DEMO server by clicking one of the "Start" buttons along the port entry fields. Ports are preset to Metra Software defaults.

NOTE: If you get an error message "Could not bind socket. Address and port are already in use." you already have Metra Software running on the same computer. Select other port (e.g. 6791) and try to start the server.

DEFINING THE DESIRED RESULT

To emulate Metra software in desired situation you will need to prepare a result. For some XML interfaces you can use one of the build-in wizards and for the others you need to place a XML result files into the same directory as the DEMO server executable. XML result example files for each interface are already included with the DEMO software.

COMMUNICATION

Once the XML result files are set, server running all the XML communication is shown in the bottom window.

EXAMPLE

This example shows communication between Metra DEMO server software and Metra DEMO client software. Click Play icon bellow screen image. If your browser does not support flash animation, you can view the same video in different format here.

You do not have the latest version of Flash installed. Please visit this link to download it: http://www.adobe.com/products/flashplayer/

( Back )

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

ELS NET

XML packages – Locker ELS NET Free XMLenfU5.docx

Page 1

“Locker ELS NET Free” XML package

Revision:

Date Comment

12.03.2011 Creation of document

24.02.2014 Added datetimefrom, datetimeto and ID

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Locker ELS NET Free XMLenfU5.docx

Page 2

1 General This XML package is sent by 3rd party SW through TCP/IP interface to release (Free) a locker

reservation to a card/wristband in the Metra ELS NET system.

Depending on the settings in the Metra ELS NET SW locker reservations that expire by date

can be automatically deleted by Metra SW or not and have to be made free by using this XML

package. Usage of this package also applies in cases when a locker reservation has not yet

expired but the locker is to be changed or simply reversing a false operation.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives only the result code.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

1.2 Parameters

Mandatory:

Item – Item ID, which is normally a type of locker. E.g. locker for one person, two (in

ski resorts), big locker, small locker, etc. Defined in the Metra SW.

Locker number

Optional:

Pos and user – reference for tracking and analysing reservations in Metra SW

DateTimeFrom & DataTmeTo are used to specify a time frame between which locker

reservations matching other parameters are freed.

Only entries which are within the given time frame are freed.

ELS NET Entry unique ID from Metra DB can be used to free a specific known entry.

In order to use this parameter, it should be stored in 3rd party SW (DB) from initial

ELS NET Sale operation.

XML packages – Locker ELS NET Free XMLenfU5.docx

Page 3

2 Examples XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>LockerELSNETFree</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> Point of sale code Small integer If parameter is not given, lowest from Metra DB is used

<user>2</user> User code Small integer If parameter is not given, lowest from Metra DB is used

<item>DEPO2</item> Item ID Varchar (30) Unique Item ID from Metra SW Tables

<locker>5012</locker> Locker number Integer Possible values 1-9999

<datetimefrom>2011-09-17T09:50:00</datetimefrom> Date & time from Given in example Start of validity

<datetimeto>2011-10-22T09:50:00</datetimeto> Date & time to Given in example End of validity

<id>46548976546</id> ELS NET Entry ID Integer Unique reference from Metra DB

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Locker ELS NET Free XMLenfU5.docx

Page 4

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Locker ELS NET Free XMLenfU5.docx

Page 5

3 Appendix An XML file is attached to the document with same structure as the example XML package

and result.

XML packages –Event Info XMLeviU5.doc

Page 1

“Event Info” XML package v1.0

Revision:

Date Comment

07.12.2010 Creation of document

15.09.2011 Revision

17.10.2011 Revision

25.02.2014 Added new events and modes to list of events and modes

24.03.2014 Added MEW DAT additional events

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages –Event Info XMLeviU5.doc

Page 2

1 General This XML package is sent by Metra SW to 3rd party SW to give event information of events

that happen in Metra systems.

These events are sent online in real time. Also they are queued in Metra DB if communication

is not possible at the time of event, so they are sent later when connection is re-established.

Which events are sent can be filtered in the Metra SW to avoid unnecessary traffic with info

not needed.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters. It must be sent by 3rd party SW, else event is queued and sent again later.

XML packages –Event Info XMLeviU5.doc

Page 3

2 Example XML package - entrance Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>EventInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<event> Event /

<eventid>5246886</eventid> Event id Integer Unique event id from Metra DB

<card>0009000000000000004D000000002E634162</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<dt>2007-11-19T09:40:00</dt> Date & time of event Given in example DT as recorded in Metra DB

<code>30</code> Event Code Integer 30 for locking, 40 for unlocking,…

<codedescription>Locking</codedescription> Event description Varchar (36) Locking, Unlocking,…

<mode>1</mode> Mode of event Code Integer 1, 5 or 71, see below for respective descriptions

<modedescription>User key</modedescription> Mode of event description Varchar (36) USER key, MASTER key, DELIVERY key

<iddevice>102</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<devicedescription>CU 102</devicedescription> Device description from Metra tables Varchar (36)

<locker>1234</locker> Locker number Integer

<idlocation>1</idlocation> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Lobby</locationdescription> Location description Varchar (36)

</event> / /

</parameters> / /

</package> / /

XML packages –Event Info XMLeviU5.doc

Page 4

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

</package> / /

XML packages –Event Info XMLeviU5.doc

Page 5

3 Events and Modes Not all events or modes apply to all integration scenarios.

3.1 Events 1 Read wristband, CardInfo01

2 Card Issue

3 Procedure (Points, Tokens, Borrow), Repair, Exit, Entrance

4 Erase wristband, Tickets erase

5 Barcode

6 External

7 Member Export

8 Member Import

10 Entrance

12 Entrance Denied

20 Exit

22 Exit Denied

30 Locking OK

31 Payed Locking OK

32 Locking Denied

33 Locking failed

34 Locking/Unlocking Error

40 Unlocking OK

43 Unlocking failed

49 Unlocking OK - Alarm Delay

50 Passage

52 Passage Denied

60 Push-button

61 Do Not Disturb

62 Make my Room

63 Room Cleaned

64 Reception Request

70 Deposit Activated

75 Deposit Deactivated

90 ALARM

91 Supervised locker break-in

100 Card

101 PIN

102 External / Remote

120 Card - Deposit

200 OK

201 Set Pay

202 Reset Pay

203 Activate Deposit

204 Deactivate Deposit

250 Denied

251 Wrong Reader Unit

252 Deposit Denied

300 Coin accepted

301 Temporary saldo erased

320 Vending OK

321 Vending Error

401 Locker closed after prelock

XML packages –Event Info XMLeviU5.doc

Page 6

402 Locker closed after unlocking

403 Locker opened after warning

404 Locker remained prelocked

405 +UWT

406 Prelocking not confirmed

450 "Pin" temporarily inhibited

451 "CodE" temporarily inhibited

452 "Scod" temporarily inhibited

460 Prelocking inhibited

490 Unlock request accepted

500 Free passage ON

501 Free passage OFF

510 Signal Alarm

511 Signal Armed ON

512 Signal Armed OFF

513 Signal PIN

514 Signal Test

515 Alarm Sensor Activated

516 Alarm Sensor Deactivated

517 Door Unlocked

518 Door Locked

519 Door Opened

520 Door Closed

521 Entrance Deactivated

522 Exit Deactivated

601 Update sold Tickets

602 Assign Procedure

603 Unlocking request

604 ELS Key Exchange Request

605 ELS Key Exchange Answer

606 WBC Closed After Timeout

607 Buyer Export

608 Buyer Import

609 Settle All Cards

610 External Payment

611 SMS Interface

612 S.M.SW Member Import

613 S.M.SW Locker ELS NET Export

614 WBC Closed

900 Power ON

901 General interrogation received

902 Start responding

903 Stop responding

904 Start multiple responses

905 Stop multiple responses

910 Time Set

911 New Time

912 Summer Time

913 Winter Time

920 Box Opened

921 Box Closed

930 Operating parameters OK

931 Operating parameters constructional

932 Requested initialization

XML packages –Event Info XMLeviU5.doc

Page 7

933 Automatic initialization

940 Error Terminated

941 Error

953 Coin acceptor start responding

954 Coin acceptor stop responding

960 SECURE Card

961 DOWNLOAD Card

962 SERVICE Card

963 CLEAN Card

964 ERASE Card

965 WARD Card

966 MASTER key

967 FAILSAFE key

990 Buffer overrun

999 State

XML packages –Event Info XMLeviU5.doc

Page 8

3.2 Modes 1 User Key

2 Ticket

3 Ticket Captured

4 Multi user key

5 MASTER key

6 MULTI key

7 FAILSAFE key

8 Push-button

9 ALARM

10 Entrance

11 Passage

12 Date

13 Time

14 Last Day

15 Day

16 Points

17 D Points

18 Direction

19 Not Valid

20 Exit

21 Tokens

22 MINI Card

23 Entrance delay

24 Locker

25 Add Charge

26 Refund

27 Borrow/PAY

28 Exit Counter

29 Cancelled LCC Card

30 Cancelled LCC Ticket

31 Denied LCC Ticket

32 Device Break-in

33 Door Break-in

34 Door Opened too long

35 Borrow

36 Delivery

37 Deny Exit

38 Electronic Money

39 WBC Full

40 Deposit

41 Maid key

42 OFF

43 ON

44 External

45 Busy

46 Minutes

47 Ring

48 Unfinished Document

49 Entrance Time Date

50 Passage

51 Child

XML packages –Event Info XMLeviU5.doc

Page 9

52 Pay Set

53 Pay Reset

54 Pay Set/Reset

55 Request

56 Answer

57 Event

58 One passage

59 Permanent Passage Change

60 First Day

61 Key denied

62 Not payed

63 User abort

64 Prelock

65 Timeout

66 Opened

67 Card Removed

68 D Minutes

69 D Minutes Gross

70 Clock

71 DELIVERY key

72 Delivery Not Possible

73 Extra

74 Group ticket

80 Motor error

81 "Err1"

82 "Err2"

85 Power off

86 Download required

87 File updated

90 Service required

91 Reader 1

92 Reader 2

95 Serial channel

97 Direct port

99 Unknown

101 Package

102 Result

111 EMERGENCY Key

112 Secret Code

113 Master Code

114 Network – Time Table

115 Network – Pushbutton

116 Automatic Opening

117 Pushbutton PCB

118 Door Opened

119 Free

120 Permanent key

121 Additional Payment

122 Occupy

123 Release

XML packages –Event Info XMLeviU5.doc

Page 10

4 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 1

“Locker ELS NET Info” XML package

Revision:

Date Comment

12.03.2011 Creation of document

28.01.2014 Added DT fields

24.02.2014 Added ID to package and result

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 2

1 General This XML package is sent by 3rd party SW through TCP/IP interface to query among locker

reservations and non-assigned lockers in the Metra ELS NET system.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and all given parameters of existing

locker reservations and non-assigned lockers.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

1.2 Package parameters

All are optional. If none are given all reservations will be in the result, using more

PARAMETERS will narrow the result.

Free only – returns only available lockers for which reservations can be made using

ELS NET Sale XML package.

Locker – will produce a query based on locker number; several lockers can exist in an

ELS NET system but are linked to different items.

Item – returns all lockers and exiting reservations of particular item.

Card – returns all locker reservations that exist for a particular card; one card can exist

in several locker reservations.

Name – If name was given in the ELS NET Sale XML package upon making the

reservation, a query can be made based on name; this is useful when guests lose their

card and forget the locker number.

DateTimeFrom & DataTmeTo are used to specify a time frame between which locker

reservation status is required.

ELS NET Entry unique ID from Metra DB can be used to narrow down the search to a

specific entry. In order to use this parameter, it should be stored in 3rd party SW (DB)

from initial ELS NET Sale operation.

1.3 Result parameters

All with same meaning as in the package. When a locker is listed with no other parameters

only number, it is a free = non assigned locker that is available to be assigned through ELS

NET Sale XML package.

All other lockers are listed as occupied with all the belonging parameters.

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 3

A locker which is occupied within the time frame of the given DateTimeFrom and

DataTimeTo is listed occupied even if there exists a reservation for only the smallest time

within the filter limits. E.g.:

A locker is occupied from 01.02.2014 12:00:00 till 28.02.2014 11:59:00.

Info package includes DateTimeFrom 15.02.2014 and DateTimeTo 15.03.2014. Locker is

listed as occupied (with all the belonging parameters).

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 4

2 Examples XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>LockerELSNETInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<freeonly>1</freeonly> Show free only small integer Result will list free lockers only if 1, if tag omitted all in result

<item>DEPO2</item> Item ID Varchar (30) Unique Item ID from Metra SW Tables

<locker>55</locker> Locker number Integer Possible values 1-9999

<card>00090000000000000056E007000023C74CFA</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<name>John Doe</name> Name assigned to reservation Varchar (30)

<datetimefrom>2011-09-17T09:50:00</datetimefrom> Date & time from Given in example Start of validity

<datetimeto>2011-10-22T09:50:00</datetimeto> Date & time to Given in example End of validity

<id>46548976546</id> ELS NET Entry ID Integer Unique reference from Metra DB

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 5

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<items> Items /

<item> Item /

<id>LRH</id> Item ID Varchar (30) Unique Item ID from Metra SW Tables

<lockers> Lockers /

<locker> Locker /

<number>1</number> Locker number Integer Possible values 1-9999

<name>John Doe</name> Name assigned to reservation Varchar (30)

<datetimefrom>2011-09-17T09:50:00</datetimefrom> Date & time from Given in example Start of validity

<datetimeto>2011-10-22T09:50:00</datetimeto> Date & time to Given in example End of validity

<cards> Cards / Several cards can be assigned to one locker

<card>00090000000000000056E007000023C74CEA</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<card>00090000000000000056E007000023C74CFA</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</cards> / /

<id>46548976546</id> ELS NET Entry ID Integer Unique reference from Metra DB

<invoice>0</invoice> Invoice ** **Internal Metra use

<price>0</price> Price ** **Internal Metra use

</locker> / /

<locker> Locker /

<number>4</number> Locker number Integer Possible values 1-9999; Lockers with no other parameters are free lockers

</locker> / /

</lockers> / /

</item> / /

</items> / /

</parameters> / /

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 6

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Locker ELS NET Info XMLeniU5.docx

Page 7

3 Appendix An XML file is attached to the document with same structure as the example XML package

and result.

XML packages – Locker Info XMLlriU5.doc

Page 1

“Locker Info” XML package

Revision:

Date Comment

26.07.2010 Creation of document

14.12.2011 Revision of comments of XML package

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Locker Info XMLlriU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to obtain information (in the respective result

package) about particular locker status parameters and last 50 events from Metra ELS system.

Locations are used in locker systems where several lockers exist with the same locker

number. Therefore they are assigned to different locations to enable unique treatment of each.

The package is sent to Metra interface server through the Metra TCP/IP interface.

Information is returned from Metra interface server in the result package.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and additional locker parameters

depending on the parameters given in the Locker Info package.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd

party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Locker Info XMLlriU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>LockerInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<locker>1234</locker> Locker number (1-7999) integer mandatory field

<location>1</location> Location ID (1-9999) integer mandatory field if locations are used in the system

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (30) Result of this XML package includes same userdata if sent here

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<locker> Locker /

<location>1</location> Location ID (1-9999) of locker integer Same locker numbers are possible on different locations

<locker>1234</locker> Locker number integer

<state>0</state> State ID Integer

<statedescription>VACANT</statedescription> State Description Varchar (30) In English only

<events> Events

<event> Event

<eventid>5271034</eventid> Event id Integer Unique event id from Metra DB

XML packages – Locker Info XMLlriU5.doc

Page 4

<dt>2010-07-26T11:51:40</dt> Timestamp of event Given in example

<code>288</code> Event code integer

<codedescription>UNLOCKING OK</codedescription> Event code Description Varchar (30) In English only

<mode>9</mode> Mode ID Integer

<modedescription>PUSHBUTTON</modedescription> Event mode Description Varchar (30) In English only

<statebefore>2</statebefore> State ID Integer

<statebeforedescription>OCCUPIED</statebeforedescription> State Description Varchar (30) In English only

<stateafter>0</stateafter> State ID Integer

<stateafterdescription>VACANT</stateafterdescription> State Description Varchar (30) In English only

<card>0009000000000000004D000000000CFDE639</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</event> / /

<event> Already described Already described

<eventid>5271033</eventid> Already described Already described

<dt>2010-07-26T11:51:01</dt> Already described Already described

<code>289</code> Already described Already described

<codedescription>LOCKING OK</codedescription> Already described Already described

<mode>3</mode> Already described Already described

<modedescription>USER KEY</modedescription> Already described Already described

<statebefore>2</statebefore> Already described Already described

<statebeforedescription>OCCUPIED</statebeforedescription> Already described Already described

<stateafter>2</stateafter> Already described Already described

<stateafterdescription>OCCUPIED</stateafterdescription> Already described Already described

<card>0009000000000000004D000000000CFDE639</card> Already described Already described

</event> / /

<event> Already described Already described

<eventid>5271030</eventid> Already described Already described

<dt>2010-07-26T11:50:48</dt> Already described Already described

<code>288</code> Already described Already described

<codedescription>UNLOCKING OK</codedescription> Already described Already described

<mode>3</mode> Already described Already described

<modedescription>USER KEY</modedescription> Already described Already described

<statebefore>2</statebefore> Already described Already described

<statebeforedescription>OCCUPIED</statebeforedescription> Already described Already described

<stateafter>0</stateafter> Already described Already described

XML packages – Locker Info XMLlriU5.doc

Page 5

<stateafterdescription>VACANT</stateafterdescription> Already described Already described

<card>0009000000000000004D000000000CFDE639</card> Already described Already described

</event> / /

</events> / /

</locker> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Locker Info XMLlriU5.doc

Page 6

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Locker Info XMLlriU5.doc

Page 1

“Locker Info” XML package

Revision:

Date Comment

26.07.2010 Creation of document

14.12.2011 Revision of comments of XML package

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Locker Info XMLlriU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to obtain information (in the respective result

package) about particular locker status parameters and last 50 events from Metra ELS system.

Locations are used in locker systems where several lockers exist with the same locker

number. Therefore they are assigned to different locations to enable unique treatment of each.

The package is sent to Metra interface server through the Metra TCP/IP interface.

Information is returned from Metra interface server in the result package.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and additional locker parameters

depending on the parameters given in the Locker Info package.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd

party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Locker Info XMLlriU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>LockerInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<locker>1234</locker> Locker number (1-7999) integer mandatory field

<location>1</location> Location ID (1-9999) integer mandatory field if locations are used in the system

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (30) Result of this XML package includes same userdata if sent here

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<locker> Locker /

<location>1</location> Location ID (1-9999) of locker integer Same locker numbers are possible on different locations

<locker>1234</locker> Locker number integer

<state>0</state> State ID Integer

<statedescription>VACANT</statedescription> State Description Varchar (30) In English only

<events> Events

<event> Event

<eventid>5271034</eventid> Event id Integer Unique event id from Metra DB

XML packages – Locker Info XMLlriU5.doc

Page 4

<dt>2010-07-26T11:51:40</dt> Timestamp of event Given in example

<code>288</code> Event code integer

<codedescription>UNLOCKING OK</codedescription> Event code Description Varchar (30) In English only

<mode>9</mode> Mode ID Integer

<modedescription>PUSHBUTTON</modedescription> Event mode Description Varchar (30) In English only

<statebefore>2</statebefore> State ID Integer

<statebeforedescription>OCCUPIED</statebeforedescription> State Description Varchar (30) In English only

<stateafter>0</stateafter> State ID Integer

<stateafterdescription>VACANT</stateafterdescription> State Description Varchar (30) In English only

<card>0009000000000000004D000000000CFDE639</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</event> / /

<event> Already described Already described

<eventid>5271033</eventid> Already described Already described

<dt>2010-07-26T11:51:01</dt> Already described Already described

<code>289</code> Already described Already described

<codedescription>LOCKING OK</codedescription> Already described Already described

<mode>3</mode> Already described Already described

<modedescription>USER KEY</modedescription> Already described Already described

<statebefore>2</statebefore> Already described Already described

<statebeforedescription>OCCUPIED</statebeforedescription> Already described Already described

<stateafter>2</stateafter> Already described Already described

<stateafterdescription>OCCUPIED</stateafterdescription> Already described Already described

<card>0009000000000000004D000000000CFDE639</card> Already described Already described

</event> / /

<event> Already described Already described

<eventid>5271030</eventid> Already described Already described

<dt>2010-07-26T11:50:48</dt> Already described Already described

<code>288</code> Already described Already described

<codedescription>UNLOCKING OK</codedescription> Already described Already described

<mode>3</mode> Already described Already described

<modedescription>USER KEY</modedescription> Already described Already described

<statebefore>2</statebefore> Already described Already described

<statebeforedescription>OCCUPIED</statebeforedescription> Already described Already described

<stateafter>0</stateafter> Already described Already described

XML packages – Locker Info XMLlriU5.doc

Page 5

<stateafterdescription>VACANT</stateafterdescription> Already described Already described

<card>0009000000000000004D000000000CFDE639</card> Already described Already described

</event> / /

</events> / /

</locker> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Locker Info XMLlriU5.doc

Page 6

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Lockers Info XMLlsiU5.doc

Page 1

“Lockers Info” XML package

Revision:

Date Comment

26.07.2010 Creation of document

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Lockers Info XMLlsiU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to obtain information (in the respective result

package) about several lockers status parameters from Metra ELS system.

Locations are used in locker systems where several lockers exist with the same locker

number. Therefore they are assigned to different locations to enable unique treatment of each.

The package is sent to Metra interface server through the Metra TCP/IP interface.

Information is returned from Metra interface server in the result package.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and additional locker parameters

depending on the parameters given in the Lockers Info package.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd

party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Lockers Info XMLlsiU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>LockersInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<location>1</location> Location ID (1-9999) of lockers integer If none is given result will contain lockers from all locations

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (30) Result of this XML package includes same userdata if sent here

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<lockers> Lockers /

<locker> Locker /

<location>5</location> Location ID (1-9999) of locker integer

<locker>1</locker> Locker number integer

<state>0</state> State ID Integer

<statedescription>VACANT</statedescription> State Description Varchar (30) In English only

</locker> / /

<locker> Already described Already described

<location>5</location> Already described Already described

XML packages – Lockers Info XMLlsiU5.doc

Page 4

<locker>2</locker> Already described Already described

<state>0</state> Already described Already described

<statedescription>VACANT</statedescription> Already described Already described

</locker> / /

<locker> Already described Already described

<location>5</location> Already described Already described

<locker>3</locker> Already described Already described

<state>0</state> Already described Already described

<statedescription>VACANT</statedescription> Already described Already described

</locker> / /

</lockers> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Lockers Info XMLlsiU5.doc

Page 5

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Locker ELS NET Sale XMLensU5.docx

Page 1

“Locker ELS NET Sale” XML package

Revision:

Date Comment

11.03.2011 Creation of document

24.02.2014 Added ID to result

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Locker ELS NET Sale XMLensU5.docx

Page 2

1 General This XML package is sent by 3rd party SW through TCP/IP interface to make a locker

reservation to a card/wristband in the Metra ELS NET system.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result package gives the result code and ELS NET Entry unique ID

from Metra DB. This ID can be used for further operations (ELS NET Info and ELS NET

Free).

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

1.2 Package Parameters

Mandatory:

Item – Item ID, which is normally a type of locker. E.g. locker for one person, two (in

ski resorts), big locker, small locker, etc. Defined in the Metra SW.

Locker number

Date from and to – validity of the reservation

Card number (s) – several can be assigned to open the same locker

Optional:

POS and user – reference for tracking and analysing reservations in Metra SW

Name – enables search of reservations also by name with ELS NET Info XML

package

XML packages – Locker ELS NET Sale XMLensU5.docx

Page 3

2 Examples XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>LockerELSNETSale</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> Point of sale code Small integer If parameter is not given, lowest from Metra DB is used

<user>2</user> User code Small integer If parameter is not given, lowest from Metra DB is used

<item>LRH</item> Item ID Varchar (30) Unique Item ID from Metra SW Tables

<locker>1</locker> Locker number Integer Possible values 1-9999

<name>John Doe</name> Name to be assigned to reservation Varchar (30) Optional, if given, reservation can be found by name also

<cards> Cards / Several cards can be assigned to one locker

<card>00090000000000000056E007000023C74CFA</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<card>00090000000000000056E007000023C74CEA</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</cards> / /

<datetimefrom>2011-09-17T09:50:00</datetimefrom> Date & time from Given in example Start of validity

<datetimeto>2011-10-22T09:50:00</datetimeto> Date & time to Given in example End of validity

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Locker ELS NET Sale XMLensU5.docx

Page 4

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<id>46548976546</id> ELS NET Entry ID Integer Unique reference from Metra DB

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Locker ELS NET Sale XMLensU5.docx

Page 5

3 Appendix An XML file is attached to the document with same structure as the example XML package

and result.

XML packages – Unlock XMLunlU5.doc

Page 1

“Unlock” XML package

Revision:

Date Comment

07.02.2008 Creation of document

15.09.2010 Revision

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Unlock XMLunlU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to unlock a particular locker in Metra ELS or ELS

NET system.

In Metra ELS NET system driven by 3rd

party SW through Metra ELS Locker reservation

interface the parameter “Location” is not supported by the ELS NET reservation interface and

therefore omitted in this XML package! In Metra ELS NET installations location is

supported.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

ERROR_INVALID_PARAMETER – If parameters are not in the right format (e.g.

invalid date format), or if some are missing

ERROR_ACCESS_DENIED – If the sender is not allowed to communicate through

the Metra LCC NET interface; defined in Metra SW

ERROR_INVALID_FUNCTION – If card is on the black list or certain operation is

not allowed

ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – Unlock XMLunlU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Unlock</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<locker>555</locker> Locker number from 1 to 9999

<location>1</location> Locker location Integer Used when lockers with same numbers exist in the system

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Unlock XMLunlU5.doc

Page 4

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – White List XMLwliU5.doc

Page 1 14.12.2012

“White List” XML package

Revision:

Date Comment

07.08.2008 Creation of document

14.12.2012 Added removeall

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – White List XMLwliU5.doc

Page 2 14.12.2012

1 General This XML package is sent by 3

rd party SW to add/remove card/wristband to/from the White

list; applies to ELS, ELS NET and LCC NET systems.

Media on the white list is valid to be used on Metra ELS lockers and in general in the above

mentioned systems.

Packages are sent as strings through the Metra TCP/IP interface.

Sent cardnumber is obtained from 3rd

party SW; it must be sent in Metra format. See

document Metra_ELS_SN_Encoding.pdf.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

ERROR_INVALID_PARAMETER – If parameters are not in the right format (e.g.

invalid date format), or if some are missing

ERROR_ACCESS_DENIED – If the sender is not allowed to communicate through

the Metra LCC NET interface; defined in Metra SW

ERROR_INVALID_FUNCTION – If card is on the black list or certain operation is

not allowed

ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – White List XMLwliU5.doc

Page 3 14.12.2012

2 Examples

2.1 Add to white list

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>WhiteList</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>00090000000000000056E0070000187EB223</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<whitelist>add</whitelist> add parameter / Card will be added to white list

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – White List XMLwliU5.doc

Page 4 14.12.2012

2.2 Remove from white list

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>WhiteList</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>00090000000000000056E0070000187EB223</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<whitelist>remove</whitelist> remove parameter / Card will be removed from white list

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – White List XMLwliU5.doc

Page 5 14.12.2012

2.3 Remove all from white list

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>WhiteList</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<whitelist>removeall</whitelist> remove all parameter / All cards will be removed from white list

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – White List XMLwliU5.doc

Page 6 14.12.2012

3 Appendix An XML file is attached to the document which is same as the example XML package.

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

LCC NET

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 1 08.09.2010

“Card Info 01” XML package

Revision:

Date Comment

26.07.2010 Creation of document

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 2 08.09.2010

1 General This XML package is sent by 3

rd party SW to obtain information about a card/wristband from

Metra NET systems.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used with CardInfo01v1.1:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid cardnumber), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and parameters depending on the

current status of the wristband/card. Only result code is returned if there are no additional

parameters.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd

party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 3 08.09.2010

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>CardInfo01</name> Package name /

<version>1.1</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.1</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<functions> Functions

<function>Master Key</function> Master Key Varchar (36) If card is a Master Key in Metra NET system

<function>Multi Key</function> Multi Key Varchar (36) If card is a Multi Key in Metra NET system

<function>Black List</function> Black List Varchar (36) If card is on the Black List in Metra NET system

<function>White List</function> White List Varchar (36) If card is on the White List in Metra NET system

</functions> / /

<member> Member / If card is assigned to a Member in Metra NET system

<id>123456</id> Metra Member ID from Metra DB Integer

<title>Mr.</title> Title Varchar (30)

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 4 08.09.2010

<firstname>John</firstname> First name Varchar (30)

<lastname>Doe</lastname> Last name Varchar (30)

</member> / /

<services> Services / If card has services sold to it in Metra NET system

<service> Service / There can be several services sold to one card

<doc> Document info / Document info for particular service

<posyeardoc>14/2010/284/277</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<line>1</line> Document line Integer This service was sold on this line of given document

</doc> / /

<code>101</code> Service code Integer Service code from Metra tables

<iditem>T20101</iditem> Item ID Varchar (36) Item ID with which this service was sold

<passages> Passages / Algorithms-Check engines assignes to this card

<passage> Passage / There can be check engines assigned on several passages

<passageid>1</passageid> Passage ID Integer Passage ID from Metra tables

<passagedescription>Main entrance</passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<checkengines> Check engines / Check engines assigned on this passage

<checkengine> Check engine / There can be several check engines assigned on particular passage

<name>DT Limits</name> Check engine name / Date time absolute limits

<datetime> Date & Time limits /

<from>2010-01-01T15:30:00</from> Timestamp from Given in example Timestamp of absolute validity begining

<to>2010-31-01T23:59:59</to> Timestamp to Given in example Timestamp of absolute validity end

</datetime> / /

</checkengine> / /

<checkengine> Check engine /

<name>Guest</name> Check engine name / If ticket is a Guest ticket. Only one at a time is possible among guest, staff, service

</checkengine> / /

<checkengine> Check engine /

<name>Service</name> Check engine name / If ticket is a Service ticket. Only one at a time is possible among guest, staff, service

</checkengine> / /

<checkengine> Check engine /

<name>Staff</name> Check engine name / If ticket is a Staff ticket. Only one at a time is possible among guest, staff, service

</checkengine> / /

<checkengine> Check engine /

<name>Locker LCC NET</name> Check engine name / Information about LCC NET lockers for the given card

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 5 08.09.2010

<lockedlockers> Locked lockers /

<locker> Locker / Several locked lockers are possible for one card

<number>1234</number> Locker number Integer

<location>1</location> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Ladys changing room</locationdescription> Location description Varchar (36)

<dt>2007-11-19T09:55:00</dt> Timestamp of locking Given in example

<controlunit>5</controlunit> Locker Control Unit ID Integer

<controlunitdescription>Ladys CU 5</controlunitdescription> Locker Control Unit description Varchar (36)

</locker> / /

<locker> Locker / Several locked lockers are possible for one card

<number>1234</number> Locker number Integer

<location>3</location> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Sauna</locationdescription> Location description Varchar (36)

<dt>2007-11-19T10:55:00</dt> Timestamp of locking Given in example

<controlunit>16</controlunit> Locker Control Unit ID Integer

<controlunitdescription>Sauna CU left</controlunitdescription> Locker Control Unit description Varchar (36)

</locker> / /

</lockedlockers> / /

<allowedlockers> Lockers allowed for locking

<locker> Locker / Several locked lockers are possible for one card

<count>1</count> Number of lockers Integer Number of lockers allowed

<location>1</location> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Ladys changing room</locationdescription> Location description Varchar (36)

<lockers>1-9999</lockers> Allowed locker range Blob

</locker> / /

</allowedlockers> / /

</checkengine> / /

<checkengine> Check engine /

<name>Minutes</name> Check engine name / Additional charge parameters

<minutes>23</minutes> Number of minutes integer Number of minutes over the predefined limit to charge for

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with additional payment interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 6 08.09.2010

<name>Refund</name> Check engine name / Refund charge parameters

<minutes>23</minutes> Number of minutes integer Number of minutes to the predefined limit to refund

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with refund interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

<name>Points</name> Check engine name / Points

<dt>2007-11-19T09:50:00</dt> Timestamp of last entrance Given in example Can be used to obtain confirmation of last card entrance

<used>3</used> Used points Integer

<total>10</total> Total defined points Integer

</checkengine> / /

<checkengine> Check engine /

<name>Daily Points</name> Check engine name / Daily Points

<dt>2007-11-19T09:50:00</dt> Timestamp of last entrance Given in example Can be used to obtain confirmation of last card entrance

<used>2</used> Used points Integer

<total>3</total> Total defined points Integer

</checkengine> / /

<checkengine> Check engine /

<name>Daily Minutes</name> Check engine name / Daily minutes

<minutes>23</minutes> Number of minutes integer Number of minutes to the predefined limit to refund

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with additional payment interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

<name>Daily Minutes Gross</name> Check engine name /

<minutes>23</minutes> Number of minutes integer Number of minutes to the predefined limit to refund

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with additional payment interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

<name>Entrance Time A</name> Check engine name / Entrance Time A

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 7 08.09.2010

</time> / /

<dayofweek>monday, tuesday, wednesday</dayofweek> Day of week Varchar (100) Day of week when valid

<date> Date limits

<from>2010-01-01</from> Date from Given in example Entrance date beggining of validity

<to>2010-31-01</to> Date to Given in example Entrance date end of validity

</date> / /

</checkengine> / /

<checkengine> Check engine /

<name>Entrance Time B</name> Check engine name / Entrance Time B

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity

</time> / /

<dayofweek>monday, tuesday, wednesday</dayofweek> Day of week Varchar (100) Day of week when valid

<date> Date limits

<from>2010-01-01</from> Date from Given in example Entrance date beggining of validity

<to>2010-31-01</to> Date to Given in example Entrance date end of validity

</date> / /

</checkengine> / /

<checkengine> Check engine /

<name>Entrance Delay</name> Check engine name / Delay between consecutive entrances

<minutes>5</minutes> Defined number of minutes Integer

</checkengine> / /

<checkengine> Check engine /

<name>First Day</name> Check engine name / First Day Entrance time; for long term tickets

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity for first day

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity for first day

</time> / /

</checkengine> / /

<checkengine> Check engine /

<name>Last Day</name> Check engine name / Last Day Entrance time; for long term tickets

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity for last day

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 8 08.09.2010

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity for last day

</time> / /

</checkengine> / /

<checkengine> Check engine /

<name>Capture</name> Check engine name / Ticket is to be captured on exit when other parameters allow it

</checkengine> / /

<checkengine> Check engine /

<name>Exit Counter</name> Check engine name / Exit Counter is enabled; exit must be made before next entrance and vice versa

</checkengine> / /

<checkengine> Check engine /

<name>Validate Ring Entrance</name> Check engine name / If ring entrance is not made, entrance, locking or spending is denied

</checkengine> / /

<checkengine> Check engine /

<name>Borrow</name> Check engine name / Items are borrowed to this card

<items> Borrowed Items /

<item> Borrowed Item / Several items are possible for borrow

<description>towel</description> Item description Varchar (36)

<doc> Document info / Document info for particular item

<posyeardoc>14/2010/284/277</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<line>1</line> Document line Integer This service was sold on this line of given document

</doc> / /

</item> / /

</items> / /

</checkengine> / /

<checkengine> Check engine /

<name>Deposit</name> Check engine name / Deposit is made for this card

<item> Deposit Item /

<value>10</value> Item value Integer

<doc> Document info / Document info for deposit

<posyeardoc>14/2010/284/277</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<line>2</line> Document line Integer This service was sold on this line of given document

</doc> / /

</item> / /

</checkengine> / /

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 9 08.09.2010

<checkengine> Check engine /

<name>Delivery</name> Check engine name / Delivery to card

<allowdeliverylimit>50</allowdeliverylimit> Limit Integer Credit value

<electronicmoney>50</electronicmoney> Electroni money Integer Debit value

<spent>70</spent> Spent amount Integer

<available>30</available> Available amount Integer

</checkengine> / /

</checkengines> / /

</passage> / /

</passages> / /

</service> / /

</services> / /

<events> Events /

<event> Event / Events of last card lifecycle is given

<eventid>5246887</eventid> Event id Integer Unique event id from Metra DB

<dt>2007-11-19T09:50:00</dt> Timestamp of event Given in example

<code>250</code> Event Code Integer See table of available event codes

<codedescription>Deny</codedescription> Event description Varchar (36) See table of available event descriptions

<mode>24</mode> Mode of event Code Integer See table of available mode codes

<modedescription>Locker</modedescription> Mode of event description Varchar (36) Defined in Metra SW

<iddevice>301</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<devicedescription>Left 3R</devicedescription> Device description Varchar (36) Defined in Metra SW

<passageid>1</passageid> Passage ID Integer Passage ID from Metra tables

<passagedescription>Main entrance</passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<direction>exit</direction> Device direction Varchar (36) Defined in Metra SW (entrance or exit)

</event> / /

<event> Event / Events of last card lifecycle is given

<eventid>5246886</eventid> Event id Integer Unique event id from Metra DB

<dt>2007-11-19T09:40:00</dt> Timestamp of event Given in example

<code>100</code> Event Code Integer See table of available event codes

<codedescription>Card</codedescription> Event description Varchar (36) See table of available event descriptions

<mode>1</mode> Mode of event Code Integer See table of available mode codes

<modedescription>User key</modedescription> Mode of event description Varchar (36) Defined in Metra SW

<iddevice>102</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 10 08.09.2010

<devicedescription>CU 102</devicedescription> Device description Varchar (36) Defined in Metra SW

<idpassage>1</idpassage> Passage ID Integer Passage ID from Metra tables

<passagedescription>Main entrance</passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<idlocation>1</idlocation> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Ladys changing room</locationdescription> Location description Varchar (36)

<locker>1</locker> Locker number Integer

</event> / /

</events> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Card Info 01 XMLci1ver1.1U5.doc

Page 11 08.09.2010

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 1

“Card Info 01 v1.2” XML package

Revision:

Date Comment

26.07.2010 Creation of document

10.04.2012 Added Delivered Items

21.07.2014 Added <UID> and <tax2> in result and new filter in package <mode>

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 2

1 General This XML package is sent by 3rd party SW to obtain information about a card/wristband from

Metra NET systems.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used with CardInfo01v1.1:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid cardnumber), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and parameters depending on the

current status of the wristband/card. Only result code is returned if there are no additional

parameters.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

1.2 Mode

Using mode tag enables narrowing the result data to desired contents. Can be used to save

bandwidth in slower networks or over Wi-Fi.

Supported modes are “Services” and “Events”. Listing one or the other will narrow the result

contents to the respective section. Omitting the tag all together results in all contents being

listed in the result.

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>CardInfo01</name> Package name /

<version>1.2</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D00000000B46B41FE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<mode>Services,Events</mode> Mode Varchar (36) Select sections to be returned in result; if omitted, all is returned

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.2</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<functions> Functions

<function>Master Key</function> Master Key Varchar (36) If card is a Master Key in Metra NET system

<function>Multi Key</function> Multi Key Varchar (36) If card is a Multi Key in Metra NET system

<function>Black List</function> Black List Varchar (36) If card is on the Black List in Metra NET system

<function>White List</function> White List Varchar (36) If card is on the White List in Metra NET system

</functions> / /

<member> Member / If card is assigned to a Member in Metra NET system

<id>123456</id> Metra Member ID from Metra DB Integer

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 4

<title>Mr.</title> Title Varchar (30)

<firstname>John</firstname> First name Varchar (30)

<lastname>Doe</lastname> Last name Varchar (30)

</member> / /

<services> Services / If card has services sold to it in Metra NET system

<service> Service / There can be several services sold to one card

<doc> Document info / Document info for particular service

<posyeardoc>14/2010/284/277</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<uid>012345678901</uid> External UID Varchar(64) Shown if sent with ItemIssue XML package

<line>1</line> Document line Integer This service was sold on this line of given document

</doc> / /

<code>101</code> Service code Integer Service code from Metra tables

<iditem>T20101</iditem> Item ID Varchar (36) Item ID with which this service was sold

<passages> Passages / Algorithms-Check engines assignes to this card

<passage> Passage / There can be check engines assigned on several passages

<passageid>1</passageid> Passage ID Integer Passage ID from Metra tables

<passagedescription>Main entrance</passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<checkengines> Check engines / Check engines assigned on this passage

<checkengine> Check engine / There can be several check engines assigned on particular passage

<name>DT Limits</name> Check engine name / Date time absolute limits

<datetime> Date & Time limits /

<from>2010-01-01T15:30:00</from> Timestamp from Given in example Timestamp of absolute validity begining

<to>2010-31-01T23:59:59</to> Timestamp to Given in example Timestamp of absolute validity end

</datetime> / /

</checkengine> / /

<checkengine> Check engine /

<name>Guest</name> Check engine name / If ticket is a Guest ticket. Only one at a time is possible among guest, staff, service

</checkengine> / /

<checkengine> Check engine /

<name>Service</name> Check engine name / If ticket is a Service ticket. Only one at a time is possible among guest, staff, service

</checkengine> / /

<checkengine> Check engine /

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 5

<name>Staff</name> Check engine name / If ticket is a Staff ticket. Only one at a time is possible among guest, staff, service

</checkengine> / /

<checkengine> Check engine /

<name>Locker LCC NET</name> Check engine name / Information about LCC NET lockers for the given card

<lockedlockers> Locked lockers /

<locker> Locker / Several locked lockers are possible for one card

<number>1234</number> Locker number Integer

<location>1</location> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Ladys changing room</locationdescription> Location description Varchar (36)

<dt>2007-11-19T09:55:00</dt> Timestamp of locking Given in example

<controlunit>5</controlunit> Locker Control Unit ID Integer

<controlunitdescription>Ladys CU 5</controlunitdescription> Locker Control Unit description Varchar (36)

</locker> / /

<locker> Locker / Several locked lockers are possible for one card

<number>1234</number> Locker number Integer

<location>3</location> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Sauna</locationdescription> Location description Varchar (36)

<dt>2007-11-19T10:55:00</dt> Timestamp of locking Given in example

<controlunit>16</controlunit> Locker Control Unit ID Integer

<controlunitdescription>Sauna CU left</controlunitdescription> Locker Control Unit description Varchar (36)

</locker> / /

</lockedlockers> / /

<allowedlockers> Lockers allowed for locking

<locker> Locker / Several locked lockers are possible for one card

<count>1</count> Number of lockers Integer Number of lockers allowed

<location>1</location> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Ladys changing room</locationdescription> Location description Varchar (36)

<lockers>1-9999</lockers> Allowed locker range Blob

</locker> / /

</allowedlockers> / /

</checkengine> / /

<checkengine> Check engine /

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 6

<name>Minutes</name> Check engine name / Additional charge parameters

<minutes>23</minutes> Number of minutes integer Number of minutes over the predefined limit to charge for

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with additional payment interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

<name>Refund</name> Check engine name / Refund charge parameters

<minutes>23</minutes> Number of minutes integer Number of minutes to the predefined limit to refund

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with refund interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

<name>Points</name> Check engine name / Points

<dt>2007-11-19T09:50:00</dt> Timestamp of last entrance Given in example Can be used to obtain confirmation of last card entrance

<used>3</used> Used points Integer

<total>10</total> Total defined points Integer

</checkengine> / /

<checkengine> Check engine /

<name>Daily Points</name> Check engine name / Daily Points

<dt>2007-11-19T09:50:00</dt> Timestamp of last entrance Given in example Can be used to obtain confirmation of last card entrance

<used>2</used> Used points Integer

<total>3</total> Total defined points Integer

</checkengine> / /

<checkengine> Check engine /

<name>Daily Minutes</name> Check engine name / Daily minutes

<minutes>23</minutes> Number of minutes integer Number of minutes to the predefined limit to refund

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with additional payment interval; Item ID 123 with interval 030 min

</checkengine> / /

<checkengine> Check engine /

<name>Daily Minutes Gross</name> Check engine name /

<minutes>23</minutes> Number of minutes integer Number of minutes to the predefined limit to refund

<entrance>2007-11-19T09:50:00</entrance> Timestamp of entrance Given in example Can be used to obtain confirmation of card entrance

<item>123030</item> Item ID Varchar (36) Item ID with additional payment interval; Item ID 123 with interval 030 min

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 7

</checkengine> / /

<checkengine> Check engine /

<name>Entrance Time A</name> Check engine name / Entrance Time A

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity

</time> / /

<dayofweek>monday, tuesday, wednesday</dayofweek> Day of week Varchar (100) Day of week when valid

<date> Date limits

<from>2010-01-01</from> Date from Given in example Entrance date beggining of validity

<to>2010-31-01</to> Date to Given in example Entrance date end of validity

</date> / /

</checkengine> / /

<checkengine> Check engine /

<name>Entrance Time B</name> Check engine name / Entrance Time B

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity

</time> / /

<dayofweek>monday, tuesday, wednesday</dayofweek> Day of week Varchar (100) Day of week when valid

<date> Date limits

<from>2010-01-01</from> Date from Given in example Entrance date beggining of validity

<to>2010-31-01</to> Date to Given in example Entrance date end of validity

</date> / /

</checkengine> / /

<checkengine> Check engine /

<name>Entrance Delay</name> Check engine name / Delay between consecutive entrances

<minutes>5</minutes> Defined number of minutes Integer

</checkengine> / /

<checkengine> Check engine /

<name>First Day</name> Check engine name / First Day Entrance time; for long term tickets

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity for first day

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity for first day

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 8

</time> / /

</checkengine> / /

<checkengine> Check engine /

<name>Last Day</name> Check engine name / Last Day Entrance time; for long term tickets

<time> Entrance Time limits

<from>07:00:00</from> Time of day from Given in example Entrance time beggining of validity for last day

<to>17:00:00</to> Time of day to Given in example Entrance time end of validity for last day

</time> / /

</checkengine> / /

<checkengine> Check engine /

<name>Capture</name> Check engine name / Ticket is to be captured on exit when other parameters allow it

</checkengine> / /

<checkengine> Check engine /

<name>Exit Counter</name> Check engine name / Exit Counter is enabled; exit must be made before next entrance and vice versa

</checkengine> / /

<checkengine> Check engine /

<name>Validate Ring Entrance</name> Check engine name / If ring entrance is not made, entrance, locking or spending is denied

</checkengine> / /

<checkengine> Check engine /

<name>Borrow</name> Check engine name / Items are borrowed to this card

<items> Borrowed Items /

<item> Borrowed Item / Several items are possible for borrow

<description>towel</description> Item description Varchar (36)

<doc> Document info / Document info for particular item

<posyeardoc>14/2010/284/277</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<line>1</line> Document line Integer This service was sold on this line of given document

</doc> / /

</item> / /

</items> / /

</checkengine> / /

<checkengine> Check engine /

<name>Deposit</name> Check engine name / Deposit is made for this card

<items> Deposit Items /

<item> Deposit Item

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 9

<value>10</value> Item value Integer

<doc> Document info / Document info for deposit

<posyeardoc>14/2010/284/277</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<line>2</line> Document line Integer This service was sold on this line of given document

</doc> / /

</item> / /

</items> / /

</checkengine> / /

<checkengine> Check engine /

<name>Allow Delivery</name> Check engine name / Delivery to card

<limit>5000</limit> Limit Integer Credit value

</checkengine> / /

</checkengines> / /

</passage> / /

</passages> / /

</service> / /

<service> Service / There can be several services sold to one card

<doc> Document info / Document info for particular service

<posyeardoc>21/2012/77</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<uid>012345678902</uid> External UID Varchar(64) Shown if sent with CardDelivery XML package

<line>0</line> Document line Integer This service was sold on this line of given document

</doc> / /

<code>0</code> Service code Integer Service code from Metra tables

<iditem></iditem> Item ID Varchar (36) Item ID with which this service was sold

<passages> Passages / Algorithms-Check engines assignes to this card

<passage> Passage / There can be check engines assigned on several passages

<passageid>0</passageid> Passage ID Integer Passage ID from Metra tables

<passagedescription></passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<checkengines> Check engines / Check engines assigned on this passage

<checkengine> Check engine / There can be several check engines assigned on particular passage

<name>Delivery</name> Check engine name / Deliveries made to the RFID media

<posyeardoc>21/2012/77</posyeardoc> Ducument id Varchar (30) Format POSid/year/document/invoice from metra DB

<uid>012345678902</uid> External UID Varchar(64) Shown if sent with CardDelivery XML package

<items> Items / Delivered Items

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 10

<item> Item /

<id>FX50A</id> Unique Item ID Varchar (36)

<export>T1f</export> Unique Item export ID Varchar (30) Can be freely changed in Metra SW to enable id sync between Metra SW and 3rd party SW

<idservice>5018</idservice> Unique service ID Integer

<servicegroup> Service group /

<id>103</id> Service group ID Integer

<export>T1f</export> Service group export ID Varchar (30) Can be freely changed in Metra SW to enable id sync between Metra SW and 3rd party SW

</servicegroup> / /

<num>1</num> Number of items Integer

<price>7</price> Item price of one Item Decimal (15,4)

<discount> Discount /

<id>2</id> Discount code Integer Dicount can be without code. If discounts are not predefined and rate can be defined freely

<rate>20</rate> Discount rate Double precision

<value>1.4</value> Discount value for one Item Decimal (15,4)

<export>D2</export> Unique Discount export ID Varchar (30) Dicount can be without export ID. If discounts are not predefined and rate can be defined freely

</discount> / /

<value>5.6</value> Item value of one Item incl. discount Decimal (15,4)

<tax> Tax /

<id>1</id> Tax code Integer

<export>1</export> Unique Tax export ID Varchar (30) Can be freely changed in Metra SW to enable id sync between Metra SW and 3rd party SW

<rate>8.5</rate> Tax rate Double precision

<value>0.44</value> Tax value for one Item Decimal (15,4)

</tax> / /

<tax2> Tax2 / If dual taxes are used in Metra SW; both taxes are calculated and added to same nett price

<id>1</id> Already described /

<export></export> Already described / Can be freely changed in Metra SW to enable id sync between Metra SW and 3rd party SW

<rate></rate> Already described /

<value></value> Already described /

</tax2> / /

</item> / /

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 11

<item> Already described /

<id>DR0102</id> Already described /

<export>T1f</export> Already described /

<idservice>1007</idservice> Already described /

<servicegroup> Already described /

<id>105</id> Already described /

<export>T1f</export> Already described /

</servicegroup> Already described /

<num>1</num> Already described /

<price>4</price> Already described /

<discount> Already described /

<id>2</id> Already described /

<rate>20</rate> Already described /

<value>0.8</value> Already described /

<export>D2</export> Already described /

</discount> Already described /

<value>3.2</value> Already described /

<tax> Already described /

<id>1</id> Already described /

<export>1</export> Already described /

<rate>8.5</rate> Already described /

<value>0.25</value> Already described /

</tax> / /

</item> / /

</items> / /

</checkengine> / /

</checkengines> / /

</passage> / /

</passages> / /

</service> / /

</services> / /

<events> Events /

<event> Event / Events of last card lifecycle are given

<eventid>5246887</eventid> Event id Integer Unique event id from Metra DB

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 12

<dt>2007-11-19T09:50:00</dt> Timestamp of event Given in example

<code>250</code> Event Code Integer See table of available event codes

<codedescription>Deny</codedescription> Event description Varchar (36) See table of available event descriptions

<mode>24</mode> Mode of event Code Integer See table of available mode codes

<modedescription>Locker</modedescription> Mode of event description Varchar (36) Defined in Metra SW

<iddevice>301</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<devicedescription>Left 3R</devicedescription> Device description Varchar (36) Defined in Metra SW

<passageid>1</passageid> Passage ID Integer Passage ID from Metra tables

<passagedescription>Main entrance</passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<direction>exit</direction> Device direction Varchar (36) Defined in Metra SW (entrance or exit)

</event> / /

<event> Event / Events of last card lifecycle is given

<eventid>5246886</eventid> Event id Integer Unique event id from Metra DB

<dt>2007-11-19T09:40:00</dt> Timestamp of event Given in example

<code>100</code> Event Code Integer See table of available event codes

<codedescription>Card</codedescription> Event description Varchar (36) See table of available event descriptions

<mode>1</mode> Mode of event Code Integer See table of available mode codes

<modedescription>User key</modedescription> Mode of event description Varchar (36) Defined in Metra SW

<iddevice>102</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<devicedescription>CU 102</devicedescription> Device description Varchar (36) Defined in Metra SW

<idpassage>1</idpassage> Passage ID Integer Passage ID from Metra tables

<passagedescription>Main entrance</passagedescription> Passage Description Varchar (36) Passage Description from Metra tables

<idlocation>1</idlocation> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Ladys changing room</locationdescription> Location description Varchar (36)

<locker>1</locker> Locker number Integer

</event> / /

</events> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Card Info 01 XMLci1ver1.2U5.docx

Page 13

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages –Event Info XMLeviU5.doc

Page 1

“Event Info” XML package v1.0

Revision:

Date Comment

07.12.2010 Creation of document

15.09.2011 Revision

17.10.2011 Revision

25.02.2014 Added new events and modes to list of events and modes

24.03.2014 Added MEW DAT additional events

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages –Event Info XMLeviU5.doc

Page 2

1 General This XML package is sent by Metra SW to 3rd party SW to give event information of events

that happen in Metra systems.

These events are sent online in real time. Also they are queued in Metra DB if communication

is not possible at the time of event, so they are sent later when connection is re-established.

Which events are sent can be filtered in the Metra SW to avoid unnecessary traffic with info

not needed.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters. It must be sent by 3rd party SW, else event is queued and sent again later.

XML packages –Event Info XMLeviU5.doc

Page 3

2 Example XML package - entrance Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>EventInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<event> Event /

<eventid>5246886</eventid> Event id Integer Unique event id from Metra DB

<card>0009000000000000004D000000002E634162</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<dt>2007-11-19T09:40:00</dt> Date & time of event Given in example DT as recorded in Metra DB

<code>30</code> Event Code Integer 30 for locking, 40 for unlocking,…

<codedescription>Locking</codedescription> Event description Varchar (36) Locking, Unlocking,…

<mode>1</mode> Mode of event Code Integer 1, 5 or 71, see below for respective descriptions

<modedescription>User key</modedescription> Mode of event description Varchar (36) USER key, MASTER key, DELIVERY key

<iddevice>102</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<devicedescription>CU 102</devicedescription> Device description from Metra tables Varchar (36)

<locker>1234</locker> Locker number Integer

<idlocation>1</idlocation> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Lobby</locationdescription> Location description Varchar (36)

</event> / /

</parameters> / /

</package> / /

XML packages –Event Info XMLeviU5.doc

Page 4

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

</package> / /

XML packages –Event Info XMLeviU5.doc

Page 5

3 Events and Modes Not all events or modes apply to all integration scenarios.

3.1 Events 1 Read wristband, CardInfo01

2 Card Issue

3 Procedure (Points, Tokens, Borrow), Repair, Exit, Entrance

4 Erase wristband, Tickets erase

5 Barcode

6 External

7 Member Export

8 Member Import

10 Entrance

12 Entrance Denied

20 Exit

22 Exit Denied

30 Locking OK

31 Payed Locking OK

32 Locking Denied

33 Locking failed

34 Locking/Unlocking Error

40 Unlocking OK

43 Unlocking failed

49 Unlocking OK - Alarm Delay

50 Passage

52 Passage Denied

60 Push-button

61 Do Not Disturb

62 Make my Room

63 Room Cleaned

64 Reception Request

70 Deposit Activated

75 Deposit Deactivated

90 ALARM

91 Supervised locker break-in

100 Card

101 PIN

102 External / Remote

120 Card - Deposit

200 OK

201 Set Pay

202 Reset Pay

203 Activate Deposit

204 Deactivate Deposit

250 Denied

251 Wrong Reader Unit

252 Deposit Denied

300 Coin accepted

301 Temporary saldo erased

320 Vending OK

321 Vending Error

401 Locker closed after prelock

XML packages –Event Info XMLeviU5.doc

Page 6

402 Locker closed after unlocking

403 Locker opened after warning

404 Locker remained prelocked

405 +UWT

406 Prelocking not confirmed

450 "Pin" temporarily inhibited

451 "CodE" temporarily inhibited

452 "Scod" temporarily inhibited

460 Prelocking inhibited

490 Unlock request accepted

500 Free passage ON

501 Free passage OFF

510 Signal Alarm

511 Signal Armed ON

512 Signal Armed OFF

513 Signal PIN

514 Signal Test

515 Alarm Sensor Activated

516 Alarm Sensor Deactivated

517 Door Unlocked

518 Door Locked

519 Door Opened

520 Door Closed

521 Entrance Deactivated

522 Exit Deactivated

601 Update sold Tickets

602 Assign Procedure

603 Unlocking request

604 ELS Key Exchange Request

605 ELS Key Exchange Answer

606 WBC Closed After Timeout

607 Buyer Export

608 Buyer Import

609 Settle All Cards

610 External Payment

611 SMS Interface

612 S.M.SW Member Import

613 S.M.SW Locker ELS NET Export

614 WBC Closed

900 Power ON

901 General interrogation received

902 Start responding

903 Stop responding

904 Start multiple responses

905 Stop multiple responses

910 Time Set

911 New Time

912 Summer Time

913 Winter Time

920 Box Opened

921 Box Closed

930 Operating parameters OK

931 Operating parameters constructional

932 Requested initialization

XML packages –Event Info XMLeviU5.doc

Page 7

933 Automatic initialization

940 Error Terminated

941 Error

953 Coin acceptor start responding

954 Coin acceptor stop responding

960 SECURE Card

961 DOWNLOAD Card

962 SERVICE Card

963 CLEAN Card

964 ERASE Card

965 WARD Card

966 MASTER key

967 FAILSAFE key

990 Buffer overrun

999 State

XML packages –Event Info XMLeviU5.doc

Page 8

3.2 Modes 1 User Key

2 Ticket

3 Ticket Captured

4 Multi user key

5 MASTER key

6 MULTI key

7 FAILSAFE key

8 Push-button

9 ALARM

10 Entrance

11 Passage

12 Date

13 Time

14 Last Day

15 Day

16 Points

17 D Points

18 Direction

19 Not Valid

20 Exit

21 Tokens

22 MINI Card

23 Entrance delay

24 Locker

25 Add Charge

26 Refund

27 Borrow/PAY

28 Exit Counter

29 Cancelled LCC Card

30 Cancelled LCC Ticket

31 Denied LCC Ticket

32 Device Break-in

33 Door Break-in

34 Door Opened too long

35 Borrow

36 Delivery

37 Deny Exit

38 Electronic Money

39 WBC Full

40 Deposit

41 Maid key

42 OFF

43 ON

44 External

45 Busy

46 Minutes

47 Ring

48 Unfinished Document

49 Entrance Time Date

50 Passage

51 Child

XML packages –Event Info XMLeviU5.doc

Page 9

52 Pay Set

53 Pay Reset

54 Pay Set/Reset

55 Request

56 Answer

57 Event

58 One passage

59 Permanent Passage Change

60 First Day

61 Key denied

62 Not payed

63 User abort

64 Prelock

65 Timeout

66 Opened

67 Card Removed

68 D Minutes

69 D Minutes Gross

70 Clock

71 DELIVERY key

72 Delivery Not Possible

73 Extra

74 Group ticket

80 Motor error

81 "Err1"

82 "Err2"

85 Power off

86 Download required

87 File updated

90 Service required

91 Reader 1

92 Reader 2

95 Serial channel

97 Direct port

99 Unknown

101 Package

102 Result

111 EMERGENCY Key

112 Secret Code

113 Master Code

114 Network – Time Table

115 Network – Pushbutton

116 Automatic Opening

117 Pushbutton PCB

118 Door Opened

119 Free

120 Permanent key

121 Additional Payment

122 Occupy

123 Release

XML packages –Event Info XMLeviU5.doc

Page 10

4 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Exit XMLexiU5.doc

Page 1 13.05.2011

“Exit” XML package

Revision:

Date Comment

13.06.2007 Creation of document

17.09.2007 Revision

13.05.2011 Revision; correction of clerical mistakes

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Exit XMLexiU5.doc

Page 2 13.05.2011

1 General This XML package is sent by 3

rd party SW to deny or allow exit to a card/wristband in the

Metra LCC NET or LCC NET MF system.

When items are purchased to an account in 3rd

party SW (which is linked to a unique

card/wristband number), exit from the system is denied by sending this package.

When the account is settled by payment this same package (with different parameter) is sent

to allow exit from the system.

Error Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

ERROR_INVALID_PARAMETER – If parameters are not in the right format (e.g.

invalid date format), or if some are missing

ERROR_ACCESS_DENIED – If the sender is not allowed to communicate through

the Metra LCC NET interface; defined in Metra SW

ERROR_INVALID_FUNCTION – If card is on the black list or certain operation is

not allowed

ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – Exit XMLexiU5.doc

Page 3 13.05.2011

2 Example

2.1 Deny Exit

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Exit</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<exit>deny</exit> Deny exit parameter Varchar (36) Exit will be denied for given card

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Exit XMLexiU5.doc

Page 4 13.05.2011

2.2 Allow Exit

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Exit</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<exit>allow</exit> Allow exit parameter Varchar (36) Exit will be allowed again for given card

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Exit XMLexiU5.doc

Page 5 13.05.2011

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Event XMLeve11U5.doc

Page 1 14.12.2010

“Event” XML package v1.1

Revision:

Date Comment

25.04.2010 Creation of document

03.05.2010 Table of modes added

05.05.2010 Corrections in event id, added samples

06.05.2010 Correction of tags

05.10.2010 Added DT parameter

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Event XMLeve11U5.doc

Page 2 14.12.2010

1 General This XML package is sent by Metra SW to 3

rd party SW to give event information about a

certain wristband/media in the Metra LCC NET system.

Info about entrance to the system, exit and wristband capture before exit from the system is

available. Also all wristbands denied are send with the reason (mode).

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – Event XMLeve11U5.doc

Page 3 14.12.2010

2 Example XML package - entrance Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Event</name> Package name /

<version>1.1</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D000000002E634162</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<iddevice>301</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<idpassage>1</idpassage> Passage id assigned to device Integer Defined in Metra SW (1-9999)

<direction>exit</direction> Device direction Varchar (36) Defined in Metra SW (entrance or exit)

<event> Event /

<eventid>5246887</eventid> Event id Integer Unique event id from Metra DB

<dt>2007-09-17T09:50:00</dt> Date & time of event Given in example DT as recorded in Metra DB

<code>250</code> Event Code Integer 10 for entrance, 20 for exit or 250 for Deny

<codedescription>Deny</codedescription> Event description Varchar (36) Enter, Exit or Deny

<mode>24</mode> Mode of event Code Integer See table of available mode codes

<modedescription>Locker</modedescription> Mode of event description Varchar (36) See table of available mode descriptions

</event> / /

</parameters> / /

</package> / /

XML packages – Event XMLeve11U5.doc

Page 4 14.12.2010

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.1</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

</package> / /

XML packages – Event XMLeve11U5.doc

Page 5 14.12.2010

3 Appendix An XML file is attached to the document which is same as the example XML package.

3.1 Possible mode codes

Mainly apply to Deny event. 3 Capture

11 Location

12 Date

13 Time

14 Last Day

15 Day

16 Points

17 D Points

18 Direction

19 Not Valid

20 Exit

21 Tokens

23 Entrance delay

24 Locker

25 Add Charge

26 Refund

27 Borrow/PAY

28 Exit Counter

29 Cancelled Card

35 Borrow

36 Delivery

37 Deny Exit

38 Electronic Money

39 WBC Full

44 External

45 Busy

46 Minutes

47 Ring

Note: Only mode Capture is sent without event code or description; only mode code and

mode description.

3.2 Sample packeges

3.2.1 Deny – Not Valid on entrance <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package> <header>

<name>Event</name>

<version>1.1</version> </header>

<parameters>

<card>0009000000000000004D000000000C4CE739</card> <iddevice>333</iddevice>

<idpassage>1</idpassage>

<direction>entrance</direction>

<event>

<eventid>5246869</eventid> <code>250</code>

<codedescription>Deny</codedescription>

<mode>19</mode> <modedescription>NotValid</modedescription>

</event>

</parameters> </package>

3.2.2 Deny – Locker on exit <?xml version="1.0" encoding="utf-8" standalone="yes"?>

XML packages – Event XMLeve11U5.doc

Page 6 14.12.2010

<package> <header>

<name>Event</name>

<version>1.1</version> </header>

<parameters>

<card>0009000000000000004D000000002E634162</card> <iddevice>301</iddevice>

<idpassage>1</idpassage>

<direction>exit</direction> <event>

<eventid>5246887</eventid>

<code>250</code> <codedescription>Deny</codedescription>

<mode>24</mode>

<modedescription>Locker</modedescription> </event>

</parameters>

</package>

3.2.3 Enter <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package>

<header>

<name>Event</name>

<version>1.1</version> </header>

<parameters> <card>0009000000000000004D000000000C4CE739</card>

<iddevice>333</iddevice>

<idpassage>1</idpassage> <direction>entrance</direction>

<event>

<eventid>5246873</eventid> <code>10</code>

<codedescription>Enter</codedescription>

</event> </parameters>

</package>

3.2.4 Exit <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package>

<header> <name>Event</name>

<version>1.1</version>

</header> <parameters>

<card>0009000000000000004D000000000D4DE739</card>

<iddevice>301</iddevice> <idpassage>1</idpassage>

<direction>exit</direction>

<event> <eventid>5246877</eventid>

<code>20</code>

<codedescription>Exit</codedescription> </event>

</parameters>

</package>

3.2.5 Capture & Exit (note 2 packages!)

First Capture: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <package>

<header>

<name>Event</name> <version>1.1</version>

</header>

<parameters> <card>0009000000000000004D000000000C4CE739</card>

<iddevice>301</iddevice>

<idpassage>1</idpassage> <direction>exit</direction>

XML packages – Event XMLeve11U5.doc

Page 7 14.12.2010

<event> <eventid>5246876</eventid>

<mode>3</mode>

<modedescription>Capture</modedescription> </event>

</parameters>

</package>

Follwed by Exit: <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package>

<header> <name>Event</name>

<version>1.1</version>

</header> <parameters>

<card>0009000000000000004D000000000C4CE739</card>

<iddevice>301</iddevice> <idpassage>1</idpassage>

<direction>exit</direction>

<event> <eventid>5246877</eventid>

<code>20</code>

<codedescription>Exit</codedescription>

</event>

</parameters>

</package>

XML packages – External XMLextU5.docx

Page 1

“External” XML package

Revision:

Date Comment

07.03.2008 Creation of document

15.12.2008 Revision

23.11.2009 New parameters added; iddevice, idpassage, Lockers, WBC

21.10.2011 New parameter added: data

09.02.2012 Added PIN functionality

07.09.2012 Typo corrections idpassage->passage, iddevice->device

20.11.2013 MDB typo and explanation added

22.10.2014 Added captureonlysignal and allowonlysignal

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – External XMLextU5.docx

Page 2

1 General These XML package is sent to 3rd party SW through Metra TCP/IP interface to perform

external authorisation of action based on different parameters. E.g. acquire authorisation for

some passage or door, acquire action for wristband collector (capture wristband) or drive a

MDB vending machine.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface and expected from 3rd party SW are:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

Not all fields in the Result package that are generated by 3rd party SW are mandatory.

Different scenarios are explained in the following chapters.

1.1 Communication

In order to map a result XML package from the 3rd party SW to a sent XML package from

Metra SW it is mandatory to implement <userdata\> tag.

It can contain up to Varchar (36) value.

3rd party SW must echo the userdata string from the sent XML package in the respective

Result package. This allows for unique identification of a Result in multithread scenarios.

1.2 Driving access control devices including Wristband Collector (WBC)

When a wristband is presented to a Metra access control device reader or WBC (which is

incorporated in Turnstile access terminal - TAT), and it is defined to be externally authorised,

a package is sent with the parameters card, ID of the device, ID of the passage the device is

defined in (Metra SW tables), device direction, Lockers locked with this card and WBC state

(if presented to WBC).

If reading of Mifare card contents is turned on (access key and sector information is needed in

Metra SW), the package includes also data read from the card; in tag <data\>; length of tag

contents varies due to number of selected sectors to be read.

If the device is an exit device from the system and there are lockers locked with presented

card, the package will carry this information and exit can be automatically denied by 3rd party

SW due to this reason. Person should be sent back to unlock (free) the locker.

If WBC is in state of warning or alarm it means the bin for retaining wristbands is full or

nearly full and wristbands to be capture should be denied capture by 3rd party SW. This is to

preserve WBC HW. A ticket which is only to be granted passage without capture can be

allowed even if WBC is in any of the mentioned states.

Expected result can be:

“capture” - wristband is retained by the device and let through the gate

“deny” - wristband is denied

“allow” - Wristband is let through the gate, but not captured

“allowonlysignal” – UI on the device will signal as “allow” but gate will not activate

“captureonlysignal” – wristband is retained by the device, UI on device will signal as

“capture”, but gate will not activate

XML packages – External XMLextU5.docx

Page 3

“pin request” - PIN is requested from user at access control device if supported on

device UI

In case of PIN request, PIN must be entered at access control device and “External” package

is sent with card and pin parameter (both for reference reasons); expected result is allow or

deny.

Parameters of saldo & limit are obsolete in this scenario (driving access control device).

1.3 External Payment for passage

When a wristband is presented to a Metra Payment Access Terminal (PAT) and it is issued in

Metra SW to be externally authorised, a package is sent with the parameters card, ID of the

device, ID of the passage the device is defined in (Metra SW tables), device direction and

quota.

Expected result can be Capture (wristband is retained by the device), Deny (wristband is

denied) or Allow (Wristband is let through the gate, but not captured). Parameters of saldo &

limit are optional, but desired as they can be shown on the PAT.

1.4 Driving MDB Devices (Vending Machines)

This cycle are performed in two steps, each comprising of the same package and result but

with different parameters.

Regularly both are performed in sequence. If not, e.g. first step is repeated for the same or

different RFID media, the RFID media has not sufficient balance, the user has interrupted the

cycle or only checked for the balance, but performed no purchase.

1.4.1 1st step

User presents RFID media to the Metra MDB terminal. RFID media is only read and can be

removed from the antenna field for the rest of the cycle.

First the RFID media presented to the Metra MDB terminal and the Metra MDB Terminal ID

(unique in one system) is sent to the 3rd party SW. This is done to obtain the available balance

to be spent. This balance must be returned in the result package.

This balance is displayed on the MDB driven device display. This value is taken by the

vending machine as the max price of one particular item that can be selected and delivered. If

balance is too low, some items will be unavailable.

1.4.2 2nd step

User selects the item to be delivered on the vending machine keyboard or similar.

Now another External package is send with parameters like before in 1st step and additionally

the selected item ID and the price; both are defined on the vending machine itself through

vending machine GUI, keyboard or such (depends on the actual vending machine).

When this package is sent from Metra, the item has already been delivered, so the result

package is of technical nature, but still it is required to clean up open TCP connections and

not leave them to timeout.

XML packages – External XMLextU5.docx

Page 4

2 Examples

2.1 Driving access control devices

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<data>34CB3EFE34CB3EFE34CB3EFE34CB3E</data> Data read from card Varchar (xy) Offline data read from Mifare card; optional

<pin>0856</pin> PIN up to 12 digits including leading zeroes

<device>332</device> ID of Device from Metra tables Integer To determine device position e.g. Sauna, Fitness

<passage>2</passage> ID of Passage from Metra tables Integer To determine device position e.g. Sauna, Fitness

<direction>entrance</direction> Direction of requested access Varchar (36) Possible: Entrance, exit

<lockers> Lockers / Information about lockers locked with the given card

<locker> Locker /

<number>1234</number> Locker number integer

<location>1</location> Location of locker integer Same locker numbers are possible on different locations

<dt>2007-11-19T09:55:00</dt> Timestamp of locking ISO, Given in example

</locker> / /

<locker> Locker /

<number>102</number> Locker number integer

<location>2</location> Location of locker integer Same locker numbers are possible on different locations

<dt>2007-11-19T10:55:00</dt> Timestamp of locking ISO, Given in example

</locker> / /

</lockers> / /

<wbc> WBC status /

<state>warning or alarm</state> WBC state Varchar (36) Possible alarm or warning

</wbc> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

XML packages – External XMLextU5.docx

Page 5

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<action>capture</action> Device action Varchar (36) Possible: capture, deny, allow, pin request; mind all letters in lower case

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 6

2.2 External payment of passage

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<quota>123abc</quota> Quota from Metra tables Varchar (36) Can be price of particular e.g. solarium, or just a description

<device>332</device> ID of Device from Metra tables Integer To determine device position e.g. Sauna, Fitness

<passage>2</passage> ID of Passage from Metra tables Integer To determine device position e.g. Sauna, Fitness

<direction>entrance</direction> Direction of requested access Varchar (36) Possible: Entrance, exit

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<balance>25.45</balance> Wristbands saldo Integer SUM of current spending on the wristband; from 3rd party SW

<limit>60.00</limit> Wristbands limit integer Limit to which spending is allowed; from 3rd party SW

<action>allow</action> Device action Varchar (36) Possible: capture, deny, allow

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 7

2.3 Driving MDB Devices (Vending Machines)

2.3.1 First step

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<device>332</device> ID of Device from Metra tables Integer To determine device

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<balance>25.45</balance> Wristbands balance Integer Balance to be shown on the vending machine display

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 8

2.3.2 Second step

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<device>332</device> ID of Device from Metra tables Integer To determine device

<item>A51</item> ID of Item that was delivered Varchar (36) ID is defined on the vending machine

<price>11.60</price> Price of Item that was delivered Numeric (18,2) Price is defined on the vending machine

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 9

3 Appendix An XML file is attached to the document which is same as the example XML package.

External.Result.xml External.xml

XML packages – Get Card XMLgcaU5.doc

Page 1

“Get Card” XML package

Revision:

Date Comment

07.02.2008 Creation of document

01.04.2014 Added Metra USB desktop reader support and direct access to POS service

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Get Card XMLgcaU5.doc

Page 2

1 General This XML package is sent by 3rd party SW to obtain a card/wristband unique card number

from Metra NET systems. Number can be obtained using two different HW desktop readers.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used with GetCard XML package:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list (only through

interface server) or certain operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and card number. If error code is

returned, there is no card.

1.1 Metra USB Desktop POS Reader

Must be connected to PC where Metra POS service is installed.

This HW and SW configuration supports communicating to Metra Interface server or directly

to POS service.

When interfacing to Metra interface server addressing of the USB Metra desktop POS reader

for communication purposes is performed by POS ID (defined in Metra SW).

When interfacing directly to POS service the PCs HOSTNAME/IP is used to identify the

reader.

This direct option also supports reading of several cards in one request.

Only one reader per PC is supported in any of the above scenarios.

1.2 Metra desktop POS reader

Must be connected to Metra NET network.

This HW and SW configuration supports communicating to Metra Interface server only to

access the reader.

When interfacing to Metra interface server addressing of the Metra desktop POS reader for

communication purposes is performed by POS ID (defined in Metra SW) or readers unique

network code/ID.

XML packages – Get Card XMLgcaU5.doc

Page 3

2 Example

2.1 Metra USB Desktop POS reader

2.1.1 Communication through Metra interface server

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>GetCard</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> POS code from Metra tables Integer This code must be used to identify the reader via POS relation

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<card>0009000000000000004D00000000B46B41FE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Get Card XMLgcaU5.doc

Page 4

2.1.2 Communication directly to Metra POS service (example for reading / requesting 1 card)

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<request> / /

<header> / /

<name>GetCard</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<issuecount>1</issuecount> Number of cards expected Integer Result will list all cards if all expected are read

<timeout>10000</timeout> Timeout in ms Integer Within this time reader is activated to find a card

</parameters> / /

</request> Userdata Varchar (36) Result of this XML package includes same userdata

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<card>0009000000000000004D00000000AEADA712</card> Unique Cardnumber(s) in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

</package> / /

XML packages – Get Card XMLgcaU5.doc

Page 5

2.1.3 Communication directly to Metra POS service (example for reading / requesting 2 cards)

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<request> / /

<header> / /

<name>GetCard</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<issuecount>2</issuecount> Number of cards expected Integer Result will list all cards if all expected are read

<timeout>10000</timeout> Timeout in ms Integer Within this time reader is activated to find a card

</parameters> / /

</request> Userdata Varchar (36) Result of this XML package includes same userdata

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<card>0009000000000000004D00000000AEADA712, 0009000000000000004D00000000BCADA714</card> Unique Cardnumber(s) in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

</package> / /

XML packages – Get Card XMLgcaU5.doc

Page 6

2.2 Metra Desktop POS reader

Communication only through Metra interface server.

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>GetCard</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> POS code from Metra tables Integer Either this code or device code must be used

<device>550</device> Desktop POS reader network code Integer Either this code or POS code must be used

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<card>0009000000000000004D00000000B46B41FE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Get Card XMLgcaU5.doc

Page 7

3 Appendix An XML file is attached to the document which is same as the example XML package.

Metra LCC NET interface

Page 1

Metra LCC NET interface

Table of contents Metra LCC NET interface ......................................................................................................................... 2

Glossary ............................................................................................................................................... 2

General ................................................................................................................................................ 2

Metra devices ................................................................................................................................. 2

Metra SW ........................................................................................................................................ 3

Check Engines .............................................................................................................................. 3

Metra LCC NET System outline ........................................................................................................... 3

Metra LCC NET as slave................................................................................................................... 3

3rd party SW as master ................................................................................................................ 3

Local Metra servers network topology scenario ......................................................................... 4

Central Metra server (like central 3rd Party server) network topology scenario ........................ 5

Metra LCC NET Interface ..................................................................................................................... 5

Communication .............................................................................................................................. 6

Integration & testing....................................................................................................................... 6

XML data packages ......................................................................................................................... 6

Item Issue .................................................................................................................................... 6

Disable ......................................................................................................................................... 6

Tickets Erase ................................................................................................................................ 6

Exit Deny / Allow ......................................................................................................................... 6

Card Info ...................................................................................................................................... 6

Card Info 01 ................................................................................................................................. 7

Repair .......................................................................................................................................... 7

Card Info 02 ................................................................................................................................. 7

White List ..................................................................................................................................... 7

Black List ...................................................................................................................................... 7

External ........................................................................................................................................ 7

Event ............................................................................................................................................ 7

Occupation .................................................................................................................................. 7

Unlock .......................................................................................................................................... 7

Page 2

Metra LCC NET interface

Metra LCC NET interface

Glossary

HW: Hardware components

SW: Software components

DB: Database

Access Control: Access control is the ability to permit or deny the use of a particular resource by a particular entity.

Metra LCC NET: Metra HW and SW components working as a whole Metra LCC system. Metra devices driven by Check Engines from Metra SW with Firebird DB.

Metra NET Network: Industry standard CAN network that is used for interconnection of Metra devices.

Check engine: Check engines are assigned to tickets upon issue. Different Check Engine performs different algorithms for cards on Metra devices.

Passage: A physical (area/location) or logical (functional) whole to which different Check Engine can be assigned.

TCP/IP: Transmission Control Protocol (TCP) and the Internet Protocol (IP)

XML: The Extensible Mark-up Language (XML) is a general-purpose mark-up language. Its primary purpose is to facilitate the sharing of data across different information systems, particularly via the Internet.

RFID: Radio-frequency identification (RFID) is an automatic identification method, relying on storing and remotely retrieving data using devices called RFID tags or transponders.

POS: Point Of sale

User: People working with the Metra system and/or SW.

DT: Date and time – usually limits.

Item ID: Unique ID of Items in Metra SW, which can be a group of rules (Ticket) for cards or just plain Items such as food/drinks.

PMS: Property management system

HIS: Hotel information system

Gastro: Gastronomy information system – a SW used for restaurant sales and management.

General The Metra LCC NET system is a combination of Metra devices and Metra SW working as one whole and/or interfacing with 3rd party PMS, HIS or Gastro systems.

Metra devices They are driven by check engines assigned to cards upon issue. All of the devices are connected to the Metra NET Network and they are “online” devices with certain “offline” functionality that only makes the Metra LCC NET system more robust.

Page 3

Metra LCC NET interface

Metra SW Metra software is a multilingual web application running on Firebird database. It is a capable of defining, setting and maintaining all Metra devices and driving them using Check Engines assigned to cards. The POS part of the application is capable of issuing charging Items to cards, producing analyses of sale and guest flow reports. When collaboration is needed with 3rd party SW, it can interface with a TCP/IP based interface exchanging XML packages. Check Engines Check Engine are rules by which cards are granted on denied a certain service inside the Metra LCC NET system. They are of “internal” or “external” nature. Internal ones are driven by Metra SW algorithms, external ones ask a 3rd party SW for permission to a certain service (Access to area, Solarium, Vending machines, etc.) through the Metra TCP/IP interface.

Metra LCC NET System outline The Metra LCC NET system always consists of HW and SW components and can be integrated to a facility as a “master“ or a “slave” application in regards to the 3rd party SW it is being integrated with. The same media (cards) are used throughout the whole system; even in other system such as Fitness, Hotel, etc.

Metra LCC NET as slave In a slave position Metra SW user interface is used by system operators only to supervise and maintain the Metra LCC NET system. It takes care of all the Metra HW devices (definition, parameterisation, maintenance). Check engines are defined and parameterised in the Metra SW and combined in groups of rules – Tickets. All the Metra HW devices are driven by Check Engine issued to cards as Tickets at sale (not from Metra SW). Reports of events (guest flow) are obtained from the Metra SW. Optionally exported. The Metra TCP/IP interface is used to enable the master system complete guest control: Issuing Tickets to cards, erasing Tickets, performing external checks for particular services, denying/allowing exit from the system on Metra LCC NET access devices. 3rd party SW as master In this situation a 3rd party SW is in charge of the system. Its user interface is used by system operators performing all the sales of Tickets or Items on the main receptions and cash desks where money changes hands – where bills are issued. Additionally for the purpose of e.g. sales inside the system (from the access point of view). Sales (items) are charged to the guest’s unique card number to the 3rd party SW DB. Metra POS readers can be used or 3rd party readers to obtain this card number on POS inside the system. At this point a delivery note is issued upon purchase (NOT a bill), as no money changes hand. XML packages sent to the Metra DB through the Metra TCP/IP interface used to enable complete integration of the Metra LCC NET system are:

Item Issue

Item issue using Metra wristband issuer

Ticket erasing

Page 4

Metra LCC NET interface

External check engine

Deny/allow exit

CardInfo (01, 02)

Disable Local Metra servers network topology scenario Through Metra TCP/IP interface with ItemIssue, CardInfo, TicketsErase, BlackList, and other XML packages the following operations with tickets are supported: programming, extending validity, erasing, adding to the black list, etc.

In case of link failure to main server, Metra access control still works. Several Metra server licences and server HW.

Page 5

Metra LCC NET interface

Central Metra server (like central 3rd Party server) network topology scenario i) Through Metra TCP/IP interface with ItemIssue, CardInfo, TicketsErase, BlackList, and other XML packages the following operations with tickets are supported: programming, extending validity, erasing, adding to the black list, etc. ii) Direct real time authorisation of media through Metra TCP/IP interface with external XML package.

Single Metra server licence and server HW. External control of devices when media is presented (option ii only). In case of link failure to main server, Metra access control does not work. Time delay possible due to 3rd party SW performance (option ii only).

Metra LCC NET Interface Metra LCC NET Interface is an interface transmitting XML packages through TCP/IP. Several XML packages are used which enable total integration of the Metra LCC NET system with 3rd party SW. These packages are exchanged between the Metra server and the 3rd party server or clients; depending on the type of 3rd party SW application.

Page 6

Metra LCC NET interface

Communication Data is transmitted over TCP/IP in text format. All of the packages are sent using STX (ASCII 0x02) before the package and ETX (ASCII 0x03) after. Content of the package is between these two. Coding of the XML package must be UTF-8!

Integration & testing To illustrate communication and for testing purposes demo programs (client & server) with sources are supplied by Metra. For all the XML packages samples are supplied by Metra.

XML data packages XML data packages are used to interact with the Metra SW. There are several packages, which apply to different functionalities of the system. Issuing items to cards, Erasing data for a particular card, Issuing Metra wristbands using the Metra wristband issuer, Deny/Allow exit from the Metra system for a particular card, performing external authorisation for a card on a particular device. Item Issue This XML package is sent by 3rd party SW to issue an Item to a card/wristband in the Metra LCC NET system. An Item is a group of rules inside the Metra LCC NET system e.g. Ticket. The rules are predefined in the Metra SW using check engines; internal (access), external (access or payment), etc. Items can be issued to a known media or unknown media/wristband using Metra Wristband Issuer. See XMLitiU5.pdf for package and result details. Disable This XML package is sent by 3rd party SW to disable a certain check engine previously assigned to a card/wristband by “Item Issue” in the Metra LCC NET system. E.g. If a wristband is issued with refund functionality this can be disabled, turning it into a normal daily ticket, without any duration of stay limitations. See XMLdisU5.pdf for package and result details. Tickets Erase This XML package is sent by 3rd party SW to erase all the Check Engine assigned to a particular card from the Metra SW DB. Used when wristband/card is not retained by Metra device, but returned manually to personnel. See XMLtieU5.pdf for package and result details. Exit Deny / Allow This XML package is sent by 3rd party SW to deny or allow an exit from the Metra LCC NET system on exit devices. It is used mainly in when selling items to cards and wanting to collect money for them on the main cash desk upon guests exit from the controlled area. Therefore exit must be denied when purchases are made to a card (inside the system) and allowed when paid for (on main reception/cash desk). See XMLexiU5.pdf for package and result details. Card Info This XML package is sent by 3rd party SW to obtain information about media (a card/wristband/key) in the Metra ELS system regarding lockers occupied by a particular media. Typically used in 3rd party access control systems to deny or allow exit from the controlled area. See XMLciU5.pdf for package and result details.

Page 7

Metra LCC NET interface

Card Info 01 This XML package is sent by 3rd party SW to obtain information about a card/wristband in the Metra LCC NET system regarding additional charge, refund parameters, Locker usage and media usage in general. See XMLci1U5.pdf for package and result details. Repair This XML package is sent by 3rd party SW to repair parameters of a particular wristband/card in the Metra LCC NET system so that exit from the system is allowed. This applies only to parameters such as duration time limitations. It does not apply to status given by the Exit XML package. See XMLrepU5.pdf for package and result details. Card Info 02 This XML package is sent by Metra SW to 3rd party SW to obtain information about a card/wristband from 3rd party SW regarding account parameters. Current spending saldo and limit are given. See XMLci2U5.pdf for package and result details. White List This XML package is sent by 3rd party SW to add/remove card/wristband to/from the White in the Metra LCC NET system. Media on the white list is valid to be used on Metra ELS lockers and in general. Packages are sent as strings through the Metra TCP/IP interface. Sent card number is obtained from 3rd party SW; it must be sent in Metra format. See document Metra_ELS_SN_Encoding.pdf. Black List This XML package is sent by 3rd party SW to add/remove card/wristband to/from the Black list in the Metra LCC NET system. Media on the black list is not valid to be used on Metra ELS lockers and in general. Packages are sent as strings through the Metra TCP/IP interface. Sent card number is obtained from 3rd party SW; it must be sent in Metra format. See document Metra_ELS_SN_Encoding.pdf. External This XML package is sent to 3rd party SW through Metra TCP/IP interface to perform external authorisation of action based on different parameters. E.g. acquire authorisation for some passage or door or acquire action for wristband collector (capture wristband). Event This XML package is sent by Metra SW to 3rd party SW to give event information about a certain card in the Metra LCC NET system. Info about entrance to the system and wristband capture upon exit from the system is available. Occupation This XML package is sent by 3rd party SW to obtain information about access control area occupation and locker occupation parameters. The package is sent to Metra DB server through the Metra TCP/IP interface. Information is returned from Metra DB server in the result package. Unlock This XML package is sent by 3rd party SW to unlock a particular locker in Metra LCC NET system.

XML packages – Item Issue XMLitiU5.docx

Page 1

“Item Issue” XML package

Revision:

Date Comment

11.06.2007 Creation of document

17.09.2007 Revision

09.09.2008 Revision; Wristband Issuer functionality added

15.04.2010 Revision; Wristband issuer additional parameter added

27.05.2010 DT omit option supported

11.04.2012 Barcode added

15.08.2012 Barcode – Coupon functionality

17.12.2013 Description field added to document

21.07.2014 UID field added

22.07.2014 Magazine field added

15.08.2014 Duration field added

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Item Issue XMLitiU5.docx

Page 2

1 General This XML package is sent by 3rd party SW through TCP/IP interface to issue an Item to a

card/wristband in the Metra LCC NET system.

An Item is a group of rules inside the Metra LCC NET system e.g. Ticket. The rules are

predefined in the Metra SW using check engines; internal (access), external (access or

payment), etc.

Items can be issued to a known cardnumber/media or unknown cardnumber/media using the

Metra Wristband Issuer (HW component) - WBI.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used with ItemIssue:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

85 (0x55) - ERROR_ALREADY_ASSIGNED – The media already has a ticket

programmed to it. XML package “EraseTickets” must be used first.

21 (0x15) - ERROR_NOT_READY - The device (only WBI) is not ready.

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and cardnumber. Cardnumber only if

the Wristband issuer is used! Cardnumber is used as a guest reference in the 3rd party SW.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

1.2 Issuing to known media

In this case the cardnumber is obtained by the 3rd party SW by using Metra or 3rd party

Desktop POS readers.

Mandatory parameters:

Item, Card, datetimefrom, datetimeto.

Note: datetimefrom and datetimeto can be omitted if services predefined in the Metra SW

tables have the date validity defined as xy days, else they must be supplied using this package.

If parameters are not supplied and not predefined, media is issued with one day validity; from

the moment of sending the package until midnight same day.

If supplied with the package they override, anything predefined in the Metra SW tables.

1.2.1 Duration

Used to define gross locker usage duration per media lifecycle when using Reader Terminal

Touch Assign ELS NET systems.

XML packages – Item Issue XMLitiU5.docx

Page 3

1.2.2 Barcode - Coupon

When a barcode is created and printed in 3rd party SW and sent to Metra interface server, the

card tag must be omitted. In this case a reservation of the sent item is created in the Metra SW

via Coupon functionality. A wristband from the Coupon Ticket item sent is issued to a guest

when barcode is read in Metra POS or Metra self service terminal.

1.3 Wristband issuer

Mandatory parameters:

Mode, Issue device, Item, datetimefrom, datetimeto.

The result package does not only have a generic technical meaning, but also returns the

cardnumber of the wristband issued by the wristband issuer.

Parameter “IssueDevice” is used to directly address the wanted wristband issuer device.

Note: datetimefrom and datetimeto can be omitted if services predefined in the Metra SW

tables have the date validity defined as xy days, else they must be supplied using this package.

If parameters are not supplied and not predefined, media is issued with one day validity; from

the moment of sending the package until midnight same day.

If supplied with the package they override, anything predefined in the Metra SW tables.

1.3.1 <magazine>

If parameter “magazine” is used, wristbands can be requested from particular chain/magazine

with wristband. Magazine 1, 2 or 3 is a possible value with current model of WBI.

This enables colour differentiation of wristbands and such.

1.3.2 Extdata

Parameter extdata is used to transfer/write custom 3rd party SW data to a wristband using

wristband issuer.

1.4 Description

Is used in file system interfaces to transfer e.g. guests name to file interface.

Also the data is written to Metra DB and can be accessed through result of cardinfo01 XML

package referenced to a particular card. Can be used to store guests name, ticket type, custom

external data, etc.

1.5 UID

UID tag is used to store external unique identifier for identification of actions (applying to

particular document in Metra system) from result of cardinfo01 XML package.

XML packages – Item Issue XMLitiU5.docx

Page 4

2 Examples

2.1 Full Package

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>ItemIssue</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> Point of sale code Small integer If parameter is not given, lowest from Metra DB is used

<user>2</user> User code Small integer If parameter is not given, lowest from Metra DB is used

<issuedevice>571</issuedevice> Metra NET device address Small integer Metra network ID of Wristband Issuer (WBI)

<mode>WristbandIssuer</mode> Mode of issuing Varchar (30) Used only with WBI

<magazine>2</magazine> WBI magazine Integer Used to request a wristband from specific magazine

<item>100ABC</item> Unique Item ID Varchar (36)

<param>30</param> Item Parameter Integer Used to extend minutes of stay duration & Electronic money

<card>0009000000000000004D00000000344042FE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<citem>1001ABC</citem> Unique Item ID Varchar (36) Item to be sold when importing Barcode / Coupon

<cticket>1234BDE</cticket> Unique Item ID Varchar (36) Ticket item to be sold when issuing media from Barcode / Coupon

<barcode>1234567890123456</barcode> Barcode INT64 Barcode generated in 3rd party SW

<extdata>0123456789ABCDEF0123456789ABCDEF</extdata> External data Varchar (63) Data which is written on the media using Wristband Issuer

<datetimefrom>2007-09-17T09:50:00</datetimefrom> Date & time from Given in example Start of validity

<datetimeto>2007-09-18T09:50:00</datetimeto> Date & time to Given in example End of validity

<description>John Doe</description> Guest description or custom external info Varchar (30) Used with file interfaces and cardinfo01 XML package

<duration>180</duration> Duration in minutes Integer Only used with ELS NET Reader Terminal Touch Assign Systems

<uid>0123456789ABCDEFGHI</uid> External UID Varchar(64) Used to follow actions in cardinfo01 XML package

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Item Issue XMLitiU5.docx

Page 5

2.2 Issuing to known media:

2.2.1 Programming RFID media

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>ItemIssue</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> Point of sale code (Optional) Small integer If parameter is not given, lowest from Metra DB is used

<user>2</user> User code (Optional) Small integer If parameter is not given, lowest from Metra DB is used

<item>100ABC</item> Unique Item ID Varchar (36)

<param>30</param> Item Parameter (Optional) Integer Used to extend minutes of stay duration & Electronic money QTY

<card>0009000000000000004D00000000344042FE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<datetimefrom>2007-09-17T09:50:00</datetimefrom> Date & time from (Optional) Given in example Start of validity

<datetimeto>2007-09-18T09:50:00</datetimeto> Date & time to (Optional) Given in example End of validity

<description>John Doe</description> Guest description Varchar (30) Used with file interfaces

<uid>0123456789ABCDEFGHI</uid> External UID Varchar(64) Used to follow actions in cardinfo01 XML package

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Item Issue XMLitiU5.docx

Page 6

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Item Issue XMLitiU5.docx

Page 7

2.2.2 Making a reservation to a barcode through Coupon functionality

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>ItemIssue</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> Point of sale code (Optional) Small integer If parameter is not given, lowest from Metra DB is used

<user>2</user> User code (Optional) Small integer If parameter is not given, lowest from Metra DB is used

<citem>1001ABC</citem> Unique Item ID Varchar (36) Item to be sold when importing Barcode / Coupon

<cticket>1234BDE</cticket> Unique Item ID Varchar (36) Ticket item to be sold when issuing media from Barcode / Coupon

<barcode>1234567890123456</barcode> Barcode INT64 Barcode generated in 3rd party SW

<datetimeto>2007-09-18T09:50:00</datetimeto> Date & time to (Optional) Given in example End of validity of barcode

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Item Issue XMLitiU5.docx

Page 8

2.3 Wristband issuer

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>ItemIssue</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<pos>1</pos> Point of sale code (Optional) Small integer If parameter is not given, lowest from Metra DB is used

<user>2</user> User code (Optional) Small integer If parameter is not given, lowest from Metra DB is used

<issuedevice>571</issuedevice> Metra NET device address Small integer Metra network ID of Wristband Issuer

<mode>WristbandIssuer</mode> Mode of issuing Varchar (30) Used only with WBI

<magazine>2</magazine> WBI magazine Integer Used to request a wristband from specific magazine

<item>123ABC</item> Unique Item ID Varchar (36)

<extdata>0123456789ABCDEF0123456789ABCDEF</extdata> External data (Optional) Varchar (63) Data which is written on the media using Wristband Issuer

<datetimefrom>2007-09-17T09:50:00</datetimefrom> Date & time from (Optional) Given in example Start of validity

<datetimeto>2007-09-18T09:50:00</datetimeto> Date & time to (Optional) Given in example End of validity

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Item Issue XMLitiU5.docx

Page 9

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<card>0009000000000000004D00000000344042FE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Item Issue XMLitiU5.docx

Page 10

3 Appendix An XML file is attached to the document which is same as the full example XML package

and result.

XML packages – Repair XMLrepU5.docx

Page 1

“Repair” XML package

Revision:

Date Comment

07.02.2008 Creation of document

03.07.2014 Added <mode/> support

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Repair XMLrepU5.docx

Page 2

1 General This XML package is sent by 3rd party SW to repair parameters of a particular wristband/card

in Metra NET systems so that exit from the access control system is allowed and/or other

financial transactions are settled.

**The Repair package does not affect status given by the Exit XML package.

For this XML package the result is generic, giving only the result code without any additional

parameters.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Result codes used with Repair:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

1.1 Mode

There are 4 modes for this operation; if all or none are listed or tag <mode/> is omitted all 4

are performed. If individual (or two or three) are listed as in example only the respective

actions are performed.

CardDelivery

Operation will settle all opened delivery notes made by Card Delivery.

ElectonicMoney Operation will settle the debit value of Electronic Money.

Access Operation will settle access control parameters preventing an exit such as visit

duration time limitations, etc.

Locker

Operation will clear the occupied locker(s) association in Metra DB.

Locker mode should be implemented in a way that it is not automatic/default, only for

borderline situations. E.g. a guest is attempting an exit and is denied due to Locker and/or

other parameters. Firstly the guest should be instructed to go and release the locker, if

reluctant the Locker mode can be used.

If Locker mode is used it must be clear to the system operator that the guest will leave whilst

leaving an occupied locker that will not be available for other guests until released by

cleaning or other daily maintenance system procedures.

1.2 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Repair XMLrepU5.docx

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Repair</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<mode>CardDelivery,Access,Locker,ElectronicMoney</mode> Mode of repair (all possibilities are in example) Varchar (256) Possible modes can be individual or grouped as in example

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Repair XMLrepU5.docx

Page 4

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Tickets Erase XMLtieU5.docx

Page 1

“Tickets Erase” XML package

Revision:

Date Comment

13.06.2007 Creation of document

17.09.2007 Revision

16.08.2012 Barcode / Coupon functionality added

15.08.2014 <mode/> tag added

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Tickets Erase XMLtieU5.docx

Page 2

1 General This XML package is sent by 3rd party SW to erase all the Check Engines programmed to a

particular card/wristband/barcode in Metra NET systems.

1.1 Mode

When <mode/> is not used particular card is erased that is specified in <card/>.

<mode/> enables bulk deletion of media distinguishing between RFID and Barcode media. If

all media is to be erased, both must be listed like in example. <card/> must be omitted in this

case.

1.2 Coupon

When using Coupon functionality, the barcode tag is used to erase not yet used coupons; used

in case of wrong input of coupons through Item issue package, etc. <mode/> is not supported

for Coupon functionality.

Error Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – Tickets Erase XMLtieU5.docx

Page 3

2 Examples

2.1 RFID / Barcode Media

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>TicketsErase</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

2.2 Bulk erase with <mode/>

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>TicketsErase</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<mode>RFID,Barcode</mode> Mode for erasing Varchar (36) RFID, Barcode or both as listed; case sensitive

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

XML packages – Tickets Erase XMLtieU5.docx

Page 4

2.3 Coupon / Barcode

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8"?> / /

<package> / /

<header> / /

<name>TicketsErase</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<barcode>1234567890123456</barcode> Barcode INT64

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

2.4 Result

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Tickets Erase XMLtieU5.docx

Page 5

3 Appendix An XML file is attached to the document which is same as the example XML package.

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

LCC NET EXTERNAL INTERFACE

XML packages – Event XMLeve11U5.doc

Page 1 14.12.2010

“Event” XML package v1.1

Revision:

Date Comment

25.04.2010 Creation of document

03.05.2010 Table of modes added

05.05.2010 Corrections in event id, added samples

06.05.2010 Correction of tags

05.10.2010 Added DT parameter

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Event XMLeve11U5.doc

Page 2 14.12.2010

1 General This XML package is sent by Metra SW to 3

rd party SW to give event information about a

certain wristband/media in the Metra LCC NET system.

Info about entrance to the system, exit and wristband capture before exit from the system is

available. Also all wristbands denied are send with the reason (mode).

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – Event XMLeve11U5.doc

Page 3 14.12.2010

2 Example XML package - entrance Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Event</name> Package name /

<version>1.1</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D000000002E634162</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<iddevice>301</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<idpassage>1</idpassage> Passage id assigned to device Integer Defined in Metra SW (1-9999)

<direction>exit</direction> Device direction Varchar (36) Defined in Metra SW (entrance or exit)

<event> Event /

<eventid>5246887</eventid> Event id Integer Unique event id from Metra DB

<dt>2007-09-17T09:50:00</dt> Date & time of event Given in example DT as recorded in Metra DB

<code>250</code> Event Code Integer 10 for entrance, 20 for exit or 250 for Deny

<codedescription>Deny</codedescription> Event description Varchar (36) Enter, Exit or Deny

<mode>24</mode> Mode of event Code Integer See table of available mode codes

<modedescription>Locker</modedescription> Mode of event description Varchar (36) See table of available mode descriptions

</event> / /

</parameters> / /

</package> / /

XML packages – Event XMLeve11U5.doc

Page 4 14.12.2010

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.1</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

</package> / /

XML packages – Event XMLeve11U5.doc

Page 5 14.12.2010

3 Appendix An XML file is attached to the document which is same as the example XML package.

3.1 Possible mode codes

Mainly apply to Deny event. 3 Capture

11 Location

12 Date

13 Time

14 Last Day

15 Day

16 Points

17 D Points

18 Direction

19 Not Valid

20 Exit

21 Tokens

23 Entrance delay

24 Locker

25 Add Charge

26 Refund

27 Borrow/PAY

28 Exit Counter

29 Cancelled Card

35 Borrow

36 Delivery

37 Deny Exit

38 Electronic Money

39 WBC Full

44 External

45 Busy

46 Minutes

47 Ring

Note: Only mode Capture is sent without event code or description; only mode code and

mode description.

3.2 Sample packeges

3.2.1 Deny – Not Valid on entrance <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package> <header>

<name>Event</name>

<version>1.1</version> </header>

<parameters>

<card>0009000000000000004D000000000C4CE739</card> <iddevice>333</iddevice>

<idpassage>1</idpassage>

<direction>entrance</direction>

<event>

<eventid>5246869</eventid> <code>250</code>

<codedescription>Deny</codedescription>

<mode>19</mode> <modedescription>NotValid</modedescription>

</event>

</parameters> </package>

3.2.2 Deny – Locker on exit <?xml version="1.0" encoding="utf-8" standalone="yes"?>

XML packages – Event XMLeve11U5.doc

Page 6 14.12.2010

<package> <header>

<name>Event</name>

<version>1.1</version> </header>

<parameters>

<card>0009000000000000004D000000002E634162</card> <iddevice>301</iddevice>

<idpassage>1</idpassage>

<direction>exit</direction> <event>

<eventid>5246887</eventid>

<code>250</code> <codedescription>Deny</codedescription>

<mode>24</mode>

<modedescription>Locker</modedescription> </event>

</parameters>

</package>

3.2.3 Enter <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package>

<header>

<name>Event</name>

<version>1.1</version> </header>

<parameters> <card>0009000000000000004D000000000C4CE739</card>

<iddevice>333</iddevice>

<idpassage>1</idpassage> <direction>entrance</direction>

<event>

<eventid>5246873</eventid> <code>10</code>

<codedescription>Enter</codedescription>

</event> </parameters>

</package>

3.2.4 Exit <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package>

<header> <name>Event</name>

<version>1.1</version>

</header> <parameters>

<card>0009000000000000004D000000000D4DE739</card>

<iddevice>301</iddevice> <idpassage>1</idpassage>

<direction>exit</direction>

<event> <eventid>5246877</eventid>

<code>20</code>

<codedescription>Exit</codedescription> </event>

</parameters>

</package>

3.2.5 Capture & Exit (note 2 packages!)

First Capture: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <package>

<header>

<name>Event</name> <version>1.1</version>

</header>

<parameters> <card>0009000000000000004D000000000C4CE739</card>

<iddevice>301</iddevice>

<idpassage>1</idpassage> <direction>exit</direction>

XML packages – Event XMLeve11U5.doc

Page 7 14.12.2010

<event> <eventid>5246876</eventid>

<mode>3</mode>

<modedescription>Capture</modedescription> </event>

</parameters>

</package>

Follwed by Exit: <?xml version="1.0" encoding="utf-8" standalone="yes"?>

<package>

<header> <name>Event</name>

<version>1.1</version>

</header> <parameters>

<card>0009000000000000004D000000000C4CE739</card>

<iddevice>301</iddevice> <idpassage>1</idpassage>

<direction>exit</direction>

<event> <eventid>5246877</eventid>

<code>20</code>

<codedescription>Exit</codedescription>

</event>

</parameters>

</package>

XML packages – External XMLextU5.docx

Page 1

“External” XML package

Revision:

Date Comment

07.03.2008 Creation of document

15.12.2008 Revision

23.11.2009 New parameters added; iddevice, idpassage, Lockers, WBC

21.10.2011 New parameter added: data

09.02.2012 Added PIN functionality

07.09.2012 Typo corrections idpassage->passage, iddevice->device

20.11.2013 MDB typo and explanation added

22.10.2014 Added captureonlysignal and allowonlysignal

© Copyright 2014

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – External XMLextU5.docx

Page 2

1 General These XML package is sent to 3rd party SW through Metra TCP/IP interface to perform

external authorisation of action based on different parameters. E.g. acquire authorisation for

some passage or door, acquire action for wristband collector (capture wristband) or drive a

MDB vending machine.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface and expected from 3rd party SW are:

87 (0x57) - ERROR_INVALID_PARAMETER – If parameters are not in the right

format (e.g. invalid date format), or if some are missing

5 (0x5) - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

1 (0x1) - ERROR_INVALID_FUNCTION – If card is on the black list or certain

operation is not allowed

0 (0x0) - ERROR_SUCCESS – Operation succeeded

Not all fields in the Result package that are generated by 3rd party SW are mandatory.

Different scenarios are explained in the following chapters.

1.1 Communication

In order to map a result XML package from the 3rd party SW to a sent XML package from

Metra SW it is mandatory to implement <userdata\> tag.

It can contain up to Varchar (36) value.

3rd party SW must echo the userdata string from the sent XML package in the respective

Result package. This allows for unique identification of a Result in multithread scenarios.

1.2 Driving access control devices including Wristband Collector (WBC)

When a wristband is presented to a Metra access control device reader or WBC (which is

incorporated in Turnstile access terminal - TAT), and it is defined to be externally authorised,

a package is sent with the parameters card, ID of the device, ID of the passage the device is

defined in (Metra SW tables), device direction, Lockers locked with this card and WBC state

(if presented to WBC).

If reading of Mifare card contents is turned on (access key and sector information is needed in

Metra SW), the package includes also data read from the card; in tag <data\>; length of tag

contents varies due to number of selected sectors to be read.

If the device is an exit device from the system and there are lockers locked with presented

card, the package will carry this information and exit can be automatically denied by 3rd party

SW due to this reason. Person should be sent back to unlock (free) the locker.

If WBC is in state of warning or alarm it means the bin for retaining wristbands is full or

nearly full and wristbands to be capture should be denied capture by 3rd party SW. This is to

preserve WBC HW. A ticket which is only to be granted passage without capture can be

allowed even if WBC is in any of the mentioned states.

Expected result can be:

“capture” - wristband is retained by the device and let through the gate

“deny” - wristband is denied

“allow” - Wristband is let through the gate, but not captured

“allowonlysignal” – UI on the device will signal as “allow” but gate will not activate

“captureonlysignal” – wristband is retained by the device, UI on device will signal as

“capture”, but gate will not activate

XML packages – External XMLextU5.docx

Page 3

“pin request” - PIN is requested from user at access control device if supported on

device UI

In case of PIN request, PIN must be entered at access control device and “External” package

is sent with card and pin parameter (both for reference reasons); expected result is allow or

deny.

Parameters of saldo & limit are obsolete in this scenario (driving access control device).

1.3 External Payment for passage

When a wristband is presented to a Metra Payment Access Terminal (PAT) and it is issued in

Metra SW to be externally authorised, a package is sent with the parameters card, ID of the

device, ID of the passage the device is defined in (Metra SW tables), device direction and

quota.

Expected result can be Capture (wristband is retained by the device), Deny (wristband is

denied) or Allow (Wristband is let through the gate, but not captured). Parameters of saldo &

limit are optional, but desired as they can be shown on the PAT.

1.4 Driving MDB Devices (Vending Machines)

This cycle are performed in two steps, each comprising of the same package and result but

with different parameters.

Regularly both are performed in sequence. If not, e.g. first step is repeated for the same or

different RFID media, the RFID media has not sufficient balance, the user has interrupted the

cycle or only checked for the balance, but performed no purchase.

1.4.1 1st step

User presents RFID media to the Metra MDB terminal. RFID media is only read and can be

removed from the antenna field for the rest of the cycle.

First the RFID media presented to the Metra MDB terminal and the Metra MDB Terminal ID

(unique in one system) is sent to the 3rd party SW. This is done to obtain the available balance

to be spent. This balance must be returned in the result package.

This balance is displayed on the MDB driven device display. This value is taken by the

vending machine as the max price of one particular item that can be selected and delivered. If

balance is too low, some items will be unavailable.

1.4.2 2nd step

User selects the item to be delivered on the vending machine keyboard or similar.

Now another External package is send with parameters like before in 1st step and additionally

the selected item ID and the price; both are defined on the vending machine itself through

vending machine GUI, keyboard or such (depends on the actual vending machine).

When this package is sent from Metra, the item has already been delivered, so the result

package is of technical nature, but still it is required to clean up open TCP connections and

not leave them to timeout.

XML packages – External XMLextU5.docx

Page 4

2 Examples

2.1 Driving access control devices

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<data>34CB3EFE34CB3EFE34CB3EFE34CB3E</data> Data read from card Varchar (xy) Offline data read from Mifare card; optional

<pin>0856</pin> PIN up to 12 digits including leading zeroes

<device>332</device> ID of Device from Metra tables Integer To determine device position e.g. Sauna, Fitness

<passage>2</passage> ID of Passage from Metra tables Integer To determine device position e.g. Sauna, Fitness

<direction>entrance</direction> Direction of requested access Varchar (36) Possible: Entrance, exit

<lockers> Lockers / Information about lockers locked with the given card

<locker> Locker /

<number>1234</number> Locker number integer

<location>1</location> Location of locker integer Same locker numbers are possible on different locations

<dt>2007-11-19T09:55:00</dt> Timestamp of locking ISO, Given in example

</locker> / /

<locker> Locker /

<number>102</number> Locker number integer

<location>2</location> Location of locker integer Same locker numbers are possible on different locations

<dt>2007-11-19T10:55:00</dt> Timestamp of locking ISO, Given in example

</locker> / /

</lockers> / /

<wbc> WBC status /

<state>warning or alarm</state> WBC state Varchar (36) Possible alarm or warning

</wbc> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

XML packages – External XMLextU5.docx

Page 5

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<action>capture</action> Device action Varchar (36) Possible: capture, deny, allow, pin request; mind all letters in lower case

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 6

2.2 External payment of passage

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<quota>123abc</quota> Quota from Metra tables Varchar (36) Can be price of particular e.g. solarium, or just a description

<device>332</device> ID of Device from Metra tables Integer To determine device position e.g. Sauna, Fitness

<passage>2</passage> ID of Passage from Metra tables Integer To determine device position e.g. Sauna, Fitness

<direction>entrance</direction> Direction of requested access Varchar (36) Possible: Entrance, exit

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<balance>25.45</balance> Wristbands saldo Integer SUM of current spending on the wristband; from 3rd party SW

<limit>60.00</limit> Wristbands limit integer Limit to which spending is allowed; from 3rd party SW

<action>allow</action> Device action Varchar (36) Possible: capture, deny, allow

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 7

2.3 Driving MDB Devices (Vending Machines)

2.3.1 First step

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<device>332</device> ID of Device from Metra tables Integer To determine device

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<balance>25.45</balance> Wristbands balance Integer Balance to be shown on the vending machine display

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 8

2.3.2 Second step

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>External</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>0009000000000000004D0000000034CB3EFE</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<device>332</device> ID of Device from Metra tables Integer To determine device

<item>A51</item> ID of Item that was delivered Varchar (36) ID is defined on the vending machine

<price>11.60</price> Price of Item that was delivered Numeric (18,2) Price is defined on the vending machine

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package must include same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with External XML package

</package> / /

XML packages – External XMLextU5.docx

Page 9

3 Appendix An XML file is attached to the document which is same as the example XML package.

External.Result.xml External.xml

Metra LCC NET interface

Page 1

Metra LCC NET interface

Table of contents Metra LCC NET interface ......................................................................................................................... 2

Glossary ............................................................................................................................................... 2

General ................................................................................................................................................ 2

Metra devices ................................................................................................................................. 2

Metra SW ........................................................................................................................................ 3

Check Engines .............................................................................................................................. 3

Metra LCC NET System outline ........................................................................................................... 3

Metra LCC NET as slave................................................................................................................... 3

3rd party SW as master ................................................................................................................ 3

Local Metra servers network topology scenario ......................................................................... 4

Central Metra server (like central 3rd Party server) network topology scenario ........................ 5

Metra LCC NET Interface ..................................................................................................................... 5

Communication .............................................................................................................................. 6

Integration & testing....................................................................................................................... 6

XML data packages ......................................................................................................................... 6

Item Issue .................................................................................................................................... 6

Disable ......................................................................................................................................... 6

Tickets Erase ................................................................................................................................ 6

Exit Deny / Allow ......................................................................................................................... 6

Card Info ...................................................................................................................................... 6

Card Info 01 ................................................................................................................................. 7

Repair .......................................................................................................................................... 7

Card Info 02 ................................................................................................................................. 7

White List ..................................................................................................................................... 7

Black List ...................................................................................................................................... 7

External ........................................................................................................................................ 7

Event ............................................................................................................................................ 7

Occupation .................................................................................................................................. 7

Unlock .......................................................................................................................................... 7

Page 2

Metra LCC NET interface

Metra LCC NET interface

Glossary

HW: Hardware components

SW: Software components

DB: Database

Access Control: Access control is the ability to permit or deny the use of a particular resource by a particular entity.

Metra LCC NET: Metra HW and SW components working as a whole Metra LCC system. Metra devices driven by Check Engines from Metra SW with Firebird DB.

Metra NET Network: Industry standard CAN network that is used for interconnection of Metra devices.

Check engine: Check engines are assigned to tickets upon issue. Different Check Engine performs different algorithms for cards on Metra devices.

Passage: A physical (area/location) or logical (functional) whole to which different Check Engine can be assigned.

TCP/IP: Transmission Control Protocol (TCP) and the Internet Protocol (IP)

XML: The Extensible Mark-up Language (XML) is a general-purpose mark-up language. Its primary purpose is to facilitate the sharing of data across different information systems, particularly via the Internet.

RFID: Radio-frequency identification (RFID) is an automatic identification method, relying on storing and remotely retrieving data using devices called RFID tags or transponders.

POS: Point Of sale

User: People working with the Metra system and/or SW.

DT: Date and time – usually limits.

Item ID: Unique ID of Items in Metra SW, which can be a group of rules (Ticket) for cards or just plain Items such as food/drinks.

PMS: Property management system

HIS: Hotel information system

Gastro: Gastronomy information system – a SW used for restaurant sales and management.

General The Metra LCC NET system is a combination of Metra devices and Metra SW working as one whole and/or interfacing with 3rd party PMS, HIS or Gastro systems.

Metra devices They are driven by check engines assigned to cards upon issue. All of the devices are connected to the Metra NET Network and they are “online” devices with certain “offline” functionality that only makes the Metra LCC NET system more robust.

Page 3

Metra LCC NET interface

Metra SW Metra software is a multilingual web application running on Firebird database. It is a capable of defining, setting and maintaining all Metra devices and driving them using Check Engines assigned to cards. The POS part of the application is capable of issuing charging Items to cards, producing analyses of sale and guest flow reports. When collaboration is needed with 3rd party SW, it can interface with a TCP/IP based interface exchanging XML packages. Check Engines Check Engine are rules by which cards are granted on denied a certain service inside the Metra LCC NET system. They are of “internal” or “external” nature. Internal ones are driven by Metra SW algorithms, external ones ask a 3rd party SW for permission to a certain service (Access to area, Solarium, Vending machines, etc.) through the Metra TCP/IP interface.

Metra LCC NET System outline The Metra LCC NET system always consists of HW and SW components and can be integrated to a facility as a “master“ or a “slave” application in regards to the 3rd party SW it is being integrated with. The same media (cards) are used throughout the whole system; even in other system such as Fitness, Hotel, etc.

Metra LCC NET as slave In a slave position Metra SW user interface is used by system operators only to supervise and maintain the Metra LCC NET system. It takes care of all the Metra HW devices (definition, parameterisation, maintenance). Check engines are defined and parameterised in the Metra SW and combined in groups of rules – Tickets. All the Metra HW devices are driven by Check Engine issued to cards as Tickets at sale (not from Metra SW). Reports of events (guest flow) are obtained from the Metra SW. Optionally exported. The Metra TCP/IP interface is used to enable the master system complete guest control: Issuing Tickets to cards, erasing Tickets, performing external checks for particular services, denying/allowing exit from the system on Metra LCC NET access devices. 3rd party SW as master In this situation a 3rd party SW is in charge of the system. Its user interface is used by system operators performing all the sales of Tickets or Items on the main receptions and cash desks where money changes hands – where bills are issued. Additionally for the purpose of e.g. sales inside the system (from the access point of view). Sales (items) are charged to the guest’s unique card number to the 3rd party SW DB. Metra POS readers can be used or 3rd party readers to obtain this card number on POS inside the system. At this point a delivery note is issued upon purchase (NOT a bill), as no money changes hand. XML packages sent to the Metra DB through the Metra TCP/IP interface used to enable complete integration of the Metra LCC NET system are:

Item Issue

Item issue using Metra wristband issuer

Ticket erasing

Page 4

Metra LCC NET interface

External check engine

Deny/allow exit

CardInfo (01, 02)

Disable Local Metra servers network topology scenario Through Metra TCP/IP interface with ItemIssue, CardInfo, TicketsErase, BlackList, and other XML packages the following operations with tickets are supported: programming, extending validity, erasing, adding to the black list, etc.

In case of link failure to main server, Metra access control still works. Several Metra server licences and server HW.

Page 5

Metra LCC NET interface

Central Metra server (like central 3rd Party server) network topology scenario i) Through Metra TCP/IP interface with ItemIssue, CardInfo, TicketsErase, BlackList, and other XML packages the following operations with tickets are supported: programming, extending validity, erasing, adding to the black list, etc. ii) Direct real time authorisation of media through Metra TCP/IP interface with external XML package.

Single Metra server licence and server HW. External control of devices when media is presented (option ii only). In case of link failure to main server, Metra access control does not work. Time delay possible due to 3rd party SW performance (option ii only).

Metra LCC NET Interface Metra LCC NET Interface is an interface transmitting XML packages through TCP/IP. Several XML packages are used which enable total integration of the Metra LCC NET system with 3rd party SW. These packages are exchanged between the Metra server and the 3rd party server or clients; depending on the type of 3rd party SW application.

Page 6

Metra LCC NET interface

Communication Data is transmitted over TCP/IP in text format. All of the packages are sent using STX (ASCII 0x02) before the package and ETX (ASCII 0x03) after. Content of the package is between these two. Coding of the XML package must be UTF-8!

Integration & testing To illustrate communication and for testing purposes demo programs (client & server) with sources are supplied by Metra. For all the XML packages samples are supplied by Metra.

XML data packages XML data packages are used to interact with the Metra SW. There are several packages, which apply to different functionalities of the system. Issuing items to cards, Erasing data for a particular card, Issuing Metra wristbands using the Metra wristband issuer, Deny/Allow exit from the Metra system for a particular card, performing external authorisation for a card on a particular device. Item Issue This XML package is sent by 3rd party SW to issue an Item to a card/wristband in the Metra LCC NET system. An Item is a group of rules inside the Metra LCC NET system e.g. Ticket. The rules are predefined in the Metra SW using check engines; internal (access), external (access or payment), etc. Items can be issued to a known media or unknown media/wristband using Metra Wristband Issuer. See XMLitiU5.pdf for package and result details. Disable This XML package is sent by 3rd party SW to disable a certain check engine previously assigned to a card/wristband by “Item Issue” in the Metra LCC NET system. E.g. If a wristband is issued with refund functionality this can be disabled, turning it into a normal daily ticket, without any duration of stay limitations. See XMLdisU5.pdf for package and result details. Tickets Erase This XML package is sent by 3rd party SW to erase all the Check Engine assigned to a particular card from the Metra SW DB. Used when wristband/card is not retained by Metra device, but returned manually to personnel. See XMLtieU5.pdf for package and result details. Exit Deny / Allow This XML package is sent by 3rd party SW to deny or allow an exit from the Metra LCC NET system on exit devices. It is used mainly in when selling items to cards and wanting to collect money for them on the main cash desk upon guests exit from the controlled area. Therefore exit must be denied when purchases are made to a card (inside the system) and allowed when paid for (on main reception/cash desk). See XMLexiU5.pdf for package and result details. Card Info This XML package is sent by 3rd party SW to obtain information about media (a card/wristband/key) in the Metra ELS system regarding lockers occupied by a particular media. Typically used in 3rd party access control systems to deny or allow exit from the controlled area. See XMLciU5.pdf for package and result details.

Page 7

Metra LCC NET interface

Card Info 01 This XML package is sent by 3rd party SW to obtain information about a card/wristband in the Metra LCC NET system regarding additional charge, refund parameters, Locker usage and media usage in general. See XMLci1U5.pdf for package and result details. Repair This XML package is sent by 3rd party SW to repair parameters of a particular wristband/card in the Metra LCC NET system so that exit from the system is allowed. This applies only to parameters such as duration time limitations. It does not apply to status given by the Exit XML package. See XMLrepU5.pdf for package and result details. Card Info 02 This XML package is sent by Metra SW to 3rd party SW to obtain information about a card/wristband from 3rd party SW regarding account parameters. Current spending saldo and limit are given. See XMLci2U5.pdf for package and result details. White List This XML package is sent by 3rd party SW to add/remove card/wristband to/from the White in the Metra LCC NET system. Media on the white list is valid to be used on Metra ELS lockers and in general. Packages are sent as strings through the Metra TCP/IP interface. Sent card number is obtained from 3rd party SW; it must be sent in Metra format. See document Metra_ELS_SN_Encoding.pdf. Black List This XML package is sent by 3rd party SW to add/remove card/wristband to/from the Black list in the Metra LCC NET system. Media on the black list is not valid to be used on Metra ELS lockers and in general. Packages are sent as strings through the Metra TCP/IP interface. Sent card number is obtained from 3rd party SW; it must be sent in Metra format. See document Metra_ELS_SN_Encoding.pdf. External This XML package is sent to 3rd party SW through Metra TCP/IP interface to perform external authorisation of action based on different parameters. E.g. acquire authorisation for some passage or door or acquire action for wristband collector (capture wristband). Event This XML package is sent by Metra SW to 3rd party SW to give event information about a certain card in the Metra LCC NET system. Info about entrance to the system and wristband capture upon exit from the system is available. Occupation This XML package is sent by 3rd party SW to obtain information about access control area occupation and locker occupation parameters. The package is sent to Metra DB server through the Metra TCP/IP interface. Information is returned from Metra DB server in the result package. Unlock This XML package is sent by 3rd party SW to unlock a particular locker in Metra LCC NET system.

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

ELS INTERFACE

XML packages –Event Info XMLeviU5.doc

Page 1

“Event Info” XML package v1.0

Revision:

Date Comment

07.12.2010 Creation of document

15.09.2011 Revision

17.10.2011 Revision

25.02.2014 Added new events and modes to list of events and modes

24.03.2014 Added MEW DAT additional events

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages –Event Info XMLeviU5.doc

Page 2

1 General This XML package is sent by Metra SW to 3rd party SW to give event information of events

that happen in Metra systems.

These events are sent online in real time. Also they are queued in Metra DB if communication

is not possible at the time of event, so they are sent later when connection is re-established.

Which events are sent can be filtered in the Metra SW to avoid unnecessary traffic with info

not needed.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters. It must be sent by 3rd party SW, else event is queued and sent again later.

XML packages –Event Info XMLeviU5.doc

Page 3

2 Example XML package - entrance Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>EventInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<event> Event /

<eventid>5246886</eventid> Event id Integer Unique event id from Metra DB

<card>0009000000000000004D000000002E634162</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<dt>2007-11-19T09:40:00</dt> Date & time of event Given in example DT as recorded in Metra DB

<code>30</code> Event Code Integer 30 for locking, 40 for unlocking,…

<codedescription>Locking</codedescription> Event description Varchar (36) Locking, Unlocking,…

<mode>1</mode> Mode of event Code Integer 1, 5 or 71, see below for respective descriptions

<modedescription>User key</modedescription> Mode of event description Varchar (36) USER key, MASTER key, DELIVERY key

<iddevice>102</iddevice> Device id where event happened Integer Defined in Metra SW (1-999)

<devicedescription>CU 102</devicedescription> Device description from Metra tables Varchar (36)

<locker>1234</locker> Locker number Integer

<idlocation>1</idlocation> Location ID Integer Same locker numbers are possible on different locations

<locationdescription>Lobby</locationdescription> Location description Varchar (36)

</event> / /

</parameters> / /

</package> / /

XML packages –Event Info XMLeviU5.doc

Page 4

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

</package> / /

XML packages –Event Info XMLeviU5.doc

Page 5

3 Events and Modes Not all events or modes apply to all integration scenarios.

3.1 Events 1 Read wristband, CardInfo01

2 Card Issue

3 Procedure (Points, Tokens, Borrow), Repair, Exit, Entrance

4 Erase wristband, Tickets erase

5 Barcode

6 External

7 Member Export

8 Member Import

10 Entrance

12 Entrance Denied

20 Exit

22 Exit Denied

30 Locking OK

31 Payed Locking OK

32 Locking Denied

33 Locking failed

34 Locking/Unlocking Error

40 Unlocking OK

43 Unlocking failed

49 Unlocking OK - Alarm Delay

50 Passage

52 Passage Denied

60 Push-button

61 Do Not Disturb

62 Make my Room

63 Room Cleaned

64 Reception Request

70 Deposit Activated

75 Deposit Deactivated

90 ALARM

91 Supervised locker break-in

100 Card

101 PIN

102 External / Remote

120 Card - Deposit

200 OK

201 Set Pay

202 Reset Pay

203 Activate Deposit

204 Deactivate Deposit

250 Denied

251 Wrong Reader Unit

252 Deposit Denied

300 Coin accepted

301 Temporary saldo erased

320 Vending OK

321 Vending Error

401 Locker closed after prelock

XML packages –Event Info XMLeviU5.doc

Page 6

402 Locker closed after unlocking

403 Locker opened after warning

404 Locker remained prelocked

405 +UWT

406 Prelocking not confirmed

450 "Pin" temporarily inhibited

451 "CodE" temporarily inhibited

452 "Scod" temporarily inhibited

460 Prelocking inhibited

490 Unlock request accepted

500 Free passage ON

501 Free passage OFF

510 Signal Alarm

511 Signal Armed ON

512 Signal Armed OFF

513 Signal PIN

514 Signal Test

515 Alarm Sensor Activated

516 Alarm Sensor Deactivated

517 Door Unlocked

518 Door Locked

519 Door Opened

520 Door Closed

521 Entrance Deactivated

522 Exit Deactivated

601 Update sold Tickets

602 Assign Procedure

603 Unlocking request

604 ELS Key Exchange Request

605 ELS Key Exchange Answer

606 WBC Closed After Timeout

607 Buyer Export

608 Buyer Import

609 Settle All Cards

610 External Payment

611 SMS Interface

612 S.M.SW Member Import

613 S.M.SW Locker ELS NET Export

614 WBC Closed

900 Power ON

901 General interrogation received

902 Start responding

903 Stop responding

904 Start multiple responses

905 Stop multiple responses

910 Time Set

911 New Time

912 Summer Time

913 Winter Time

920 Box Opened

921 Box Closed

930 Operating parameters OK

931 Operating parameters constructional

932 Requested initialization

XML packages –Event Info XMLeviU5.doc

Page 7

933 Automatic initialization

940 Error Terminated

941 Error

953 Coin acceptor start responding

954 Coin acceptor stop responding

960 SECURE Card

961 DOWNLOAD Card

962 SERVICE Card

963 CLEAN Card

964 ERASE Card

965 WARD Card

966 MASTER key

967 FAILSAFE key

990 Buffer overrun

999 State

XML packages –Event Info XMLeviU5.doc

Page 8

3.2 Modes 1 User Key

2 Ticket

3 Ticket Captured

4 Multi user key

5 MASTER key

6 MULTI key

7 FAILSAFE key

8 Push-button

9 ALARM

10 Entrance

11 Passage

12 Date

13 Time

14 Last Day

15 Day

16 Points

17 D Points

18 Direction

19 Not Valid

20 Exit

21 Tokens

22 MINI Card

23 Entrance delay

24 Locker

25 Add Charge

26 Refund

27 Borrow/PAY

28 Exit Counter

29 Cancelled LCC Card

30 Cancelled LCC Ticket

31 Denied LCC Ticket

32 Device Break-in

33 Door Break-in

34 Door Opened too long

35 Borrow

36 Delivery

37 Deny Exit

38 Electronic Money

39 WBC Full

40 Deposit

41 Maid key

42 OFF

43 ON

44 External

45 Busy

46 Minutes

47 Ring

48 Unfinished Document

49 Entrance Time Date

50 Passage

51 Child

XML packages –Event Info XMLeviU5.doc

Page 9

52 Pay Set

53 Pay Reset

54 Pay Set/Reset

55 Request

56 Answer

57 Event

58 One passage

59 Permanent Passage Change

60 First Day

61 Key denied

62 Not payed

63 User abort

64 Prelock

65 Timeout

66 Opened

67 Card Removed

68 D Minutes

69 D Minutes Gross

70 Clock

71 DELIVERY key

72 Delivery Not Possible

73 Extra

74 Group ticket

80 Motor error

81 "Err1"

82 "Err2"

85 Power off

86 Download required

87 File updated

90 Service required

91 Reader 1

92 Reader 2

95 Serial channel

97 Direct port

99 Unknown

101 Package

102 Result

111 EMERGENCY Key

112 Secret Code

113 Master Code

114 Network – Time Table

115 Network – Pushbutton

116 Automatic Opening

117 Pushbutton PCB

118 Door Opened

119 Free

120 Permanent key

121 Additional Payment

122 Occupy

123 Release

XML packages –Event Info XMLeviU5.doc

Page 10

4 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Locker Info XMLlriU5.doc

Page 1

“Locker Info” XML package

Revision:

Date Comment

26.07.2010 Creation of document

14.12.2011 Revision of comments of XML package

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Locker Info XMLlriU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to obtain information (in the respective result

package) about particular locker status parameters and last 50 events from Metra ELS system.

Locations are used in locker systems where several lockers exist with the same locker

number. Therefore they are assigned to different locations to enable unique treatment of each.

The package is sent to Metra interface server through the Metra TCP/IP interface.

Information is returned from Metra interface server in the result package.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and additional locker parameters

depending on the parameters given in the Locker Info package.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd

party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Locker Info XMLlriU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>LockerInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<locker>1234</locker> Locker number (1-7999) integer mandatory field

<location>1</location> Location ID (1-9999) integer mandatory field if locations are used in the system

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (30) Result of this XML package includes same userdata if sent here

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<locker> Locker /

<location>1</location> Location ID (1-9999) of locker integer Same locker numbers are possible on different locations

<locker>1234</locker> Locker number integer

<state>0</state> State ID Integer

<statedescription>VACANT</statedescription> State Description Varchar (30) In English only

<events> Events

<event> Event

<eventid>5271034</eventid> Event id Integer Unique event id from Metra DB

XML packages – Locker Info XMLlriU5.doc

Page 4

<dt>2010-07-26T11:51:40</dt> Timestamp of event Given in example

<code>288</code> Event code integer

<codedescription>UNLOCKING OK</codedescription> Event code Description Varchar (30) In English only

<mode>9</mode> Mode ID Integer

<modedescription>PUSHBUTTON</modedescription> Event mode Description Varchar (30) In English only

<statebefore>2</statebefore> State ID Integer

<statebeforedescription>OCCUPIED</statebeforedescription> State Description Varchar (30) In English only

<stateafter>0</stateafter> State ID Integer

<stateafterdescription>VACANT</stateafterdescription> State Description Varchar (30) In English only

<card>0009000000000000004D000000000CFDE639</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

</event> / /

<event> Already described Already described

<eventid>5271033</eventid> Already described Already described

<dt>2010-07-26T11:51:01</dt> Already described Already described

<code>289</code> Already described Already described

<codedescription>LOCKING OK</codedescription> Already described Already described

<mode>3</mode> Already described Already described

<modedescription>USER KEY</modedescription> Already described Already described

<statebefore>2</statebefore> Already described Already described

<statebeforedescription>OCCUPIED</statebeforedescription> Already described Already described

<stateafter>2</stateafter> Already described Already described

<stateafterdescription>OCCUPIED</stateafterdescription> Already described Already described

<card>0009000000000000004D000000000CFDE639</card> Already described Already described

</event> / /

<event> Already described Already described

<eventid>5271030</eventid> Already described Already described

<dt>2010-07-26T11:50:48</dt> Already described Already described

<code>288</code> Already described Already described

<codedescription>UNLOCKING OK</codedescription> Already described Already described

<mode>3</mode> Already described Already described

<modedescription>USER KEY</modedescription> Already described Already described

<statebefore>2</statebefore> Already described Already described

<statebeforedescription>OCCUPIED</statebeforedescription> Already described Already described

<stateafter>0</stateafter> Already described Already described

XML packages – Locker Info XMLlriU5.doc

Page 5

<stateafterdescription>VACANT</stateafterdescription> Already described Already described

<card>0009000000000000004D000000000CFDE639</card> Already described Already described

</event> / /

</events> / /

</locker> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Locker Info XMLlriU5.doc

Page 6

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Lockers Info XMLlsiU5.doc

Page 1

“Lockers Info” XML package

Revision:

Date Comment

26.07.2010 Creation of document

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Lockers Info XMLlsiU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to obtain information (in the respective result

package) about several lockers status parameters from Metra ELS system.

Locations are used in locker systems where several lockers exist with the same locker

number. Therefore they are assigned to different locations to enable unique treatment of each.

The package is sent to Metra interface server through the Metra TCP/IP interface.

Information is returned from Metra interface server in the result package.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

87 - ERROR_INVALID_PARAMETER – If parameters are not in the right format

(e.g. invalid date format), or if some are missing

5 - ERROR_ACCESS_DENIED – If the sender is not allowed to communicate

through the Metra LCC NET interface; defined in Metra SW

0 - ERROR_SUCCESS – Operation succeeded

For this XML package the result gives the result code and additional locker parameters

depending on the parameters given in the Lockers Info package.

1.1 Communication

In order to map a result XML package from the Metra Interface service to a request XML

package from 3rd

party SW it is recommended to implement <userdata\> tag.

If used, userdata can contain a Varchar (36) value.

The Metra interface service will echo the userdata string from the request XML package in

the respective Result package. This allows for unique identification of a Result in multi thread

scenarios.

Usage of this is highly recommended in integrations where certain procedures are not user

dependant (e.g. cashier issues a ticket), but are executed using e.g. batch procedures.

XML packages – Lockers Info XMLlsiU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>LockersInfo</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<location>1</location> Location ID (1-9999) of lockers integer If none is given result will contain lockers from all locations

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (30) Result of this XML package includes same userdata if sent here

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

<lockers> Lockers /

<locker> Locker /

<location>5</location> Location ID (1-9999) of locker integer

<locker>1</locker> Locker number integer

<state>0</state> State ID Integer

<statedescription>VACANT</statedescription> State Description Varchar (30) In English only

</locker> / /

<locker> Already described Already described

<location>5</location> Already described Already described

XML packages – Lockers Info XMLlsiU5.doc

Page 4

<locker>2</locker> Already described Already described

<state>0</state> Already described Already described

<statedescription>VACANT</statedescription> Already described Already described

</locker> / /

<locker> Already described Already described

<location>5</location> Already described Already described

<locker>3</locker> Already described Already described

<state>0</state> Already described Already described

<statedescription>VACANT</statedescription> Already described Already described

</locker> / /

</lockers> / /

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Lockers Info XMLlsiU5.doc

Page 5

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – Unlock XMLunlU5.doc

Page 1

“Unlock” XML package

Revision:

Date Comment

07.02.2008 Creation of document

15.09.2010 Revision

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – Unlock XMLunlU5.doc

Page 2

1 General This XML package is sent by 3

rd party SW to unlock a particular locker in Metra ELS or ELS

NET system.

In Metra ELS NET system driven by 3rd

party SW through Metra ELS Locker reservation

interface the parameter “Location” is not supported by the ELS NET reservation interface and

therefore omitted in this XML package! In Metra ELS NET installations location is

supported.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

ERROR_INVALID_PARAMETER – If parameters are not in the right format (e.g.

invalid date format), or if some are missing

ERROR_ACCESS_DENIED – If the sender is not allowed to communicate through

the Metra LCC NET interface; defined in Metra SW

ERROR_INVALID_FUNCTION – If card is on the black list or certain operation is

not allowed

ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – Unlock XMLunlU5.doc

Page 3

2 Example XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Unlock</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<locker>555</locker> Locker number from 1 to 9999

<location>1</location> Locker location Integer Used when lockers with same numbers exist in the system

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – Unlock XMLunlU5.doc

Page 4

3 Appendix An XML file is attached to the document which is same as the example XML package.

XML packages – White List XMLwliU5.doc

Page 1 14.12.2012

“White List” XML package

Revision:

Date Comment

07.08.2008 Creation of document

14.12.2012 Added removeall

© Copyright 2007

All rights reserved.

No part of this document may be reproduced in any form or by any means without prior

written permission of Metra inženiring d.o.o.

The contents of this manual are subject to change without notice.

All efforts have been made to ensure the accuracy of the contents of this document at the

time of going to press. However, should any errors be detected, METRA would greatly

appreciate being informed of them.

METRA can assume no responsibility for any errors in this manual.

XML packages – White List XMLwliU5.doc

Page 2 14.12.2012

1 General This XML package is sent by 3

rd party SW to add/remove card/wristband to/from the White

list; applies to ELS, ELS NET and LCC NET systems.

Media on the white list is valid to be used on Metra ELS lockers and in general in the above

mentioned systems.

Packages are sent as strings through the Metra TCP/IP interface.

Sent cardnumber is obtained from 3rd

party SW; it must be sent in Metra format. See

document Metra_ELS_SN_Encoding.pdf.

Result Codes returned by the interface: http://msdn2.microsoft.com/en-us/library/ms681381.aspx

Codes used in Metra interface are:

ERROR_INVALID_PARAMETER – If parameters are not in the right format (e.g.

invalid date format), or if some are missing

ERROR_ACCESS_DENIED – If the sender is not allowed to communicate through

the Metra LCC NET interface; defined in Metra SW

ERROR_INVALID_FUNCTION – If card is on the black list or certain operation is

not allowed

ERROR_SUCCESS – Operation succeeded

For this XML package the result is generic, giving only the result code without any additional

parameters.

XML packages – White List XMLwliU5.doc

Page 3 14.12.2012

2 Examples

2.1 Add to white list

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>WhiteList</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>00090000000000000056E0070000187EB223</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<whitelist>add</whitelist> add parameter / Card will be added to white list

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – White List XMLwliU5.doc

Page 4 14.12.2012

2.2 Remove from white list

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>WhiteList</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<card>00090000000000000056E0070000187EB223</card> Unique Cardnumber in Metra format Varchar (36) Confirm with Metra for different types of media

<whitelist>remove</whitelist> remove parameter / Card will be removed from white list

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – White List XMLwliU5.doc

Page 5 14.12.2012

2.3 Remove all from white list

XML package Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>WhiteList</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<whitelist>removeall</whitelist> remove all parameter / All cards will be removed from white list

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Result of this XML package includes same userdata

</package> / /

Result Comment Type Comment #2

<?xml version="1.0" encoding="utf-8" standalone="yes"?> / /

<package> / /

<header> / /

<name>Result</name> Package name /

<version>1.0</version> Version /

</header> / /

<parameters> Parameters /

<result>0</result> Result code Integer

</parameters> / /

<userdata>xyz</userdata> Userdata Varchar (36) Same userdata as sent with XML package

</package> / /

XML packages – White List XMLwliU5.doc

Page 6 14.12.2012

3 Appendix An XML file is attached to the document which is same as the example XML package.

THIRD-PARTY XML INTEGRATION MANUAL

PO Box 531, Moonee Ponds, Victoria, Australia 3039 www.metraaus.com.au 1300 METRA AUS

FORMAT MEDIA SN ENCODING 1.8

R&D

Media Encoding rules for

when used in Metra LCC & ELS systems

OB03_01 rev. 0

Page 1

Project:

Metra ELS & LCC Systems

Document revision:

1.8

Date:

1. July 2012

Document Name:

Metra Format Media SN Encoding.doc

Brief description:

This document describes Encoding of the unique serial number for different media (RFID tickets, barcodes) used in Metra LCC & ELS systems. It is intended as Encoding reference for programmers interfacing third party software (that reads RFID serial number by its own readers) to Metra LCC and ELS systems.

Page 2

REVISION HISTORY:

VERSION

DATE

AUTHOR

CHANGES

1.0 12.02.08. T. Rugelj First version of the document. Describes MIFARE.

1.1 08.04.08. T. Rugelj Paragraph 2.3 added.

1.2 10.05.08. L. Arnšek Technogym Paragraph added.

1.3 30.05.08. T. Rugelj ISO 15693 Paragraph added.

1.4 03.02.09. T. Rugelj Corrections.

1.5 19.02.09. T. Rugelj LF Multitag added. Few corrections in text

1.6 30.11.11 T. Rugelj PIN added

1.7 05.03.12 T. Rugelj Legic added

1.8 01.07.12 L. Arnšek Barcode added

Page 3

INDEX

1. FOREWORD ...................................................................................................... 4

2. MIFARE ENCODING RULES ............................................................................. 5

2.1 MIFARE CLASSIC (S50 AND S70) ........................................................................ 5 2.2 MIFARE ULTRALIGHT .......................................................................................... 5 2.3 DIFFERENT MIFARE READERS FORMAT ................................................................ 5

3. TECHNOGYM ENCODING RULES ................................................................... 6

3.1 EXAMPLE ........................................................................................................... 6

4. ISO-15693 ENCODING RULES ......................................................................... 7

4.1 8-BYTE SERIAL NUMBER (I-CODE, TAG-IT) ......................................................... 7 4.2 FUTURE EXTENSIONS FOR MORE THAN 8-BYTE SERIAL NUMBER ............................ 7

5. LOW FREQUENCY (125 KHZ) MULTITAG ENCODING RULES ...................... 8

6. PIN CODE ENCODING RULES ......................................................................... 9

7. LEGIC ENCODING RULES.............................................................................. 10

7.1 4 - BYTE SERIAL NUMBER (LEGIC PRIME, LEGIC ADVANT ATC2048) ............... 10 7.2 8 - BYTE SERIAL NUMBER (LEGIC ADVANT ATC256) ........................................ 10 7.3 FUTURE EXTENSIONS FOR MORE THAN 8-BYTE SERIAL NUMBER .......................... 10

8. BARCODE ENCODING RULES ...................................................................... 11

8.1 CODING UP TO 14 BYTES LENGTH ...................................................................... 11 8.1.1 RECOGNISED FORMATS – HEX ....................................................................... 11 8.1.2 ASCII CODING ............................................................................................... 13

Page 4

1. FOREWORD When third party software needs to be interfaced to the Metra LCC or ELS systems the common point is the Media (RFID Ticket or Barcode) unique Serial Number. RFID: Third party software operates its own RFID Readers which must be capable of reading the RFID Unique Serial Number. The number must be then transformed to Metra format that is accepted by Metra software Interfaces. Barcode: Third party SW can generate 1D or 2D barcodes on its own. Depending on the type (DEC, HEX or ASCII) and length different transformation rules to Metra format apply. Metra formatted Ticket Unique Serial number is always 18 bytes long.

Page 5

2. MIFARE ENCODING RULES Mifare RFID cards have either 4-byte or 7-byte serial number. Encoding rules for Metra ELS are as follows.

2.1 Mifare Classic (S50 and S70) Mifare Classic:

Mifare 1K / Mifare S50

Mifare 4K / Mifare S70 Have 4-byte unique Serial Number

Metra Prefix (14 bytes fixed value)

Mifare Unique Serial Number (4-bytes)

00 09 00 00 00 00 00 00 00 4D 00 00 00 00 SN SN SN SN

2.2 Mifare Ultralight Unique Serial Number which is 7 bytes long have the following Mifare RFID Tags:

Mifare Ultralight

Mifare Desfire

Future Mifare Plus

Metra Prefix (11 bytes fixed value)

Mifare Unique Serial Number (7-bytes)

00 09 00 00 00 00 00 00 00 00 00 SN SN SN SN SN SN SN

2.3 Different Mifare Readers format Some Mifare readers presents Mifare Unique Serial Number in different formats (half byte or byte order differs). Metra offers customers possibility to analyse their existing Mifare Tag and suggest how to compose Metra ELS Serial Number format from serial number read with existing 3

rd party

reader. Customer should:

Send one sample Mifare Tag to Metra

Give Metra information what is the interpretation of media Unique Serial Number read from existing 3

rd party Mifare Reader.

Page 6

3. TECHNOGYM ENCODING RULES TechnoGym RFID keys have a 4-byte Club Code and a 3-byte Customer Code. Encoding rules for Metra ELS are as follows:

Metra Prefix (11 bytes fixed value)

TechnoGym Club Code (4-bytes)

TechnoGym Customer Code (3-bytes)

00 02 00 00 00 00 00 00 00 00 00 SN SN SN SN SN SN SN

3.1 Example Club Code: 11ABDCEF

Customer Code: 110202

TechnoGym key in Metra format 000200000000000000000011ABCDEF110202

Page 7

4. ISO-15693 ENCODING RULES

4.1 8-byte serial number (I-CODE, TAG-it)

Metra Prefix (10 bytes fixed value)

ISO15693 Unique Serial Number (8-bytes)

00 09 00 00 00 00 00 00 00 56 SN SN SN SN SN SN SN SN

4.2 Future extensions for more than 8-byte serial number

Metra Prefix (2 bytes fixed value)

Leading zeroes and RFID Unique Serial Number (16 bytes in total)

00 09 00 00 ........ SN SN SN SN SN SN SN SN SN

Page 8

5. Low Frequency (125 kHz) Multitag ENCODING RULES

Metra Prefix (9 bytes fixed value)

TAG Type prefix (1 byte)

TAG Unique Serial Number (8-bytes)

00 0B 00 00 00 00 00 00 00 00 – EM Marin 4102 01 – Hitag 1 or Hitag S 02 – Hitag 2 03 – EM Marin 4450

SN SN SN SN SN SN SN SN If serial number is less than 8 bytes upper bytes are fixed to 00!

Page 9

6. PIN code ENCODING RULES PIN code maximum length is 12 digits coded in ASCII. Leading characters are all 0x00. PIN length is seen from number of non 0x00 characters. PIN can have leading zeroes itself coded in ASCII as 0x30. EXAMPLES: PIN = “12345” (length 5)

Metra Prefix (2 bytes fixed value)

Leading Zeroes (4 bytes)

PIN (12 bytes)

0x 00 01 0x 00 00 00 00 0x 00 00 00 00 00 00 00 31 32 33 34 35

PIN = “001230” (length 6)

Metra Prefix (2 bytes fixed value)

Leading Zeroes (4 bytes)

PIN (12 bytes)

0x 00 01 0x 00 00 00 00 0x 00 00 00 00 00 00 30 30 31 32 33 30

Page 10

7. LEGIC ENCODING RULES

7.1 4 - byte serial number (Legic PRIME, Legic ADVANT ATC2048)

Metra Prefix (14 bytes fixed value)

Legic Unique Serial Number (4 - bytes)

00 08 00 00 00 00 00 00 00 00 00 00 00 00 SN SN SN SN

7.2 8 - byte serial number (Legic ADVANT ATC256)

Metra Prefix (10 bytes fixed value)

Legic Unique Serial Number (8 - bytes)

00 08 00 00 00 00 00 00 00 00 SN SN SN SN SN SN SN SN

7.3 Future extensions for more than 8-byte serial number

Metra Prefix (2 bytes fixed value)

Leading zeroes and RFID Unique Serial Number (16 bytes in total)

00 09 00 00 ........ SN SN SN SN SN SN SN SN SN

Page 11

8. BARCODE ENCODING RULES Third party SW can generate 1D or 2D barcodes on its own. Depending on the type (HEX or ASCII) and length different transformation rules to Metra format apply. Metra devices currently support 2D barcode readers, hence the prefix value 00 11 (3

rd & 4

th

byte).

8.1 Coding up to 14 bytes length

8.1.1 Recognised formats – HEX Barcodes recognised as purely HEX values (same goes for DEC) are coded by the following rules. This applies if the whole barcode in recognised as purely HEX! Barcode maximum length is 14 bytes. Leading characters are all 0x00. E.g. signs “1” and “b” are joined in one byte as “0x1B”. This way the max length of a HEX barcode is 28 characters (14 bytes).

Metra Prefix (4 bytes fixed value)

Leading zeroes and Barcode Serial Number (14 bytes in total)

00 09 00 11 00 00 ........ SN SN SN SN SN SN SN SN SN

Page 12

Examples

No. Value Length Comment Barcode Metra format 2D reader

1 1234567890123456789012345678 28 Max DEC only

1D CODE128

000900111234567890123456789012345678

2 1234567890123456789012345678 28 Max DEC only

2D PDF417

000900111234567890123456789012345678

3 1234567890123456789012345678 28 Max DEC only

2D QR

000900111234567890123456789012345678

4 0123456789ABCDEF0123456789AB 28 Max HEX Only

1D CODE128

000900110123456789ABCDEF0123456789AB

5 0123456789ABCDEF0123456789AB 28 Max HEX Only

2D PDF417

000900110123456789ABCDEF0123456789AB

6 0123456789ABCDEF0123456789AB 28 Max HEX Only

2D QR

000900110123456789ABCDEF0123456789AB

Page 13

8.1.2 ASCII coding Barcodes not recognised as purely HEX or DEC are coded as ASCII characters by the following rues. Barcode maximum length is 14 bytes coded in ASCII. Leading characters are all 0x00.

Metra Prefix (4 bytes fixed value)

Leading zeroes and Barcode Serial Number (14 bytes in total)

00 09 00 11 00 00 ........ SN SN SN SN SN SN SN SN SN

Page 14

Examples

No. Value Length Comment Barcode Metra format 2D reader

1 12345METRAABCD 14 Max ASCII

1D CODE128

0009001131323334354D4554524141424344

2 12345METRAABCD 14 Max ASCII

2D PDF417

0009001131323334354D4554524141424344

3 12345METRAABCD 14 Max ASCII

2D QR

0009001131323334354D4554524141424344