mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-15 20:54:46 +00:00
Merge pull request #10 in PEC/pepperdash-simplsharp-core from feature/eControlMethod.Cresnet to master
* commit 'd5fa4311a22f2be1479ce6a8816bbafe9b6f2fa2': Added eControlMethod.Cresnet to enum Saved local project settings (no code changes) Fixes Null Reference Exceptions with GenericTcpIpClient and GenericSshClient
This commit is contained in:
Binary file not shown.
@@ -303,11 +303,16 @@ namespace PepperDash.Core
|
|||||||
ReconnectTimer.Stop();
|
ReconnectTimer.Stop();
|
||||||
ReconnectTimer = null;
|
ReconnectTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
KillStream();
|
KillStream();
|
||||||
Client.Disconnect();
|
|
||||||
Client = null;
|
if (Client != null)
|
||||||
ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY;
|
{
|
||||||
Debug.Console(1, this, "Disconnected");
|
Client.Disconnect();
|
||||||
|
Client = null;
|
||||||
|
ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY;
|
||||||
|
Debug.Console(1, this, "Disconnected");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -287,7 +287,8 @@ namespace PepperDash.Core
|
|||||||
// Check debug level before processing byte array
|
// Check debug level before processing byte array
|
||||||
//if (Debug.Level == 2)
|
//if (Debug.Level == 2)
|
||||||
// Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
// Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||||
Client.SendData(bytes, bytes.Length);
|
if(Client != null)
|
||||||
|
Client.SendData(bytes, bytes.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ namespace PepperDash.Core
|
|||||||
{
|
{
|
||||||
public enum eControlMethod
|
public enum eControlMethod
|
||||||
{
|
{
|
||||||
None = 0, Com, IpId, IR, Ssh, Tcpip, Telnet
|
None = 0, Com, IpId, IR, Ssh, Tcpip, Telnet, Cresnet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//using System.Linq;
|
|
||||||
//using System.Text;
|
|
||||||
//using Crestron.SimplSharp;
|
|
||||||
//using Newtonsoft.Json;
|
|
||||||
//using Newtonsoft.Json.Linq;
|
|
||||||
|
|
||||||
//namespace PepperDash.Core
|
|
||||||
//{
|
|
||||||
// public class DeviceConfig
|
|
||||||
// {
|
|
||||||
// [JsonProperty("key")]
|
|
||||||
// public string Key { get; set; }
|
|
||||||
|
|
||||||
// [JsonProperty("name")]
|
|
||||||
// public string Name { get; set; }
|
|
||||||
|
|
||||||
// [JsonProperty("group")]
|
|
||||||
// public string Group { get; set; }
|
|
||||||
|
|
||||||
// [JsonProperty("type")]
|
|
||||||
// public string Type { get; set; }
|
|
||||||
|
|
||||||
// [JsonProperty("properties")]
|
|
||||||
// [JsonConverter(typeof(DevicePropertiesConverter))]
|
|
||||||
// public JToken Properties { get; set; }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// ///
|
|
||||||
// /// </summary>
|
|
||||||
// public class DevicePropertiesConverter : JsonConverter
|
|
||||||
// {
|
|
||||||
|
|
||||||
// public override bool CanConvert(Type objectType)
|
|
||||||
// {
|
|
||||||
// return objectType == typeof(JToken);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
|
||||||
// {
|
|
||||||
// return JToken.ReadFrom(reader);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override bool CanWrite
|
|
||||||
// {
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException("SOD OFF HOSER");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
@@ -79,7 +79,6 @@
|
|||||||
<Compile Include="Logging\DebugContext.cs" />
|
<Compile Include="Logging\DebugContext.cs" />
|
||||||
<Compile Include="Logging\DebugMemory.cs" />
|
<Compile Include="Logging\DebugMemory.cs" />
|
||||||
<Compile Include="Device.cs" />
|
<Compile Include="Device.cs" />
|
||||||
<Compile Include="DeviceConfig.cs" />
|
|
||||||
<Compile Include="Comm\GenericTcpIpServer.cs" />
|
<Compile Include="Comm\GenericTcpIpServer.cs" />
|
||||||
<Compile Include="EthernetHelper.cs" />
|
<Compile Include="EthernetHelper.cs" />
|
||||||
<Compile Include="Comm\GenericTcpIpClient.cs" />
|
<Compile Include="Comm\GenericTcpIpClient.cs" />
|
||||||
|
|||||||
Binary file not shown.
@@ -4,4 +4,4 @@
|
|||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Pepperdash_Core")]
|
[assembly: AssemblyProduct("Pepperdash_Core")]
|
||||||
[assembly: AssemblyCopyright("Copyright © PepperDash 2016")]
|
[assembly: AssemblyCopyright("Copyright © PepperDash 2016")]
|
||||||
[assembly: AssemblyVersion("1.0.1.*")]
|
[assembly: AssemblyVersion("1.0.3.*")]
|
||||||
|
|||||||
Reference in New Issue
Block a user