Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
CardReader.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2013 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __SMARTCARD_CARD_READER_IDL__
7#define __SMARTCARD_CARD_READER_IDL__
8
9#include <Event.idl>
10
11/** Card Reader */
12module smartcard {
13
14 /** Card Reader Interface */
15 interface CardReader {
16
17 /** Error codes */
18 constant int NO_ERROR = 0; ///< operation successful, no error
19 constant int ERR_SLOT_EMPTY = 1; ///< no card present in reader
20
21 /**
22 * Reader Metadata
23 */
24 structure MetaData {
25 string id; ///< Card reader ID used in events and traps
26 string manufacturer; ///< manufacturer
27 string product; ///< product
28 string serialNumber; ///< serial number (S/N)
29 int channel; ///< one device (S/N) can provide multiple readers
30 string position; ///< Position of the card reader.
31 ///< Contains either the position in the 1-wire topology and the
32 ///< channel (e.g. D1:H1:C1-1) or, for usb card readers, a string like
33 ///< usb:<n> where n is a number increasing with usb card readers.
34 };
35
36 /**
37 * Card Information
38 */
39 structure CardInformation {
40 string type; ///< card type
41 string uid; ///< card id
42 };
43
44 /**
45 * Card base event
46 */
47 valueobject CardEvent extends idl.Event {
48 MetaData metaData; ///< MetaData of this card reader
49 };
50
51 /**
52 * Card inserted event
53 *
54 * Fetch Card ID by calling getCardInformation() on this card reader
55 */
56 valueobject CardInsertedEvent extends CardEvent {};
57
58 /**
59 * Card removed event
60 */
61 valueobject CardRemovedEvent extends CardEvent {};
62
63 /**
64 * Retrieve reader metadata.
65 *
66 * @return metadata
67 */
69
70 /**
71 * Retrieve card information from reader.
72 *
73 * @param cardInfo Card Information
74 *
75 * @return NO_ERROR if OK
76 * @return ERR_SLOT_EMPTY if reader sees no card
77 */
79
80 };
81
82}
83
84#endif /* __SMARTCARD_CARD_READER_IDL__ */
Card Reader Interface.
Definition: CardReader.idl:15
MetaData getMetaData()
Retrieve reader metadata.
int getCardInformation(out CardInformation cardInfo)
Retrieve card information from reader.
Basic IDL definitions.
Definition: Event.idl:10
Card Reader.
Definition: CardReader.idl:12
Common base for all events.
Definition: Event.idl:13
MetaData metaData
MetaData of this card reader.
Definition: CardReader.idl:48
string manufacturer
manufacturer
Definition: CardReader.idl:26
int channel
one device (S/N) can provide multiple readers
Definition: CardReader.idl:29
string position
Position of the card reader.
Definition: CardReader.idl:30
string serialNumber
serial number (S/N)
Definition: CardReader.idl:28
string id
Card reader ID used in events and traps.
Definition: CardReader.idl:25