Skip to content

Commit

Permalink
fix exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Beegan committed Apr 12, 2024
1 parent fc92899 commit dad2fcd
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ this wouldn't work without them***
import 'dart:io';
import 'package:reverse_beacon/reverse_beacon.dart';
import 'package:reverse_beacon/src/cw_spot.dart';
import 'package:reverse_beacon/src/reverse_beacon_base.dart';
void main() async {
var rb = ReverseBeacon();
Expand Down Expand Up @@ -56,7 +58,6 @@ void main() async {
});
}
```

**Output Ex.**
Expand Down
2 changes: 2 additions & 0 deletions example/reverse_beacon_example.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:io';

import 'package:reverse_beacon/reverse_beacon.dart';
import 'package:reverse_beacon/src/cw_spot.dart';
import 'package:reverse_beacon/src/reverse_beacon_base.dart';

void main() async {
var rb = ReverseBeacon();
Expand Down
7 changes: 5 additions & 2 deletions lib/reverse_beacon.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

library;

export 'src/reverse_beacon_base.dart';
export 'src/cw_spot.dart';
export 'package:reverse_beacon/reverse_beacon.dart';
export 'package:reverse_beacon/src/band.dart';
export 'package:reverse_beacon/src/exceptions.dart';
export 'package:reverse_beacon/src/mode.dart';
export 'package:reverse_beacon/src/spot.dart';
export 'package:reverse_beacon/src/spot_type.dart';
export 'package:reverse_beacon/src/digi_spot.dart';
export 'package:reverse_beacon/src/core/utilities.dart';
export 'package:reverse_beacon/src/core/validators.dart';
1 change: 1 addition & 0 deletions lib/src/cw_spot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:reverse_beacon/src/core/utilities.dart';

import 'spot.dart';

/// Represents an CW or RTTY spot
class CWSpot extends Spot {
final int wpm;
const CWSpot(
Expand Down
1 change: 1 addition & 0 deletions lib/src/digi_spot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:reverse_beacon/src/spot.dart';
import 'package:reverse_beacon/src/spot_type.dart';
import 'package:reverse_beacon/src/core/utilities.dart';

/// Represents an FT8 or FT4 spot
class DigiSpot extends Spot {
final String? gridSquare;
const DigiSpot(
Expand Down
2 changes: 2 additions & 0 deletions lib/src/exceptions.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// Exception thrown when an invalid callsign is passed
class InvalidCallsignException implements Exception {}

/// Exception thrown when any type of telent communication issue is encountered
class TelnetCommunicationException implements Exception {}
2 changes: 2 additions & 0 deletions lib/src/mode.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/// Represents a ham radio communication mode
enum Mode {
cw,
ft8,
ft4,
rtty,
na;

/// parses Mode from a string
static Mode fromString(String modeStr) {
modeStr = modeStr.toUpperCase();
switch (modeStr) {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/reverse_beacon_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const int cwPort = 7000;
const int digiPort = 7001;
const int timeout = 25;

/// A controller object that manages two telnet connections to telnet.reversebeacon.net
/// Creates and exposes one stream of spots from both digital and cw telnet servers
class ReverseBeacon {
Socket? _cwSocket;
Socket? _digiSocket;
Expand Down
1 change: 1 addition & 0 deletions lib/src/spot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:reverse_beacon/src/band.dart';
import 'package:reverse_beacon/src/mode.dart';
import 'package:reverse_beacon/src/spot_type.dart';

/// Represents a station spot as identified by the reverse beacon network
class Spot {
final String skimmerCall;
final double frequency;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/spot_type.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// Represents a spot type as identified by reverse beacon network
enum SpotType {
cq,
beacon,
Expand All @@ -6,6 +7,7 @@ enum SpotType {
ncdxf,
unknown;

/// converts a string to a spot type
static SpotType fromString(String rawType) {
switch (rawType.toUpperCase().split(' ').first) {
case 'CQ':
Expand Down
2 changes: 1 addition & 1 deletion test/reverse_beacon_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:reverse_beacon/reverse_beacon.dart';
import 'package:reverse_beacon/src/spot.dart';
import 'package:reverse_beacon/src/reverse_beacon_base.dart';
import 'package:test/test.dart';

void main(){
Expand Down

0 comments on commit dad2fcd

Please sign in to comment.