public CommunicationSDK() { dtmfVoip = new VOIPConfigurationManager(nc); ncm = new NetworkConfigurationManager(nc); webCloud = new CloudSettingsManager(nc); bluetooth = new BluetoothManager(nc); wum = new WebURLManager(nc); //ncm = new NetworkConfigurationManager(nc); }
/// <summary> /// Method to initialize network connection, configuration and deviceinfomanager class /// </summary> /// <param name="ipAddress">IPAddress value</param> /// <param name="port">Port value</param> /// <param name="connectionType">DeviceConnectionType</param> protected void Initialize(string ipAddress, string port, DeviceConnectionType connectionType) { try { nc = new NetworkConnection(); nc.DeviceSettings.IPaddress = ipAddress; nc.DeviceSettings.Port = port; nc.DeviceSettings.ConnectionType = connectionType; nc.ReceiveTimeout = 1200000; nc.SendTimeout = 600000; Logger.Info("Starting Wait Connection"); if (WaitForConnection(ipAddress, Convert.ToInt16(port), 15, 10)) { nc.OpenConnection(); Logger.Info(nc.IsOpen.ToString() + nc.DeviceSettings.Port + nc.DeviceSettings.IPaddress); ncm = new NetworkConfigurationManager(nc); Logger.Info(ncm.RetrieveEthernetNetworkSettings().IPAddress.ToString() + ncm.RetrieveEthernetNetworkSettings().Port.ToString()); dim = new DeviceInfoManager(nc); Logger.Info("SDK: Initialize success for IP: " + ipAddress + " and PORT: " + port); } else { throw new Exception("SDK: Failed to initialize network connection. Socket unavailable"); } } catch (IXMSDKException ex) { Logger.Error(ex, "SDK: SDKException"); } catch (Exception ex) { Logger.Error(ex, "SDK: Failed to initialize methods for sdk for IP: " + ipAddress + " and PORT: " + port); throw; } }