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

Loading...
Searching...
No Matches
OutletGroupManager.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2018 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_OUTLETGROUPMANAGER_IDL__
7#define __PDUMODEL_OUTLETGROUPMANAGER_IDL__
8
9#include <Outlet.idl>
10#include <OutletGroup.idl>
11
12module pdumodel {
13
14 /** Outlet group manager interface */
15 interface OutletGroupManager {
16 constant int ERR_INVALID_ARGUMENT = 1;
17 constant int ERR_NO_SUCH_ID = 2;
18 constant int ERR_MAX_GROUP_COUNT_REACHED = 3;
19
20 /** Event: A new outlet group has been created */
21 valueobject GroupCreatedEvent extends event.UserEvent {
22 int id; ///< The ID under which the outlet group manager
23 ///< references this group; may be reused after
24 ///< a group is deleted.
25 int uniqueId; ///< Random ID uniquely identifying the new group
26 OutletGroup group; ///< The new group
27 OutletGroup.Settings settings; ///< The new group's settings
28 };
29
30 /** Event: An outlet group has been deleted */
31 valueobject GroupDeletedEvent extends event.UserEvent {
32 int id; ///< The ID under which the outlet group manager
33 ///< referenced the group
34 int uniqueId; ///< Random unique ID of the deleted group
35 OutletGroup.Settings settings; ///< Last group settings before deletion
36 };
37
38 /**
39 * Create a new outlet group.
40 *
41 * @param name New group name
42 * @param members List of member outlets
43 * @param group Result: Reference to newly created group; null in case of error
44 *
45 * @return 0 if OK
46 * @return 1 if any parameters are invalid
47 * @return 3 if the maximum number of groups has been reached
48 */
49 int createGroup(in string name, in vector<Outlet> members, out OutletGroup group);
50
51 /**
52 * Retrieve the list of outlet groups.
53 *
54 * @return Map of outlet groups, indexed by group ID
55 */
56 map<int, OutletGroup> getAllGroups();
57
58 /**
59 * Retrieve a specific outlet group.
60 *
61 * @param id The ID of the requested group
62 * @param group Result: requested outlet group; null if not found
63 *
64 * @return 0 if OK
65 * @return 2 if no group with the given ID exists
66 */
67 int getGroup(in int id, out OutletGroup group);
68
69 /**
70 * Delete an outlet group.
71 *
72 * @param id The ID of the group to delete
73 *
74 * @return 0 if OK
75 * @return 2 if no group with the given ID exists
76 */
77 int deleteGroup(in int id);
78 };
79}
80
81#endif
pdumodel::OutletGroupManager
Outlet group manager interface.
Definition OutletGroupManager.idl:15
pdumodel::OutletGroupManager::deleteGroup
int deleteGroup(in int id)
Delete an outlet group.
pdumodel::OutletGroupManager::getAllGroups
map< int, OutletGroup > getAllGroups()
Retrieve the list of outlet groups.
pdumodel::OutletGroupManager::createGroup
int createGroup(in string name, in vector< Outlet > members, out OutletGroup group)
Create a new outlet group.
pdumodel::OutletGroupManager::getGroup
int getGroup(in int id, out OutletGroup group)
Retrieve a specific outlet group.
pdumodel::OutletGroup
Outlet group interface.
Definition OutletGroup.idl:15
pdumodel
PDU Model.
Definition Ade.idl:12
pdumodel::OutletGroupManager::GroupCreatedEvent
Event: A new outlet group has been created.
Definition OutletGroupManager.idl:21
pdumodel::OutletGroupManager::GroupCreatedEvent::uniqueId
int uniqueId
Random ID uniquely identifying the new group.
Definition OutletGroupManager.idl:25
pdumodel::OutletGroupManager::GroupCreatedEvent::id
int id
The ID under which the outlet group manager references this group; may be reused after a group is del...
Definition OutletGroupManager.idl:22
pdumodel::OutletGroupManager::GroupCreatedEvent::settings
OutletGroup::Settings settings
The new group's settings.
Definition OutletGroupManager.idl:27
pdumodel::OutletGroupManager::GroupCreatedEvent::group
OutletGroup group
The new group.
Definition OutletGroupManager.idl:26
pdumodel::OutletGroupManager::GroupDeletedEvent
Event: An outlet group has been deleted.
Definition OutletGroupManager.idl:31
pdumodel::OutletGroupManager::GroupDeletedEvent::uniqueId
int uniqueId
Random unique ID of the deleted group.
Definition OutletGroupManager.idl:34
pdumodel::OutletGroupManager::GroupDeletedEvent::id
int id
The ID under which the outlet group manager referenced the group.
Definition OutletGroupManager.idl:32
pdumodel::OutletGroupManager::GroupDeletedEvent::settings
OutletGroup::Settings settings
Last group settings before deletion.
Definition OutletGroupManager.idl:35
pdumodel::OutletGroup::Settings
Outlet group settings.
Definition OutletGroup.idl:27