考虑RTK数据采用发送---未完成
This commit is contained in:
parent
fb17c0a3f9
commit
e2ea96ed56
@ -9,6 +9,7 @@ namespace Plane.Communication
|
||||
internal class UdpServerConnection : UdpConnectionBase
|
||||
{
|
||||
private IPEndPoint _remoteEP;
|
||||
private IPEndPoint _boardaddEP;
|
||||
|
||||
private Func<byte[], int, IPEndPoint, Task<int>> _sendFunc;
|
||||
|
||||
@ -17,6 +18,7 @@ namespace Plane.Communication
|
||||
/// </summary>
|
||||
public UdpServerConnection(IPEndPoint remoteEP, Func<byte[], int, IPEndPoint, Task<int>> sendFunc)
|
||||
{
|
||||
_boardaddEP = new IPEndPoint(IPAddress.Parse("192.168.62.255"), remoteEP.Port);
|
||||
_remoteEP = remoteEP;
|
||||
_sendFunc = sendFunc;
|
||||
}
|
||||
@ -37,6 +39,13 @@ namespace Plane.Communication
|
||||
try
|
||||
{
|
||||
await _sendFunc(datagram, bytes, _remoteEP).ConfigureAwait(false);
|
||||
/*
|
||||
//如果是广播包,用于广播消息,比如RTK等
|
||||
if (false)
|
||||
await _sendFunc(datagram, bytes, _boardaddEP).ConfigureAwait(false);
|
||||
else
|
||||
await _sendFunc(datagram, bytes, _remoteEP).ConfigureAwait(false);
|
||||
*/
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user