Show / Hide Table of Contents

Interface IDeviceManager

Interface for the device manager.

Namespace: Phoenix.Devices
Assembly: Phoenix.Abstractions.Devices.dll
Syntax
public interface IDeviceManager

Properties

View Source

AllDevices

Gets a read only collection of all the devices.

Declaration
ReadOnlyCollection<IDevice> AllDevices { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<IDevice>
View Source

ConfigurationEnlistments

Gets the dictionary of device config enlistments.

Declaration
Dictionary<IDevice, string> ConfigurationEnlistments { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<IDevice, System.String>
View Source

DeviceTypes

Gets a read only dictionary of all the device type names as keys, and the type display names as values.

Declaration
ReadOnlyDictionary<string, string> DeviceTypes { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyDictionary<System.String, System.String>
View Source

GroupDefinitions

Gets a read only collection of the group definitions.

Declaration
ReadOnlyCollection<GroupDefinition> GroupDefinitions { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<GroupDefinition>
View Source

IsDeviceLoadFinished

Gets a value indicating whether or not the device list has been completely loaded.

Declaration
bool IsDeviceLoadFinished { get; }
Property Value
Type Description
System.Boolean
View Source

ResolveIPAddress

Gets a value indicating whether the IP address should resolve to a DNS name.

Declaration
bool ResolveIPAddress { get; }
Property Value
Type Description
System.Boolean
View Source

SelectedDevices

Gets a read only collection of the currently selected devices.

Declaration
ReadOnlyCollection<IDevice> SelectedDevices { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<IDevice>

Methods

View Source

AddDevice(IDevice)

Adds a device to the system.

Declaration
void AddDevice(IDevice newDevice)
Parameters
Type Name Description
IDevice newDevice

The device to add to the system.

View Source

AddDevice(IDevice, Guid)

Adds a device to the system.

Declaration
void AddDevice(IDevice newDevice, Guid parentId)
Parameters
Type Name Description
IDevice newDevice

The device to add to the system.

System.Guid parentId

The id for the parent object for which the device should be placed.

View Source

AddDevice(IPAddress, String)

Adds a device to the system.

Declaration
void AddDevice(IPAddress deviceIP, string deviceTypeName)
Parameters
Type Name Description
System.Net.IPAddress deviceIP

The IP address of the device to add.

System.String deviceTypeName

The name of the device factory.

Remarks

The system iterates through it's list of device factories until it finds one that can create the device. An exception is thrown if can not be created.

View Source

AddDevice(IPAddress, String, Guid)

Adds a device to the system.

Declaration
void AddDevice(IPAddress deviceIP, string deviceTypeName, Guid parentId)
Parameters
Type Name Description
System.Net.IPAddress deviceIP

The IP address of the device to add.

System.String deviceTypeName

The name of the device factory.

System.Guid parentId

The id for the parent object for which the device should be placed

Remarks

The system iterates through it's list of device factories until it finds one that can create the device. An exception is thrown if can not be created.

View Source

AddDevice(IPAddress, String, String, Guid)

Adds a device to the system.

Declaration
void AddDevice(IPAddress deviceIP, string deviceName, string deviceTypeName, Guid parentId)
Parameters
Type Name Description
System.Net.IPAddress deviceIP

The IP address of the device to add.

System.String deviceName

The name of the device.

System.String deviceTypeName

The name of the device factory.

System.Guid parentId

The id for the parent object for which the device should be placed

Remarks

The system iterates through it's list of device factories until it finds one that can create the device. An exception is thrown if can not be created.

View Source

AddDeviceToSelection(IDevice)

Adds the specified device to the currently selected list.

Declaration
void AddDeviceToSelection(IDevice device)
Parameters
Type Name Description
IDevice device

The device to add to the selected devices list.

View Source

AddGroup(String, Guid, Guid)

Adds a group to the definitions and adds it to the parent group.

Declaration
void AddGroup(string groupName, Guid groupId, Guid parentId)
Parameters
Type Name Description
System.String groupName

The name of the new group

System.Guid groupId

The id for the new group

System.Guid parentId

The id of the parent group

View Source

AddNodeToGroup(Guid, Guid)

Adds a node to an existing group.

Declaration
void AddNodeToGroup(Guid groupId, Guid nodeId)
Parameters
Type Name Description
System.Guid groupId

The group to put the node in.

System.Guid nodeId

The id for the node.

View Source

ClearDeviceSelection()

Clears the selected devices list.

Declaration
void ClearDeviceSelection()
View Source

FindOpenGroupName(String, String)

Returns a unique name based on if there is another group with the same name.

Declaration
string FindOpenGroupName(string newName, string currentName = null)
Parameters
Type Name Description
System.String newName

New name of existing group or name of new group to check for uniqueness.

System.String currentName

Optional parameter to determine if rename is renaming back to original name and should ignore the duplicate check.

Returns
Type Description
System.String

Returns the input name if unique or returns a name of newName - Copy(x) if it will be a copy of an existing name.

View Source

GetDeviceIconUri(String)

Gets the URI for a device's Icon.

Declaration
Uri GetDeviceIconUri(string deviceTypeName)
Parameters
Type Name Description
System.String deviceTypeName

The device type name

Returns
Type Description
System.Uri

a Uri to the device's icon resource if the device exists, null otherwise.

View Source

LoadDeviceList()

Loads a device list from the AppData folder. If the file doesn't exist, an empty list is created. Throws an exception if it's unable to deserialize the provided file.

Declaration
void LoadDeviceList()
View Source

ModifyDeviceSelection(Collection<IDevice>, Collection<IDevice>)

Modifies the device selection collection.

Declaration
void ModifyDeviceSelection(Collection<IDevice> devicesToRemove, Collection<IDevice> devicesToAdd)
Parameters
Type Name Description
System.Collections.ObjectModel.Collection<IDevice> devicesToRemove

The devices to remove from selection.

System.Collections.ObjectModel.Collection<IDevice> devicesToAdd

The devices to add to the selection.

View Source

RemoveDevice(IDevice)

Removes a device from the device manager.

Declaration
void RemoveDevice(IDevice device)
Parameters
Type Name Description
IDevice device

The device to remove.

View Source

RemoveDeviceFromSelection(IDevice)

Removes a device from the selected devices list.

Declaration
void RemoveDeviceFromSelection(IDevice device)
Parameters
Type Name Description
IDevice device

The device to remove from the selected devices list.

View Source

RemoveGroup(Guid)

Removes a group from the group definitions.

Declaration
void RemoveGroup(Guid groupId)
Parameters
Type Name Description
System.Guid groupId

The id for the group to remove

View Source

RemoveNodeFromGroup(Guid, Guid)

Removes a node from an existing group.

Declaration
void RemoveNodeFromGroup(Guid groupId, Guid nodeId)
Parameters
Type Name Description
System.Guid groupId

The group to remove the node from.

System.Guid nodeId

The id for the node.

View Source

RenameGroup(Guid, String)

Renames a group in the group definition.

Declaration
void RenameGroup(Guid groupId, string newName)
Parameters
Type Name Description
System.Guid groupId

The id for the group to rename.

System.String newName

The new name to set the group to.

View Source

SaveDeviceList()

Saves the device list to the AppData folder. Overwrites an existing list.

Declaration
void SaveDeviceList()
  • View Source
In This Article
Back to top Generated by DocFX