mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 12:06:29 +00:00
Minor updates to tcp client
This commit is contained in:
parent
44c9bcb788
commit
adf7fd05ae
2 changed files with 118 additions and 109 deletions
|
|
@ -307,7 +307,8 @@ namespace PepperDash.Core
|
|||
{
|
||||
//if (Debug.Level == 2)
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,11 +39,13 @@ namespace PepperDash.Core
|
|||
Key = key;
|
||||
if (key.Contains('.')) Debug.Console(0, this, "WARNING: Device name's should not include '.'");
|
||||
Name = "";
|
||||
|
||||
}
|
||||
|
||||
public Device(string key, string name) : this(key)
|
||||
{
|
||||
Name = name;
|
||||
|
||||
}
|
||||
|
||||
//public Device(DeviceConfig config)
|
||||
|
|
@ -52,6 +54,11 @@ namespace PepperDash.Core
|
|||
// Config = config;
|
||||
//}
|
||||
|
||||
public void EnableUsageTracker()
|
||||
{
|
||||
UsageTracker = new UsageTracker();
|
||||
}
|
||||
|
||||
public void AddPreActivationAction(Action act)
|
||||
{
|
||||
if (_PreActivationActions == null)
|
||||
|
|
@ -105,5 +112,6 @@ namespace PepperDash.Core
|
|||
{
|
||||
if (o is bool && !(bool)o) a();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue