Class DeviceFactoryBase
Base class for all device factories.
Implements
Inherited Members
Namespace: Phoenix.Devices
Assembly: Phoenix.Abstractions.Devices.dll
Syntax
public abstract class DeviceFactoryBase : IDeviceFactory
Constructors
View SourceDeviceFactoryBase(String, String, IPhoenixLogger, IEventAggregator, IEnumerable<String>)
Initializes a new instance of the DeviceFactoryBase class.
Declaration
protected DeviceFactoryBase(string deviceTypeName, string deviceTypeDisplayName, IPhoenixLogger logger, IEventAggregator events, IEnumerable<string> deviceTypeAliases = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | deviceTypeName | The name of the device type. |
System.String | deviceTypeDisplayName | The display name of the device type. |
IPhoenixLogger | logger | The current logger. |
IEventAggregator | events | The event aggregator service. |
System.Collections.Generic.IEnumerable<System.String> | deviceTypeAliases |
Properties
View SourceDeviceTypeAliases
Gets the aliases for the device type.
Declaration
public IEnumerable<string> DeviceTypeAliases { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
DeviceTypeDisplayName
Gets the display name of the device type.
Declaration
public string DeviceTypeDisplayName { get; }
Property Value
Type | Description |
---|---|
System.String |
DeviceTypeName
Gets the name of the device type.
Declaration
public string DeviceTypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
Events
Gets the event aggregator service.
Declaration
protected IEventAggregator Events { get; }
Property Value
Type | Description |
---|---|
IEventAggregator |
IconUri
Gets or sets a value representing the URI for the device type icon.
Declaration
public Uri IconUri { get; protected set; }
Property Value
Type | Description |
---|---|
System.Uri |
Logger
Gets the current logger.
Declaration
protected IPhoenixLogger Logger { get; }
Property Value
Type | Description |
---|---|
IPhoenixLogger |
Methods
View SourceCreateDeviceInstance(IPAddress, String, String, String, String, String, Guid)
Creates an instance of the device from an IP Address.
Declaration
public abstract IDevice CreateDeviceInstance(IPAddress address, string name, string alias, string configType, string configuration, string deviceId, Guid phoenixId)
Parameters
Type | Name | Description |
---|---|---|
System.Net.IPAddress | address | The IP address of the device. |
System.String | name | The name of the device if known. |
System.String | alias | The alias of the device if known. |
System.String | configType | Device specific configuration type string. |
System.String | configuration | Device specific configuration string. |
System.String | deviceId | The expected device id that will be matched to the id the device provides. |
System.Guid | phoenixId | The device id. |
Returns
Type | Description |
---|---|
IDevice | The created device. |