From 6d44940b125e0cf416ca2f92ba4f35a96f8aec43 Mon Sep 17 00:00:00 2001 From: Cameron Bielstein Date: Mon, 12 May 2025 22:47:46 -0700 Subject: [PATCH 1/3] Simple nuget readme. --- src/AprsIsClient/AprsIsClient.csproj | 5 ++ src/AprsIsClient/README.md | 72 ++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 src/AprsIsClient/README.md diff --git a/src/AprsIsClient/AprsIsClient.csproj b/src/AprsIsClient/AprsIsClient.csproj index 6899a1b..97a582f 100644 --- a/src/AprsIsClient/AprsIsClient.csproj +++ b/src/AprsIsClient/AprsIsClient.csproj @@ -14,6 +14,11 @@ AprsSharp.AprsIsClient Library for sending and receiving packets through the Automatic Packet Reporting System Internet Service (APRS-IS) ham radio;amateur radio;packet radio;radio;APRS;Automatic Packet Reporting System;Automatic Packet Reporting System Internet System;APRS-IS; + README.md + + + + diff --git a/src/AprsIsClient/README.md b/src/AprsIsClient/README.md new file mode 100644 index 0000000..21df1c0 --- /dev/null +++ b/src/AprsIsClient/README.md @@ -0,0 +1,72 @@ +# AprsSharp.AprsIsClient + +`AprsSharp.AprsIsClient` is part of the [AprsSharp Project](https://github.com/CBielstein/APRSsharp). +`AprsIsClient` aims to be a simple library for interacting with the Automatic Packet Reporting System-Internet Service. + +APRS-IS uses TCP messages and specific encodings to communicate amateur radio packets. +This library abstracts those aspects away. + +Currently, only receiving packets is implemented. +The only outgoing communication to the server is that required for authorization and configuration. +Packets cannot be sent via APRS-IS at this time. + +## Getting started + +This package can be installed via [nuget.org](https://www.nuget.org): +[AprsSharp.AprsIsClient on nuget.org](https://www.nuget.org/packages/AprsSharp.AprsIsClient). + +A simple meethod is via the command line: + +```bash +dotnet add package AprsSharp.AprsIsClient +``` + +## Usage + +AprsIsClient uses an event driven framework. +Major steps are to create a client, define callbacks, and then begin receiving. +See the code snippet below for examples. + +```csharp +using AprsSharp.AprsIsClient; + +// Create a client +using AprsIsClient aprsIs = new AprsIsClient(); + +// Print the sender and type of packet received. +aprsIs.ReceivedPacket += packet => { + Console.WriteLine(packet.Sender); + Console.WriteLine(packet.InfoField.Type); +}; + +// Optionally, you can print when the server connection changes state. +aprsIs.ChangedState += state => Console.WriteLine($"New state: {state} on server {aprsIs.ConnectedServer}"); + +// If you'd rather read the TCP messages directly, you can subscribe to those events +aprsIs.ReceivedTcpMessage += message => Console.WriteLine($"New TCP message: {message}"); + +// And if you'd like to see error messages, you can subscribe to those +aprsIs.DecodeFailed += (ex, message) => Console.WriteLine($"Failed to decode message {message} with exception {ex}"); + +// Once you've configured your events, begin receiving! +// Assuming `callsign` and `password` are variables, this connects to +// a server on the main rotation and requests all packets of type == message (t/m) +// You can read more about filter commands here: https://www.aprs-is.net/javAPRSFilter.aspx +// +// The `await` here is optional and may not be desirable if you're expecting additional input. +// If you're writing a simple script, the await is helpful to ensure your application doesn't terminate. +// The await will not return until AprsIsClient is instructed to stop receiving. +await aprsIs.Receive(callsign, password, "rotate.aprs2.net", "t/m"); +``` + +## Additional documentation + +For more information, you can visit: + +* [AprsSharp on GitHub](https://github.com/CBielstein/APRSsharp) +* APRS-IS documentation on [aprs-is.net](https://www.aprs-is.net/) +* APRS documentation on [aprs.org](https://www.aprs.org/) + +## Feedback + +Bugs, feedback, and feature requests can be filed via [GitHub Issues on the AprsSharp repository](https://github.com/CBielstein/APRSsharp/issues). From c01a9c817c7165f06dba98d8fa4ede113d43a2a0 Mon Sep 17 00:00:00 2001 From: Cameron Bielstein Date: Mon, 12 May 2025 22:51:20 -0700 Subject: [PATCH 2/3] Update readme title. --- README.md | 1 + src/AprsIsClient/AprsIsClient.csproj | 4 ++-- src/AprsIsClient/{README.md => AprsIsClient.md} | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename src/AprsIsClient/{README.md => AprsIsClient.md} (100%) diff --git a/README.md b/README.md index f7e3c97..c8e88a6 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ See supplemental documentation for APRS# constituent projects: * [AprsParser](src/AprsParser/AprsParser.md) * [KissTnc](src/KissTnc/KissTnc.md) +* [AprsIsClient](src/AprsIsClient/AprsIsClient.md) ## Contributions diff --git a/src/AprsIsClient/AprsIsClient.csproj b/src/AprsIsClient/AprsIsClient.csproj index 97a582f..b56c5e3 100644 --- a/src/AprsIsClient/AprsIsClient.csproj +++ b/src/AprsIsClient/AprsIsClient.csproj @@ -14,11 +14,11 @@ AprsSharp.AprsIsClient Library for sending and receiving packets through the Automatic Packet Reporting System Internet Service (APRS-IS) ham radio;amateur radio;packet radio;radio;APRS;Automatic Packet Reporting System;Automatic Packet Reporting System Internet System;APRS-IS; - README.md + AprsIsClient.md - + diff --git a/src/AprsIsClient/README.md b/src/AprsIsClient/AprsIsClient.md similarity index 100% rename from src/AprsIsClient/README.md rename to src/AprsIsClient/AprsIsClient.md From c13b105c59a7585041e3c6d877310821444085b8 Mon Sep 17 00:00:00 2001 From: Cameron Bielstein Date: Mon, 12 May 2025 22:57:36 -0700 Subject: [PATCH 3/3] Fixes for markdown linting. --- src/AprsIsClient/AprsIsClient.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/AprsIsClient/AprsIsClient.md b/src/AprsIsClient/AprsIsClient.md index 21df1c0..6dbf1ba 100644 --- a/src/AprsIsClient/AprsIsClient.md +++ b/src/AprsIsClient/AprsIsClient.md @@ -1,13 +1,15 @@ # AprsSharp.AprsIsClient `AprsSharp.AprsIsClient` is part of the [AprsSharp Project](https://github.com/CBielstein/APRSsharp). -`AprsIsClient` aims to be a simple library for interacting with the Automatic Packet Reporting System-Internet Service. +`AprsIsClient` aims to be a simple library for interacting with the Automatic +Packet Reporting System-Internet Service. APRS-IS uses TCP messages and specific encodings to communicate amateur radio packets. This library abstracts those aspects away. Currently, only receiving packets is implemented. -The only outgoing communication to the server is that required for authorization and configuration. +The only outgoing communication to the server is that required for +authorization and configuration. Packets cannot be sent via APRS-IS at this time. ## Getting started @@ -40,22 +42,27 @@ aprsIs.ReceivedPacket += packet => { }; // Optionally, you can print when the server connection changes state. -aprsIs.ChangedState += state => Console.WriteLine($"New state: {state} on server {aprsIs.ConnectedServer}"); +aprsIs.ChangedState += state => + Console.WriteLine($"State: {state} on server {aprsIs.ConnectedServer}"); // If you'd rather read the TCP messages directly, you can subscribe to those events -aprsIs.ReceivedTcpMessage += message => Console.WriteLine($"New TCP message: {message}"); +aprsIs.ReceivedTcpMessage += message => + Console.WriteLine($"New TCP message: {message}"); // And if you'd like to see error messages, you can subscribe to those -aprsIs.DecodeFailed += (ex, message) => Console.WriteLine($"Failed to decode message {message} with exception {ex}"); +aprsIs.DecodeFailed += (ex, message) => + Console.WriteLine($"Failed to decode message {message} with exception {ex}"); // Once you've configured your events, begin receiving! // Assuming `callsign` and `password` are variables, this connects to -// a server on the main rotation and requests all packets of type == message (t/m) -// You can read more about filter commands here: https://www.aprs-is.net/javAPRSFilter.aspx +// a server on the main rotation and requests all packets of +// type == message (t/m). You can read more about filter commands here: +// https://www.aprs-is.net/javAPRSFilter.aspx // -// The `await` here is optional and may not be desirable if you're expecting additional input. -// If you're writing a simple script, the await is helpful to ensure your application doesn't terminate. -// The await will not return until AprsIsClient is instructed to stop receiving. +// The `await` here is optional and may not be desirable if you're expecting +// additional input. If you're writing a simple script, the await is helpful +// to ensure your application doesn't terminate. The await will not return +// until AprsIsClient is instructed to stop receiving. await aprsIs.Receive(callsign, password, "rotate.aprs2.net", "t/m"); ``` @@ -69,4 +76,5 @@ For more information, you can visit: ## Feedback -Bugs, feedback, and feature requests can be filed via [GitHub Issues on the AprsSharp repository](https://github.com/CBielstein/APRSsharp/issues). +Bugs, feedback, and feature requests can be filed via +[GitHub Issues on the AprsSharp repository](https://github.com/CBielstein/APRSsharp/issues).