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