32 lines
925 B
C#
32 lines
925 B
C#
namespace CommonConsole
|
|
{
|
|
using Common.Hardware.Interfaces.Ports;
|
|
using Common.Hardware.Interfaces.Ports.SIRT;
|
|
|
|
using System;
|
|
|
|
public static class Program
|
|
{
|
|
public static void Main()
|
|
{
|
|
var broadcaster = new SirtBroadcaster(new SerialPortSettings
|
|
{
|
|
BaudRate = SerialPortBaudRate.X115200,
|
|
DataBits = SerialPortDataBits.X8,
|
|
Parity = SerialPortParity.None,
|
|
PortName = "COM6",
|
|
StopBits = SerialPortStopBits.One,
|
|
RWTimeout = -1
|
|
});
|
|
broadcaster.Open();
|
|
|
|
Console.WriteLine($"READY: {broadcaster.Ready}");
|
|
Console.WriteLine($"SIRT-ID: {broadcaster.SirtId}");
|
|
Console.WriteLine($"FREQUENCY: {broadcaster.Frequency:0 MHz}");
|
|
|
|
Console.ReadKey();
|
|
|
|
broadcaster.Close();
|
|
}
|
|
}
|
|
} |