Legrand / Raritan / Server Technology Xerus™ JSON-RPC API: KeypadManager.idl Source File

Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
KeypadManager.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2020 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __SMARTLOCK_KEYPAD_MANAGER_IDL__
7#define __SMARTLOCK_KEYPAD_MANAGER_IDL__
8
9#include <Keypad.idl>
10#include <Event.idl>
11#include <UserEvent.idl>
12
13/** Keypad Manager */
14module smartlock {
15
16 /** Keypad Manager Interface */
17 interface KeypadManager {
18
19 /*
20 * Keypad setting
21 */
22 structure KeypadSettings {
23 string name; ///< User-defined name
24 string description; ///< User-defined description
25 };
26
27 /**
28 * Keypad base event
29 */
30 valueobject KeypadEvent extends idl.Event {
31 Keypad keypad; ///< Affected keypad
32 Keypad.MetaData metaData; ///< MetaData of affected keypad
33 };
34
35 /**
36 * Keypad attached event
37 */
38 valueobject KeypadAttachedEvent extends KeypadEvent {};
39
40 /**
41 * Keypad detached event
42 */
43 valueobject KeypadDetachedEvent extends KeypadEvent {};
44
45 /*
46 * Event: A keypad's settings have been changed
47 */
48 valueobject KeypadSettingsChangedEvent extends event.UserEvent {
49 Keypad keypad; ///< affected keypad
50 KeypadSettings oldSettings; ///< Settings before change
51 KeypadSettings newSettings; ///< Settings after change
52 string position; ///< Position of the keypad (see Keypad.MetaData)
53 };
54
55 /**
56 * Retrieve the list of connected keypads.
57 *
58 * @return Keypads list
59 */
60 vector<Keypad> getKeypads();
61
62 /**
63 * Get keypad for a specific id.
64 *
65 * @param keypadId keypad id
66 *
67 * @return Keypad with given id or null
68 */
69 Keypad getKeypadById(in string keypadId);
70
71 /**
72 * Set settings for a keypad.
73 *
74 * @param position position of keypad (see Keypad.MetaData)
75 * @param settings new settings for keypad
76 *
77 * @return NO_ERROR if OK
78 * @return ERR_INVALID_PARAMS if any setting is invalid
79 */
80 int setKeypadSettings(in string position, in KeypadSettings setting);
81
82 /**
83 * Get settings for all keypads.
84 *
85 * @return Map of settings by keypad position (see Keypad.MetaData)
86 */
87 map<string, KeypadSettings> getAllKeypadSettings();
88 };
89
90}
91
92#endif /* __SMARTLOCK_KEYPAD_MANAGER_IDL__ */
smartlock::KeypadManager
Keypad Manager Interface.
Definition KeypadManager.idl:17
smartlock::KeypadManager::setKeypadSettings
int setKeypadSettings(in string position, in KeypadSettings setting)
Set settings for a keypad.
smartlock::KeypadManager::getKeypads
vector< Keypad > getKeypads()
Retrieve the list of connected keypads.
smartlock::KeypadManager::getKeypadById
Keypad getKeypadById(in string keypadId)
Get keypad for a specific id.
smartlock::KeypadManager::getAllKeypadSettings
map< string, KeypadSettings > getAllKeypadSettings()
Get settings for all keypads.
smartlock::Keypad
Keypad Interface.
Definition Keypad.idl:15
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::KeypadManager::KeypadAttachedEvent
Keypad attached event.
Definition KeypadManager.idl:38
smartlock::KeypadManager::KeypadDetachedEvent
Keypad detached event.
Definition KeypadManager.idl:43
smartlock::KeypadManager::KeypadEvent
Keypad base event.
Definition KeypadManager.idl:30
smartlock::KeypadManager::KeypadEvent::metaData
Keypad::MetaData metaData
MetaData of affected keypad.
Definition KeypadManager.idl:32
smartlock::KeypadManager::KeypadEvent::keypad
Keypad keypad
Affected keypad.
Definition KeypadManager.idl:31
smartlock::KeypadManager::KeypadSettingsChangedEvent
Definition KeypadManager.idl:48
smartlock::KeypadManager::KeypadSettingsChangedEvent::oldSettings
KeypadSettings oldSettings
Settings before change.
Definition KeypadManager.idl:50
smartlock::KeypadManager::KeypadSettingsChangedEvent::newSettings
KeypadSettings newSettings
Settings after change.
Definition KeypadManager.idl:51
smartlock::KeypadManager::KeypadSettingsChangedEvent::keypad
Keypad keypad
affected keypad
Definition KeypadManager.idl:49
smartlock::KeypadManager::KeypadSettingsChangedEvent::position
string position
Position of the keypad (see Keypad::MetaData)
Definition KeypadManager.idl:52
smartlock::KeypadManager::KeypadSettings
Definition KeypadManager.idl:22
smartlock::KeypadManager::KeypadSettings::name
string name
User-defined name.
Definition KeypadManager.idl:23
smartlock::KeypadManager::KeypadSettings::description
string description
User-defined description.
Definition KeypadManager.idl:24
smartlock::Keypad::MetaData
Keypad Metadata.
Definition Keypad.idl:24