Loading...
Searching...
No Matches
CardReader.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2013 Raritan Inc. All rights reserved.
*/
#ifndef __SMARTCARD_CARD_READER_IDL__
#define __SMARTCARD_CARD_READER_IDL__
#include <Event.idl>
/** Card Reader */
module smartcard {
/** Card Reader Interface */
interface CardReader {
/** Error codes */
constant int NO_ERROR = 0; ///< operation successful, no error
constant int ERR_SLOT_EMPTY = 1; ///< no card present in reader
/**
* Reader Metadata
*/
structure MetaData {
string id; ///< Card reader ID used in events and traps
string manufacturer; ///< manufacturer
string product; ///< product
string serialNumber; ///< serial number (S/N)
int channel; ///< one device (S/N) can provide multiple readers
string position; ///< Position of the card reader.
///< Contains either the position in the 1-wire topology and the
///< channel (e.g. D1:H1:C1-1) or, for usb card readers, a string like
///< usb:<n> where n is a number increasing with usb card readers.
};
/**
* Card Information
*/
structure CardInformation {
string type; ///< card type
string uid; ///< card id
};
/**
* Card base event
*/
valueobject CardEvent extends idl.Event {
MetaData metaData; ///< MetaData of this card reader
};
/**
* Card inserted event
*
* Fetch Card ID by calling getCardInformation() on this card reader
*/
valueobject CardInsertedEvent extends CardEvent {};
/**
* Card removed event
*/
valueobject CardRemovedEvent extends CardEvent {};
/**
* Retrieve reader metadata.
*
* @return metadata
*/
MetaData getMetaData();
/**
* Retrieve card information from reader.
*
* @param cardInfo Card Information
*
* @return NO_ERROR if OK
* @return ERR_SLOT_EMPTY if reader sees no card
*/
int getCardInformation(out CardInformation cardInfo);
};
}
#endif /* __SMARTCARD_CARD_READER_IDL__ */
smartcard::CardReader
Card Reader Interface.
Definition CardReader.idl:15
smartcard::CardReader::ERR_SLOT_EMPTY
constant int ERR_SLOT_EMPTY
no card present in reader
Definition CardReader.idl:19
smartcard::CardReader::getMetaData
MetaData getMetaData()
Retrieve reader metadata.
smartcard::CardReader::NO_ERROR
constant int NO_ERROR
Error codes.
Definition CardReader.idl:18
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