mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 21:24:43 +00:00
Minor updates to tcp client
This commit is contained in:
@@ -307,6 +307,7 @@ namespace PepperDash.Core
|
||||
{
|
||||
//if (Debug.Level == 2)
|
||||
// Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user