Class DeviceBase
Base class for all device types.
Inherited Members
Namespace: Phoenix.Devices
Assembly: Phoenix.Abstractions.Devices.dll
Syntax
public abstract class DeviceBase : CapabilityBase, IServiceProvider, IDevice, ICapability
Constructors
View SourceDeviceBase(String, String, String, IPhoenixLogger, IEventAggregator, Guid, String, String)
Initializes a new instance of the DeviceBase class.
Declaration
protected DeviceBase(string deviceName, string deviceTypeName, string deviceTypeDisplayName, IPhoenixLogger logger, IEventAggregator events, Guid phoenixId, string configurationType = null, string configuration = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | deviceName | The name of the device. |
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.Guid | phoenixId | The id for the device. |
System.String | configurationType | The device configuration type. |
System.String | configuration | The device configuration. |
DeviceBase(String, String, String, IPhoenixLogger, String, IEventAggregator, Guid)
Initializes a new instance of the DeviceBase class.
Declaration
protected DeviceBase(string deviceName, string deviceTypeName, string deviceTypeDisplayName, IPhoenixLogger logger, string configuration, IEventAggregator events, Guid phoenixId)
Parameters
Type | Name | Description |
---|---|---|
System.String | deviceName | The name of the device. |
System.String | deviceTypeName | The name of the device type. |
System.String | deviceTypeDisplayName | The display name of the device type. |
IPhoenixLogger | logger | The current logger. |
System.String | configuration | The device configuration. |
IEventAggregator | events | The event aggregator service. |
System.Guid | phoenixId | The id for the device. |
Properties
View SourceAlias
Gets or sets a user defined alias for the device.
Declaration
public string Alias { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AttachedObjectModel
Gets or sets the game object model that is attached to this device.
Declaration
public object AttachedObjectModel { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Configuration
Gets or sets the configuration string for this device.
Declaration
public string Configuration { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ConfigurationType
Gets or sets the configuration type for this device. May be used for versioning the configuration string.
Declaration
public string ConfigurationType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ConnectionStatus
Gets or sets a value indicating the device connection status.
Declaration
public DeviceConnectionStatus ConnectionStatus { get; protected set; }
Property Value
Type | Description |
---|---|
DeviceConnectionStatus |
DeviceImplementation
Gets or sets the underlying device implementation.
Declaration
public object DeviceImplementation { get; protected set; }
Property Value
Type | Description |
---|---|
System.Object |
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 |
DisplayName
Gets the display name for UI and logging. If Alias is defined it is used otherwise Name is used. If both are not set then the IP address is returned.
Declaration
public string DisplayName { get; }
Property Value
Type | Description |
---|---|
System.String |
Events
Gets the event aggregator service.
Declaration
protected IEventAggregator Events { get; }
Property Value
Type | Description |
---|---|
IEventAggregator |
Id
Gets or sets the unique identifier of the device.
Declaration
public string Id { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
IPAddress
Gets or sets the IPAddress of this device.
Declaration
public IPAddress IPAddress { get; protected set; }
Property Value
Type | Description |
---|---|
System.Net.IPAddress |
Logger
Gets the current logger.
Declaration
public IPhoenixLogger Logger { get; }
Property Value
Type | Description |
---|---|
IPhoenixLogger |
Name
Gets or sets the name of this device.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PhoenixId
Gets or sets a value representing the identifier phoenix places on the device for tracking.
Declaration
public Guid PhoenixId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
XboxLiveDeviceId
Gets a value representing the XBL device Id.
Declaration
public virtual string XboxLiveDeviceId { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceCleanup()
Performs device cleanup
Declaration
public virtual void Cleanup()
OnDeviceAliasChanged(String, String)
Called when this device's alias is changed.
Declaration
protected virtual void OnDeviceAliasChanged(string oldValue, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The old value. |
System.String | value | The new value. |
Serialize()
Serializes device information.
Declaration
public virtual SerializableIDevice Serialize()
Returns
Type | Description |
---|---|
SerializableIDevice | The serialized device. |