Loading...
Searching...
No Matches
Keypad.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2020 Raritan Inc. All rights reserved.
*/
#ifndef __SMARTLOCK_KEYPAD_IDL__
#define __SMARTLOCK_KEYPAD_IDL__
#include <Event.idl>
/** Keypad */
module smartlock {
/** Keypad Interface */
interface Keypad {
/** Error codes */
constant int NO_ERROR = 0; ///< operation successful, no error
constant int ERR_SLOT_EMPTY = 1; ///< no PIN present in keypad
/**
* Keypad Metadata
*/
structure MetaData {
string id; ///< Keypad 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 keypads
string position; ///< Position of the keypad.
///< A string, representing the position in the 1-wire topology
///< and the channel of the keypad (e.g. D1:H1:C1-1)
};
/**
* PIN entered event
*
* A PIN was entered on this Keypad, retrieve it by using getPIN().
*/
valueobject PINEnteredEvent extends idl.Event {
MetaData metaData; ///< MetaData of this keypad
};
/**
* Retrieve keypad metadata.
*
* @return metadata
*/
MetaData getMetaData();
/**
* Retrieve last entered PIN from keypad. PINs are cleared after 10
* seconds or subsituted whenever a new PIN was entered.
*
* @param pin PIN
*
* @return NO_ERROR if OK
* @return ERR_SLOT_EMPTY if keypad sees no PIN
*/
int getPIN(out string pin);
};
}
#endif /* __SMARTLOCK_KEYPAD_IDL__ */
smartlock::Keypad
Keypad Interface.
Definition Keypad.idl:15
smartlock::Keypad::getPIN
int getPIN(out string pin)
Retrieve last entered PIN from keypad.
smartlock::Keypad::NO_ERROR
constant int NO_ERROR
Error codes.
Definition Keypad.idl:18
smartlock::Keypad::getMetaData
MetaData getMetaData()
Retrieve keypad metadata.
smartlock::Keypad::ERR_SLOT_EMPTY
constant int ERR_SLOT_EMPTY
no PIN present in keypad
Definition Keypad.idl:19
idl
Basic IDL definitions.
Definition Event.idl:10
smartlock
Keypad.
Definition DoorAccessControl.idl:13
idl::Event
Common base for all events.
Definition Event.idl:13
smartlock::Keypad::MetaData
Keypad Metadata.
Definition Keypad.idl:24
smartlock::Keypad::MetaData::manufacturer
string manufacturer
manufacturer
Definition Keypad.idl:26
smartlock::Keypad::MetaData::position
string position
Position of the keypad.
Definition Keypad.idl:30
smartlock::Keypad::MetaData::id
string id
Keypad ID used in events and traps.
Definition Keypad.idl:25
smartlock::Keypad::MetaData::channel
int channel
one device (S/N) can provide multiple keypads
Definition Keypad.idl:29
smartlock::Keypad::MetaData::serialNumber
string serialNumber
serial number (S/N)
Definition Keypad.idl:28
smartlock::Keypad::MetaData::product
string product
product
Definition Keypad.idl:27
smartlock::Keypad::PINEnteredEvent
PIN entered event.
Definition Keypad.idl:40
smartlock::Keypad::PINEnteredEvent::metaData
MetaData metaData
MetaData of this keypad.
Definition Keypad.idl:41