Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Decompiled with JetBrains decompiler
- // Type: Rinnai.NetworkerSystem.API.NBWControl.CNBWControl
- // Assembly: API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- // MVID: 9E1B7773-F300-4632-970B-75E74F11BA63
- // Assembly location: C:\Users\Mitch\Documents\rinnaitouchDecom\resources\assemblies\API.dll
- using NetworkerSystem.NBWControlWIFIAccess;
- using Rinnai.NetworkerSystem.API.NBWControl.Settings;
- using Rinnai.NetworkerSystem.API.NBWControlWIFIAccess;
- using Rinnai.NetworkerSystem.API.Timing;
- using System;
- namespace Rinnai.NetworkerSystem.API.NBWControl
- {
- public class CNBWControl
- {
- private const string _CMD_CONFIG_RSP = "R";
- private string _configCommand;
- private CNBWControl.SettingsAccess _settingsAccess;
- private const string _CMD_CONFIG_GET = "G";
- private CTag _getCommandTag;
- private const string _CMD_CONFIG_SET = "S";
- private CTag _setCommandTag;
- public CNBWControl(string configCommand, Action<string> debugLog)
- {
- this.WIFI = new CWIFIInterface(debugLog);
- this.WIFI.HostLocated += new EventHandler(this.WIFIInterface_HostLocated);
- this.WIFI.HostLocateTimeout += new EventHandler(this.WIFIInterface_HostLocateTimeout);
- this.WIFI.UDPBroadcastMessageReceived += new EventHandler<CBroadcastMessageReceivedEventArgs>(this.WIFIInterface_UDPBroadcastMessageReceived);
- this.WIFI.HostConnectTimeout += new EventHandler(this.WIFIInterface_HostConnectTimeout);
- this.WIFI.HostConnected += new EventHandler(this.WIFIInterface_HostConnected);
- this.WIFI.HostDisconnected += new EventHandler(this.WIFIInterface_HostDisconnected);
- this.WIFI.HostInactivityDetected += new EventHandler(this.WIFIInterface_HostInactivityDetected);
- this.WIFI.UserInactivityDetected += new EventHandler(this.WIFIInterface_UserInactivityDetected1);
- this.WIFI.TCPMessageReceived += new EventHandler<CMessageEventArgs>(this.WIFIInterface_MessageReceived);
- this.HUB = new CHUBInterface(debugLog);
- this.HUB.HostConnectTimeout += new EventHandler(this.HUBInterface_HostConnectTimeout);
- this.HUB.HostConnected += new EventHandler(this.HUBInterface_HostConnected);
- this.HUB.HostDisonnected += new EventHandler(this.HUBInterface_HostDisonnected);
- this.HUB.HostInactivityDetected += new EventHandler(this.HUBInterface_HostInactivityDetected);
- this.HUB.UserInactivityDetected += new EventHandler(this.HUBInterface_UserInactivityDetected);
- this.HUB.MessageReceived += new EventHandler<CMessageEventArgs>(this.HUBInterface_MessageReceived);
- this.HUB.MessageSentAcknowledged += new EventHandler<CMessageEventArgs>(this.HUBInterface_MessageSentAcknowledged);
- this.Settings = new CSettings();
- this._configCommand = configCommand;
- this._settingsAccess.IsActive = false;
- this._settingsAccess.CheckTimer = new CTimer100ms();
- this._settingsAccess.CheckTimer.IntervalElapsed += new EventHandler(this.SettingsAccessCheckTimer_IntervalElapsed);
- this._settingsAccess.CheckTimer.StartContinuousTimer();
- }
- public CSettings Settings { get; }
- private void SettingsAccessCheckTimer_IntervalElapsed(object sender, EventArgs e)
- {
- if (!this._settingsAccess.IsActive)
- return;
- this._settingsAccess.TimeInterval += 100;
- if (this._settingsAccess.TimeInterval >= 2500)
- {
- if (this._getCommandTag != null)
- this.GetCommandResponse_Process("", true);
- else
- this.SetCommandResponse_Process("", true);
- }
- }
- public void SettingsAccessUpdateAfterResponseTextReceived(string responseText)
- {
- string str = responseText.Substring(0, 1);
- if (str == "R")
- return;
- if (!(str == "G"))
- {
- if (!(str == "S"))
- return;
- this.SetCommandResponse_Process(responseText.Substring(1), false);
- }
- else
- this.GetCommandResponse_Process(responseText.Substring(1), false);
- }
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_WIFI_UserDefinedSSID;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_WIFI_TCPNoMessageReceivedTimeout;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_HUB_IOTHUBServicePrimaryKey;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_HUB_IOTHUBServiceSecondaryKey;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_HUB_DevicePrimaryKey;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_HUB_EventHubEndpoint;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_HUB_UserInactivityTimeout;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_MQTT_Broker_ServerAddress;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> GetSettingCommandResponse_MQTT_Config_ClientID;
- public void ConfigurationCommandIssue_GetUserDefinedSSID(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.WIFI.SSID);
- }
- public void ConfigurationCommandIssue_GetTCPNoMessageReceivedTimeout(
- string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.WIFI.TCPNoMessageReceiveTimeout);
- }
- public void ConfigurationCommandIssue_GetIOTHUBServicePrimaryKey(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.HUB.IOTHUBServicePrimaryKey);
- }
- public void ConfigurationCommandIssue_GetIOTHUBServiceSecondaryKey(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.HUB.IOTHUBServiceSecondaryKey);
- }
- public void ConfigurationCommandIssue_GetDevicePrimaryKey(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.HUB.DevicePrimaryKey);
- }
- public void ConfigurationCommandIssue_GetEventHubEndpoint(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.HUB.EventHubEndpoint);
- }
- public void ConfigurationCommandIssue_GetUserInactivityTimeout(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.HUB.UserInactivityTimeout);
- }
- public void ConfigurationCommandIssue_GetMQTTBrokerServerAddress(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.MQTT.Broker.ServerAddress);
- }
- public void ConfigurationCommandIssue_GetMQTTConfigClientID(string defaultAccessPassword)
- {
- this.GetCommandIssue(defaultAccessPassword, this.Settings.MQTT.Config.ClientID);
- }
- private void GetCommandIssue(string defaultAccessPassword, CTag tag)
- {
- this._getCommandTag = tag;
- this._setCommandTag = (CTag) null;
- this.WIFI.SendTextMessage(this._configCommand + "G" + this.Settings.Other.DeviceDefaultPassword.Descriptor + defaultAccessPassword + tag.Descriptor + "\r");
- this._settingsAccess.TimeInterval = 0;
- this._settingsAccess.IsActive = true;
- }
- private void GetCommandResponse_Process(string responseText, bool responseNotReceivedInTime)
- {
- this._settingsAccess.IsActive = false;
- if (responseNotReceivedInTime)
- this._getCommandTag.ValueGetState = CTag.VALUE_GET_STATE.NOT_GOT_NO_RESPONSE;
- else
- this._getCommandTag.UpdateAfterGetResponseReceived(responseText);
- CNBWControl.CGetSetSettingCommandResponseEventArgs e = new CNBWControl.CGetSetSettingCommandResponseEventArgs(this._getCommandTag);
- if (this._getCommandTag.Descriptor == this.Settings.WIFI.SSID.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> wifiUserDefinedSsid = this.GetSettingCommandResponse_WIFI_UserDefinedSSID;
- if (wifiUserDefinedSsid == null)
- return;
- wifiUserDefinedSsid((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.WIFI.TCPNoMessageReceiveTimeout.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> messageReceivedTimeout = this.GetSettingCommandResponse_WIFI_TCPNoMessageReceivedTimeout;
- if (messageReceivedTimeout == null)
- return;
- messageReceivedTimeout((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.HUB.IOTHUBServicePrimaryKey.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> servicePrimaryKey = this.GetSettingCommandResponse_HUB_IOTHUBServicePrimaryKey;
- if (servicePrimaryKey == null)
- return;
- servicePrimaryKey((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.HUB.IOTHUBServiceSecondaryKey.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> serviceSecondaryKey = this.GetSettingCommandResponse_HUB_IOTHUBServiceSecondaryKey;
- if (serviceSecondaryKey == null)
- return;
- serviceSecondaryKey((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.HUB.DevicePrimaryKey.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> devicePrimaryKey = this.GetSettingCommandResponse_HUB_DevicePrimaryKey;
- if (devicePrimaryKey == null)
- return;
- devicePrimaryKey((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.HUB.EventHubEndpoint.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> eventHubEndpoint = this.GetSettingCommandResponse_HUB_EventHubEndpoint;
- if (eventHubEndpoint == null)
- return;
- eventHubEndpoint((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.HUB.UserInactivityTimeout.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> inactivityTimeout = this.GetSettingCommandResponse_HUB_UserInactivityTimeout;
- if (inactivityTimeout == null)
- return;
- inactivityTimeout((object) this, e);
- }
- else if (this._getCommandTag.Descriptor == this.Settings.MQTT.Broker.ServerAddress.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> brokerServerAddress = this.GetSettingCommandResponse_MQTT_Broker_ServerAddress;
- if (brokerServerAddress == null)
- return;
- brokerServerAddress((object) this, e);
- }
- else
- {
- if (!(this._getCommandTag.Descriptor == this.Settings.MQTT.Config.ClientID.Descriptor))
- return;
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> mqttConfigClientId = this.GetSettingCommandResponse_MQTT_Config_ClientID;
- if (mqttConfigClientId != null)
- mqttConfigClientId((object) this, e);
- }
- }
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_WIFI_UserDefinedSSID;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_WIFI_UserDefinedSSIDPassword;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_WIFI_JoinType;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_MQTTGeneral_EnableConnection;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_Save;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_Boot;
- public event EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> SetSettingCommandResponse_Hash;
- public void ConfigurationCommandIssue_SetUserDefinedSSID(
- string defaultAccessPassword,
- string userDefinedSSID)
- {
- this.SetCommandIssue(defaultAccessPassword, userDefinedSSID, this.Settings.WIFI.SSID);
- }
- public void ConfigurationCommandIssue_SetUserDefinedSSIDPassword(
- string defaultAccessPassword,
- string userDefinedSSIDPassword)
- {
- this.SetCommandIssue(defaultAccessPassword, userDefinedSSIDPassword, this.Settings.WIFI.NewPassword);
- }
- public void ConfigurationCommandIssue_SetNetworkJoinType(
- string defaultAccessPassword,
- bool operateAsAccessPoint)
- {
- string userDefinedSSID = !operateAsAccessPoint ? "1" : "7";
- this.SetCommandIssue(defaultAccessPassword, userDefinedSSID, this.Settings.WIFI.JoinType);
- }
- public void ConfigurationCommandIssue_SetMQTTGeneralEnableConnection(
- string defaultAccessPassword,
- bool enableConnection)
- {
- string userDefinedSSID = !enableConnection ? "N" : "Y";
- this.SetCommandIssue(defaultAccessPassword, userDefinedSSID, this.Settings.MQTT.General.EnableConnection);
- }
- public void ConfigurationCommandIssue_SaveSettingsAndReboot(string defaultAccessPassword)
- {
- this.SetCommandIssue(defaultAccessPassword, "", this.Settings.Save);
- }
- public void ConfigurationCommandIssue_RebootWithNoSaveOfSettings(string defaultAccessPassword)
- {
- this.SetCommandIssue(defaultAccessPassword, "", this.Settings.Boot);
- }
- public void ConfigurationCommandIssue_GenerateNewHASH(string defaultAccessPassword)
- {
- this.SetCommandIssue(defaultAccessPassword, "", this.Settings.Hash);
- }
- private void SetCommandIssue(string defaultAccessPassword, string userDefinedSSID, CTag tag)
- {
- this._setCommandTag = tag;
- this._getCommandTag = (CTag) null;
- this.WIFI.SendTextMessage(this._configCommand + "S" + this.Settings.Other.DeviceDefaultPassword.Descriptor + defaultAccessPassword + tag.Descriptor + userDefinedSSID + "\r");
- this._settingsAccess.TimeInterval = 0;
- this._settingsAccess.IsActive = true;
- }
- private void SetCommandResponse_Process(string responseText, bool responseNotReceivedInTime)
- {
- this._settingsAccess.IsActive = false;
- if (responseNotReceivedInTime)
- this._setCommandTag.ValueSetState = CTag.VALUE_SET_STATE.NOT_SET_NO_RESPONSE;
- else
- this._setCommandTag.UpdateAfterSetResponseReceived(responseText);
- CNBWControl.CGetSetSettingCommandResponseEventArgs e = new CNBWControl.CGetSetSettingCommandResponseEventArgs(this._setCommandTag);
- if (this._setCommandTag.Descriptor == this.Settings.WIFI.SSID.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> wifiUserDefinedSsid = this.SetSettingCommandResponse_WIFI_UserDefinedSSID;
- if (wifiUserDefinedSsid == null)
- return;
- wifiUserDefinedSsid((object) this, e);
- }
- else if (this._setCommandTag.Descriptor == this.Settings.WIFI.NewPassword.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> definedSsidPassword = this.SetSettingCommandResponse_WIFI_UserDefinedSSIDPassword;
- if (definedSsidPassword == null)
- return;
- definedSsidPassword((object) this, e);
- }
- else if (this._setCommandTag.Descriptor == this.Settings.WIFI.JoinType.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> responseWifiJoinType = this.SetSettingCommandResponse_WIFI_JoinType;
- if (responseWifiJoinType == null)
- return;
- responseWifiJoinType((object) this, e);
- }
- else if (this._setCommandTag.Descriptor == this.Settings.MQTT.General.EnableConnection.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> enableConnection = this.SetSettingCommandResponse_MQTTGeneral_EnableConnection;
- if (enableConnection == null)
- return;
- enableConnection((object) this, e);
- }
- else if (this._setCommandTag.Descriptor == this.Settings.Save.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> commandResponseSave = this.SetSettingCommandResponse_Save;
- if (commandResponseSave == null)
- return;
- commandResponseSave((object) this, e);
- }
- else if (this._setCommandTag.Descriptor == this.Settings.Boot.Descriptor)
- {
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> commandResponseBoot = this.SetSettingCommandResponse_Boot;
- if (commandResponseBoot == null)
- return;
- commandResponseBoot((object) this, e);
- }
- else
- {
- if (!(this._setCommandTag.Descriptor == this.Settings.Hash.Descriptor))
- return;
- EventHandler<CNBWControl.CGetSetSettingCommandResponseEventArgs> commandResponseHash = this.SetSettingCommandResponse_Hash;
- if (commandResponseHash != null)
- commandResponseHash((object) this, e);
- }
- }
- public event EventHandler<CMessageEventArgs> WIFI_MessageReceived;
- public event EventHandler WIFI_HostInactivityDetected;
- public event EventHandler WIFI_UserInactivityDetected;
- public event EventHandler<CBroadcastMessageReceivedEventArgs> WIFI_UDPBroadcastMessageReceived;
- public CWIFIInterface WIFI { get; }
- public bool ModuleInConfigMode
- {
- get
- {
- return this.WIFI.ModuleInConfigMode;
- }
- }
- public byte ModuleVersion
- {
- get
- {
- return this.WIFI.ModuleVersion;
- }
- }
- public byte CC3200Version
- {
- get
- {
- return this.WIFI.CC3200Version;
- }
- }
- public CWIFIAccess.WLANAccessMode WiFiAccessMode
- {
- get
- {
- return this.WIFI.Mode;
- }
- }
- public byte[] HUBAccessHash
- {
- get
- {
- return this.WIFI.HUBAccessHash;
- }
- }
- public string DeviceDefaultPassword
- {
- get
- {
- return this.WIFI.DeviceDefaultPassword;
- }
- }
- public byte NumberOfScannedSSIDs
- {
- get
- {
- return this.WIFI.NumberOfScannedSSIDs;
- }
- }
- public CScannedSSID[] ScannedSSID
- {
- get
- {
- return this.WIFI.ScannedSSID;
- }
- }
- private void WIFIInterface_UserInactivityDetected1(object sender, EventArgs e)
- {
- EventHandler inactivityDetected = this.WIFI_UserInactivityDetected;
- if (inactivityDetected == null)
- return;
- inactivityDetected((object) this, EventArgs.Empty);
- }
- private void WIFIInterface_HostInactivityDetected(object sender, EventArgs e)
- {
- EventHandler inactivityDetected = this.WIFI_HostInactivityDetected;
- if (inactivityDetected == null)
- return;
- inactivityDetected((object) this, EventArgs.Empty);
- }
- private void WIFIInterface_MessageReceived(object sender, CMessageEventArgs e)
- {
- EventHandler<CMessageEventArgs> wifiMessageReceived = this.WIFI_MessageReceived;
- if (wifiMessageReceived == null)
- return;
- wifiMessageReceived((object) this, e);
- }
- private void WIFIInterface_UDPBroadcastMessageReceived(
- object sender,
- CBroadcastMessageReceivedEventArgs e)
- {
- EventHandler<CBroadcastMessageReceivedEventArgs> broadcastMessageReceived = this.WIFI_UDPBroadcastMessageReceived;
- if (broadcastMessageReceived == null)
- return;
- broadcastMessageReceived((object) this, e);
- }
- public event EventHandler WIFI_HostConnected;
- public event EventHandler WIFI_HostConnectTimeout;
- public event EventHandler WIFI_HostDisconnected;
- private void WIFIInterface_HostConnected(object sender, EventArgs e)
- {
- EventHandler wifiHostConnected = this.WIFI_HostConnected;
- if (wifiHostConnected == null)
- return;
- wifiHostConnected((object) this, EventArgs.Empty);
- }
- private void WIFIInterface_HostConnectTimeout(object sender, EventArgs e)
- {
- EventHandler hostConnectTimeout = this.WIFI_HostConnectTimeout;
- if (hostConnectTimeout == null)
- return;
- hostConnectTimeout((object) this, EventArgs.Empty);
- }
- private void WIFIInterface_HostDisconnected(object sender, EventArgs e)
- {
- EventHandler hostDisconnected = this.WIFI_HostDisconnected;
- if (hostDisconnected == null)
- return;
- hostDisconnected((object) this, EventArgs.Empty);
- }
- public event EventHandler WIFI_HostLocated;
- public event EventHandler WIFI_HostLocateTimeout;
- private void WIFIInterface_HostLocated(object sender, EventArgs e)
- {
- EventHandler wifiHostLocated = this.WIFI_HostLocated;
- if (wifiHostLocated == null)
- return;
- wifiHostLocated((object) this, EventArgs.Empty);
- }
- private void WIFIInterface_HostLocateTimeout(object sender, EventArgs e)
- {
- EventHandler hostLocateTimeout = this.WIFI_HostLocateTimeout;
- if (hostLocateTimeout == null)
- return;
- hostLocateTimeout((object) this, EventArgs.Empty);
- }
- public event EventHandler<CMessageEventArgs> HUB_MessageSentAcknowledged;
- public event EventHandler<CMessageEventArgs> HUB_MessageReceived;
- public event EventHandler HUB_HostInactivityDetected;
- public event EventHandler HUB_UserInactivityDetected;
- public event EventHandler HUB_HostDisconnected;
- public event EventHandler HUB_HostConnected;
- public event EventHandler HUB_HostConnectTimeout;
- public CHUBInterface HUB { get; }
- public byte[] GenerateHUBAccessHashAsArray(string ssid, string ssidPassword)
- {
- return this.HUB.GenerateHUBAccessHashAsArray(ssid, ssidPassword);
- }
- private void HUBInterface_MessageSentAcknowledged(object sender, CMessageEventArgs e)
- {
- EventHandler<CMessageEventArgs> sentAcknowledged = this.HUB_MessageSentAcknowledged;
- if (sentAcknowledged == null)
- return;
- sentAcknowledged((object) this, e);
- }
- private void HUBInterface_MessageReceived(object sender, CMessageEventArgs e)
- {
- EventHandler<CMessageEventArgs> hubMessageReceived = this.HUB_MessageReceived;
- if (hubMessageReceived == null)
- return;
- hubMessageReceived((object) this, e);
- }
- private void HUBInterface_HostInactivityDetected(object sender, EventArgs e)
- {
- EventHandler inactivityDetected = this.HUB_HostInactivityDetected;
- if (inactivityDetected == null)
- return;
- inactivityDetected((object) this, e);
- }
- private void HUBInterface_UserInactivityDetected(object sender, EventArgs e)
- {
- EventHandler inactivityDetected = this.HUB_UserInactivityDetected;
- if (inactivityDetected == null)
- return;
- inactivityDetected((object) this, e);
- }
- private void HUBInterface_HostDisonnected(object sender, EventArgs e)
- {
- EventHandler hostDisconnected = this.HUB_HostDisconnected;
- if (hostDisconnected == null)
- return;
- hostDisconnected((object) this, e);
- }
- private void HUBInterface_HostConnected(object sender, EventArgs e)
- {
- EventHandler hubHostConnected = this.HUB_HostConnected;
- if (hubHostConnected == null)
- return;
- hubHostConnected((object) this, e);
- }
- private void HUBInterface_HostConnectTimeout(object sender, EventArgs e)
- {
- EventHandler hostConnectTimeout = this.HUB_HostConnectTimeout;
- if (hostConnectTimeout == null)
- return;
- hostConnectTimeout((object) this, e);
- }
- private struct SettingsAccess
- {
- public bool IsActive;
- public CTimer100ms CheckTimer;
- public int TimeInterval;
- }
- public class CGetSetSettingCommandResponseEventArgs : EventArgs
- {
- public CGetSetSettingCommandResponseEventArgs(CTag tag)
- {
- this.TagResponse = (CTag) null;
- this.TagResponse = tag;
- }
- public CTag TagResponse { get; }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement