mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-07 16:36:35 +08:00
从Serein.Library分离了WebSocket/Modbus;新增了Json门户类,用于未来的Http、WebSocket、Mqtt、gRPC、QUIC扩展。
This commit is contained in:
11
Serein.Proto.Modbus/HexExtensions.cs
Normal file
11
Serein.Proto.Modbus/HexExtensions.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Serein.Proto.Modbus
|
||||
{
|
||||
public static class HexExtensions
|
||||
{
|
||||
public static string ToHexString(this byte[] data, string separator = " ")
|
||||
{
|
||||
if (data == null) return string.Empty;
|
||||
return BitConverter.ToString(data).Replace("-", separator);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user