Raritan PX2/PX3 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  };
28 
29  /**
30  * Keypad attached event
31  */
32  valueobject KeypadAttachedEvent extends KeypadEvent {};
33 
34  /**
35  * Keypad detached event
36  */
37  valueobject KeypadDetachedEvent extends KeypadEvent {};
38 
39  /*
40  * Event: A keypad's settings have been changed
41  */
42  valueobject KeypadSettingsChangedEvent extends event.UserEvent {
43  KeypadSettings oldSettings; ///< Settings before change
44  KeypadSettings newSettings; ///< Settings after change
45  string position; ///< Position of the keypad (see Keypad.MetaData)
46  };
47 
48  /**
49  * Retrieve the list of connected keypads.
50  *
51  * @return Keypads list
52  */
53  vector<Keypad> getKeypads();
54 
55  /**
56  * Get keypad for a specific id.
57  *
58  * @param keypadId keypad id
59  *
60  * @return Keypad with given id or null
61  */
62  Keypad getKeypadById(in string keypadId);
63 
64  /**
65  * Set settings for a keypad.
66  *
67  * @param position position of keypad (see Keypad.MetaData)
68  * @param settings new settings for keypad
69  *
70  * @return NO_ERROR if OK
71  * @return ERR_INVALID_PARAMS if any setting is invalid
72  */
73  int setKeypadSettings(in string position, in KeypadSettings setting);
74 
75  /**
76  * Get settings for all keypads.
77  *
78  * @return Map of settings by keypad position (see Keypad.MetaData)
79  */
80  map<string, KeypadSettings> getAllKeypadSettings();
81  };
82 
83 }
84 
85 #endif /* __SMARTLOCK_KEYPAD_MANAGER_IDL__ */
string position
Position of the keypad (see Keypad::MetaData)
Definition: KeypadManager.idl:45
string name
User-defined name.
Definition: KeypadManager.idl:18
Keypad Interface.
Definition: Keypad.idl:10
Basic IDL definitions.
Definition: Event.idl:10
KeypadSettings newSettings
Settings after change.
Definition: KeypadManager.idl:44
Keypad Manager Interface.
Definition: KeypadManager.idl:12
string description
User-defined description.
Definition: KeypadManager.idl:19
Definition: KeypadManager.idl:17
Keypad.
Definition: DoorAccessControl.idl:8