Loading...
Searching...
No Matches
OutletGroupManager.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2018 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_OUTLETGROUPMANAGER_IDL__
#define __PDUMODEL_OUTLETGROUPMANAGER_IDL__
#include <Outlet.idl>
#include <OutletGroup.idl>
module pdumodel {
/** Outlet group manager interface */
interface OutletGroupManager {
constant int ERR_INVALID_ARGUMENT = 1;
constant int ERR_NO_SUCH_ID = 2;
constant int ERR_MAX_GROUP_COUNT_REACHED = 3;
/** Event: A new outlet group has been created */
valueobject GroupCreatedEvent extends event.UserEvent {
int id; ///< The ID under which the outlet group manager
///< references this group; may be reused after
///< a group is deleted.
int uniqueId; ///< Random ID uniquely identifying the new group
OutletGroup group; ///< The new group
OutletGroup.Settings settings; ///< The new group's settings
};
/** Event: An outlet group has been deleted */
valueobject GroupDeletedEvent extends event.UserEvent {
int id; ///< The ID under which the outlet group manager
///< referenced the group
int uniqueId; ///< Random unique ID of the deleted group
OutletGroup.Settings settings; ///< Last group settings before deletion
};
/**
* Create a new outlet group.
*
* @param name New group name
* @param members List of member outlets
* @param group Result: Reference to newly created group; null in case of error
*
* @return 0 if OK
* @return 1 if any parameters are invalid
* @return 3 if the maximum number of groups has been reached
*/
int createGroup(in string name, in vector<Outlet> members, out OutletGroup group);
/**
* Retrieve the list of outlet groups.
*
* @return Map of outlet groups, indexed by group ID
*/
map<int, OutletGroup> getAllGroups();
/**
* Retrieve a specific outlet group.
*
* @param id The ID of the requested group
* @param group Result: requested outlet group; null if not found
*
* @return 0 if OK
* @return 2 if no group with the given ID exists
*/
int getGroup(in int id, out OutletGroup group);
/**
* Delete an outlet group.
*
* @param id The ID of the group to delete
*
* @return 0 if OK
* @return 2 if no group with the given ID exists
*/
int deleteGroup(in int id);
};
}
#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