diff --git a/SharpCAT/Docs/Radios/Icom/ID4100a/advanced-manual.pdf b/SharpCAT/Docs/Radios/Icom/ID4100a/advanced-manual.pdf
new file mode 100644
index 0000000..26336ae
Binary files /dev/null and b/SharpCAT/Docs/Radios/Icom/ID4100a/advanced-manual.pdf differ
diff --git a/SharpCAT/Models/CATRadio.cs b/SharpCAT/Models/CATRadio.cs
index e12d0ca..8209480 100644
--- a/SharpCAT/Models/CATRadio.cs
+++ b/SharpCAT/Models/CATRadio.cs
@@ -52,7 +52,7 @@
partial void GetFreqAndModeStatus();
}
- public class Lock
+ public partial class Lock
{
public static readonly string ON;
public static readonly string OFF;
diff --git a/SharpCAT/Radios/Yaesu/FT818.cs b/SharpCAT/Radios/Yaesu/FT818.cs
index e2dc4ef..10e7c37 100644
--- a/SharpCAT/Radios/Yaesu/FT818.cs
+++ b/SharpCAT/Radios/Yaesu/FT818.cs
@@ -6,8 +6,8 @@ namespace SharpCATLib.Models.Radios.Yaesu
{
public string RadioMfg => "Yaesu";
public string RadioModel => "FT-818";
- public string CmdPad => "00000000";
-
+
+ public string CmdPad => "00000000";
public class Lock
{
diff --git a/SharpCAT/SerialClient.cs b/SharpCAT/SerialClient.cs
new file mode 100644
index 0000000..a8a16a7
--- /dev/null
+++ b/SharpCAT/SerialClient.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SharpCATLib
+{
+ class SerialClient
+ {
+ }
+}
diff --git a/SharpCAT/SharpCAT.cs b/SharpCAT/SharpCAT.cs
index aeb532f..f3b1c05 100644
--- a/SharpCAT/SharpCAT.cs
+++ b/SharpCAT/SharpCAT.cs
@@ -1,24 +1,29 @@
-using System;
+using SharpCATLib;
+using System;
using System.IO.Ports;
namespace SharpCATLib
{
public class SharpCAT
{
+ delegate string OnPortsSelected(string[] portnames);
+
+ event OnPortsSelected PortsSelected;
+
public SharpCAT()
{
- PortsSelected += new EventHandler(OnPortsSelected);
+ PortsSelected += new OnPortsSelected(ConnectPorts);
}
- public event EventHandler PortsSelected;
- public void OnSetPortsToUse()
+ private string[] _portstouse;
+ public string[] PortsToUse
{
- PortsSelected?.Invoke(this, EventArgs.Empty);
- }
-
- private void OnPortsSelected(object s, EventArgs e)
- {
- //Init and start the serial ports selected.
+ get => _portstouse;
+ set
+ {
+ _portstouse = value;
+ PortsSelected.Invoke(_portstouse);
+ }
}
public double[] CTCSSTones = { 67.0, 69.3, 71.9, 74.4, 77.0, 79.7, 82.5, 85.4, 88.5,
@@ -40,10 +45,14 @@ namespace SharpCATLib
public static int[] DataBits { get; } = new int[] { 7, 8 };
- private readonly string CmdPad = "00000000";
+ public static string[] RadioTypes { get; } = new string[] { "CAT", "CIV" };
- private SerialPort[] PortsToUse;
+ private readonly string CATCmdPad = "00000000";
+ private string ConnectPorts(string[] portnames)
+ {
+ return "";
+ }
}
}
\ No newline at end of file
diff --git a/SharpCAT/Socket.cs b/SharpCAT/Socket.cs
new file mode 100644
index 0000000..89ea75b
--- /dev/null
+++ b/SharpCAT/Socket.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SharpCATLib
+{
+ class Socket
+ {
+ }
+}
diff --git a/SharpCATConsole/Program.cs b/SharpCATConsole/Program.cs
index f59ea6e..2fdc4ba 100644
--- a/SharpCATConsole/Program.cs
+++ b/SharpCATConsole/Program.cs
@@ -12,6 +12,7 @@ namespace SharpCATConsole
static void Main(string[] args)
{
SharpCAT sharpCAT = new SharpCAT();
+
Console.WriteLine("Ports found: ");
foreach (var port in sharpCAT.PortNames)
{
@@ -20,5 +21,10 @@ namespace SharpCATConsole
Console.ReadKey();
}
+
+ private static string SharpCAT_PortsSelected(string[] portnames)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/SharpCATService/SharpCATService.csproj b/SharpCATService/SharpCATService.csproj
index d05108c..870fe66 100644
--- a/SharpCATService/SharpCATService.csproj
+++ b/SharpCATService/SharpCATService.csproj
@@ -58,5 +58,11 @@
+
+
+ {dad3e7be-905a-4768-a695-0bcf96171e35}
+ SharpCATLib
+
+
\ No newline at end of file