You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
656 B
40 lines
656 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Bridge
|
|
{
|
|
class WiFiImplementor : INetworkImplementor
|
|
{
|
|
private byte[] data;
|
|
public bool Connect()
|
|
{
|
|
Console.WriteLine("WiFi: Connect");
|
|
return true;
|
|
}
|
|
|
|
public bool Disconnect()
|
|
{
|
|
Console.WriteLine("WiFi: Disconnect");
|
|
return true;
|
|
}
|
|
|
|
public byte[] Receive()
|
|
{
|
|
return this.data;
|
|
}
|
|
|
|
public void Send(byte[] data)
|
|
{
|
|
this.data = data;
|
|
Console.WriteLine($"WiFi: Send");
|
|
foreach (byte b in data)
|
|
{
|
|
Console.Write($"{b.ToString("X2")} ");
|
|
}
|
|
Console.WriteLine();
|
|
}
|
|
}
|
|
}
|
|
|