Class NintendoSwitch
Switch device implementation.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Devices
Assembly: Phoenix.Devices.Switch.dll
Syntax
public sealed class NintendoSwitch : DeviceBase, IServiceProvider, IDevice, ICapability, IDisposable, IDeviceStatus
Constructors
View SourceNintendoSwitch(IPAddress, String, String, IPhoenixLogger, String, IEventAggregator, Guid)
Initializes a new instance of the NintendoSwitch class.
Declaration
public NintendoSwitch(IPAddress deviceIP, string name, string alias, IPhoenixLogger logger, string deviceId, IEventAggregator events, Guid phoenixId)
Parameters
Type | Name | Description |
---|---|---|
System.Net.IPAddress | deviceIP | The IP address of the device. |
System.String | name | The name of the device. |
System.String | alias | The alias of the device if known. |
IPhoenixLogger | logger | The current logger. |
System.String | deviceId | The expected device id that will be matched to the id the device provides. |
IEventAggregator | events | The event aggregator service. |
System.Guid | phoenixId | The id for the device. |
Methods
View SourceCleanup()
Performs device cleanup
Declaration
public override void Cleanup()
Overrides
View SourceDispose()
Declaration
public void Dispose()
GetService(Type)
Gets a service from a specific service provider.
Declaration
public override object GetService(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | serviceType | The type of service to get. |
Returns
Type | Description |
---|---|
System.Object | The requested service. |
Overrides
Explicit Interface Implementations
View SourceIDeviceStatus.GetAsync()
Gets the DeviceConnectionStatus of a device.
Declaration
async Task<DeviceConnectionStatus> IDeviceStatus.GetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DeviceConnectionStatus> | The status of the device. |
IDeviceStatus.Set(DeviceConnectionStatus)
Sets the DeviceConnectionStatus for a device.
Declaration
void IDeviceStatus.Set(DeviceConnectionStatus status)
Parameters
Type | Name | Description |
---|---|---|
DeviceConnectionStatus | status | The status to set. |
IDeviceStatus.StatusCheckInterval
Gets the duration to wait before refreshing device status.
Declaration
TimeSpan IDeviceStatus.StatusCheckInterval { get; }
Returns
Type | Description |
---|---|
System.TimeSpan |
Implements
System.IServiceProvider
System.IDisposable