Raritan PX2/PX3 JSON-RPC API: pdu-json-rpc-api/idl/CardReader.idl Source File

Raritan PX2/PX3 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_1_0_2 {
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 };
31
32 /**
33 * Card Information
34 */
35 structure CardInformation {
36 string type; ///< card type
37 string uid; ///< card id
38 };
39
40 /**
41 * Card base event
42 */
43 valueobject CardEvent extends idl.Event {
44 CardInformation cardInfo; ///< card info of affected card
45 };
46
47 /**
48 * Card inserted event
49 */
50 valueobject CardInsertedEvent extends CardEvent {};
51
52 /**
53 * Card removed event
54 */
55 valueobject CardRemovedEvent extends CardEvent {};
56
57 /**
58 * Retrieve reader metadata.
59 *
60 * @return metadata
61 */
62 MetaData getMetaData();
63
64 /**
65 * Retrieve card information from reader.
66 *
67 * @param cardInfo Card Information
68 *
69 * @return NO_ERROR if OK
70 * @return ERR_SLOT_EMPTY if reader sees no card
71 */
72 int getCardInformation(out CardInformation cardInfo);
73
74 };
75
76 }
77
78 #endif /* __SMARTCARD_CARD_READER_IDL__ */
smartcard::CardReader_1_0_2::MetaData::product
string product
product
Definition: CardReader.idl:27
smartcard::CardReader_1_0_2::MetaData::id
string id
Card reader ID used in events and traps.
Definition: CardReader.idl:25
smartcard::CardReader_1_0_2::MetaData::manufacturer
string manufacturer
manufacturer
Definition: CardReader.idl:26
smartcard::CardReader_1_0_2::CardInformation::uid
string uid
card id
Definition: CardReader.idl:37
smartcard::CardReader_1_0_2
Card Reader Interface.
Definition: CardReader.idl:15
idl
Basic IDL definitions.
Definition: Event.idl:10
smartcard::CardReader_1_0_2::MetaData
Reader Metadata.
Definition: CardReader.idl:24
smartcard
Card Reader.
Definition: CardReader.idl:12
smartcard::CardReader_1_0_2::CardInformation
Card Information.
Definition: CardReader.idl:35
smartcard::CardReader_1_0_2::CardInformation::type
string type
card type
Definition: CardReader.idl:36
smartcard::CardReader_1_0_2::MetaData::serialNumber
string serialNumber
serial number (S/N)
Definition: CardReader.idl:28
smartcard::CardReader_1_0_2::MetaData::channel
int channel
one device (S/N) can provide multiple readers
Definition: CardReader.idl:29