Raritan / Server Technology Xerus™ PDU JSON-RPC API: CardReader.idl Source File

Raritan / Server Technology Xerus™ PDU JSON-RPC API

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 */
12 module 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 */
68 MetaData getMetaData();
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 */
78 int getCardInformation(out CardInformation cardInfo);
79
80 };
81
82 }
83
84 #endif /* __SMARTCARD_CARD_READER_IDL__ */
smartcard::CardReader
Card Reader Interface.
Definition: CardReader.idl:15
smartcard::CardReader::getMetaData
MetaData getMetaData()
Retrieve reader metadata.
smartcard::CardReader::getCardInformation
int getCardInformation(out CardInformation cardInfo)
Retrieve card information from reader.
idl
Basic IDL definitions.
Definition: Event.idl:10
smartcard
Card Reader.
Definition: CardReader.idl:12
idl::Event
Common base for all events.
Definition: Event.idl:13
smartcard::CardReader::CardEvent
Card base event.
Definition: CardReader.idl:47
smartcard::CardReader::CardEvent::metaData
MetaData metaData
MetaData of this card reader.
Definition: CardReader.idl:48
smartcard::CardReader::CardInformation
Card Information.
Definition: CardReader.idl:39
smartcard::CardReader::CardInformation::type
string type
card type
Definition: CardReader.idl:40
smartcard::CardReader::CardInformation::uid
string uid
card id
Definition: CardReader.idl:41
smartcard::CardReader::CardInsertedEvent
Card inserted event.
Definition: CardReader.idl:56
smartcard::CardReader::CardRemovedEvent
Card removed event.
Definition: CardReader.idl:61
smartcard::CardReader::MetaData
Reader Metadata.
Definition: CardReader.idl:24
smartcard::CardReader::MetaData::manufacturer
string manufacturer
manufacturer
Definition: CardReader.idl:26
smartcard::CardReader::MetaData::channel
int channel
one device (S/N) can provide multiple readers
Definition: CardReader.idl:29
smartcard::CardReader::MetaData::product
string product
product
Definition: CardReader.idl:27
smartcard::CardReader::MetaData::position
string position
Position of the card reader.
Definition: CardReader.idl:30
smartcard::CardReader::MetaData::serialNumber
string serialNumber
serial number (S/N)
Definition: CardReader.idl:28
smartcard::CardReader::MetaData::id
string id
Card reader ID used in events and traps.
Definition: CardReader.idl:25