Ejemplo n.º 1
0
        private void ConfigurationInitializationComplete(object sender, EventArgs e)
        {
            _configManager.InitializationComplete -= ConfigurationInitializationComplete;

            if (_zWaveManager == null)
            {
                _zWaveManager = new ZWaveManager();
            }
            if (_zWaveOptions == null)
            {
                _zWaveOptions = new ZWaveOptions();
            }
            String optionsDirectory;

            if (Assembly.GetEntryAssembly() == null)
            {
                optionsDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ZWave");
            }
            else
            {
                optionsDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "ZWave");
            }
            _zWaveOptions.Create(optionsDirectory, optionsDirectory, "");
            _zWaveOptions.Lock();
            _zWaveManager.Create();
            _zWaveManager.AddDriver(_configManager.ZWaveCOM, ZWControllerInterface.Serial);
            _zWaveManager.OnNotification           += NotificationRecieved;
            _zWaveManager.OnControllerStateChanged += ControllerStateChanged;
        }
Ejemplo n.º 2
0
 public NotificationEventArgs(IZWaveManager manager, byte nodeId, ZWNotification.Type notificationType, ZWValueID valueId, UInt32 homeId)
 {
     Manager          = manager;
     NodeId           = nodeId;
     NotificationType = notificationType;
     ValueId          = valueId;
     HomeId           = homeId;
 }
Ejemplo n.º 3
0
 public NotificationEventArgs(IZWaveManager manager, ZWNotification notification)
 {
     Manager          = manager;
     NodeId           = notification.GetNodeId();
     NotificationType = notification.GetType();
     ValueId          = notification.GetValueID();
     HomeId           = notification.GetHomeId();
 }
Ejemplo n.º 4
0
 public ControllerStateChangedEventArgs(IZWaveManager manager, ZWControllerState controllerState)
 {
     Manager         = manager;
     ControllerState = controllerState;
 }
Ejemplo n.º 5
0
 public ZWaveController(IInternalConfigurationManager configManager, IZWaveManager zWaveManager, IZWaveOptions zWaveOptions)
     : this(configManager)
 {
     _zWaveManager = zWaveManager;
     _zWaveOptions = zWaveOptions;
 }