|
|
@ -18,7 +18,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
public static string PortCOM2 { get; set; } |
|
|
|
public static string PortCOM3 { get; set; } |
|
|
|
public static string PortCOM4 { get; set; } |
|
|
|
public static void SCAPI(string dat) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static async Task PortClient(SerialPortClient portclient, string com, int BAUD) |
|
|
|
{ |
|
|
@ -31,8 +34,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
{ |
|
|
|
_responseEvent.Set(); |
|
|
|
string DAT = e.ByteBlock.Span.ToString(Encoding.UTF8); |
|
|
|
//string DAT1 = CRCcheck16.ToCRC16(e.ByteBlock.Span.ToString(Encoding.UTF8));
|
|
|
|
|
|
|
|
SCAPI(DAT); |
|
|
|
return EasyTask.CompletedTask; ; |
|
|
|
}; |
|
|
|
|
|
|
@ -64,7 +66,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
_responseEvent2.Set(); |
|
|
|
string DAT = e.ByteBlock.Span.ToString(Encoding.UTF8); |
|
|
|
//string DAT1 = CRCcheck16.ToCRC16(e.ByteBlock.Span.ToString(Encoding.UTF8));
|
|
|
|
|
|
|
|
SCAPI(DAT); |
|
|
|
return EasyTask.CompletedTask; ; |
|
|
|
}; |
|
|
|
|
|
|
@ -96,7 +98,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
_responseEvent3.Set(); |
|
|
|
string DAT = e.ByteBlock.Span.ToString(Encoding.UTF8); |
|
|
|
//string DAT1 = CRCcheck16.ToCRC16(e.ByteBlock.Span.ToString(Encoding.UTF8));
|
|
|
|
|
|
|
|
SCAPI(DAT); |
|
|
|
return EasyTask.CompletedTask; ; |
|
|
|
}; |
|
|
|
|
|
|
@ -128,7 +130,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
_responseEvent4.Set(); |
|
|
|
string DAT = e.ByteBlock.Span.ToString(Encoding.UTF8); |
|
|
|
//string DAT1 = CRCcheck16.ToCRC16(e.ByteBlock.Span.ToString(Encoding.UTF8));
|
|
|
|
|
|
|
|
SCAPI(DAT); |
|
|
|
return EasyTask.CompletedTask; ; |
|
|
|
}; |
|
|
|
|
|
|
|