C# Class HomeAutomation.Core.DeviceRegistry

Keeps an up to date registry of the devices in the system.
Mostrar archivo Open project: moszinet/HomeAutomation

Public Methods

Method Description
GetDeviceById ( IDeviceNetwork deviceNetwork, byte deviceByteId ) : IDevice

Returns the class type that handles all things related to the device with the specified address.

IsStagingDevice ( IDeviceNetwork deviceNetwork, byte deviceByteId ) : bool
RegisterDevice ( IDeviceNetwork deviceNetwork, IDevice device, byte deviceByteId ) : void

Registers a device into the system.

RegisterDeviceWithTypeID ( IDeviceNetwork deviceNetwork, int deviceIdentification, byte address, byte networkAddress ) : void
RegisterStagingDevice ( IDeviceNetwork deviceNetwork, byte deviceByteId ) : void

Private Methods

Method Description
GetDeviceId ( IDeviceNetwork deviceNetwork, byte deviceId ) : string

Method Details

GetDeviceById() public method

Returns the class type that handles all things related to the device with the specified address.
public GetDeviceById ( IDeviceNetwork deviceNetwork, byte deviceByteId ) : IDevice
deviceNetwork IDeviceNetwork
deviceByteId byte
return IDevice

IsStagingDevice() public method

public IsStagingDevice ( IDeviceNetwork deviceNetwork, byte deviceByteId ) : bool
deviceNetwork IDeviceNetwork
deviceByteId byte
return bool

RegisterDevice() public method

Registers a device into the system.
public RegisterDevice ( IDeviceNetwork deviceNetwork, IDevice device, byte deviceByteId ) : void
deviceNetwork IDeviceNetwork The device network for this device.
device IDevice The device instance that handles all things related to a device.
deviceByteId byte The address/id of the device.
return void

RegisterDeviceWithTypeID() public method

public RegisterDeviceWithTypeID ( IDeviceNetwork deviceNetwork, int deviceIdentification, byte address, byte networkAddress ) : void
deviceNetwork IDeviceNetwork
deviceIdentification int
address byte
networkAddress byte
return void

RegisterStagingDevice() public method

public RegisterStagingDevice ( IDeviceNetwork deviceNetwork, byte deviceByteId ) : void
deviceNetwork IDeviceNetwork
deviceByteId byte
return void