added IDataconverter interface

This commit is contained in:
shinichi
2020-09-09 11:35:54 +02:00
parent 213a098356
commit 8dce607028
4 changed files with 29 additions and 8 deletions

View File

@@ -2,9 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace ProftaakRH namespace Hardware
{ {
class Class1 class BLEReciever
{ {
IDataConverter dataConverter;
} }
} }

View File

@@ -2,9 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace ProftaakRH namespace Hardware.Simulators
{ {
class Class1 class BikeSimulator
{ {
IDataConverter dataConverter;
} }
} }

View File

@@ -2,9 +2,24 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace ProftaakRH namespace Hardware
{ {
class DataConverter class DataConverter : IDataConverter
{ {
public void Bike(byte[] bytes)
{
throw new NotImplementedException();
}
public void BPM(byte[] bytes)
{
throw new NotImplementedException();
}
}
interface IDataConverter
{
void BPM(byte[] bytes);
void Bike(byte[] bytes);
} }
} }

View File

@@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Hardware.Simulators;
using Hardware;
namespace FietsDemo namespace FietsDemo
{ {
@@ -12,8 +14,10 @@ namespace FietsDemo
static void Main(string[] args) static void Main(string[] args)
{ {
foo foo = new foo(); foo foo = new foo();
BLEReceiver bLEReceiver = new BLEReceiver(foo); //BLEReceiver bLEReceiver = new BLEReceiver(foo);
bLEReceiver.ConnectToBLE();
//bLEReceiver.ConnectToBLE();
Console.Read(); Console.Read();
} }