Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/samedec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ readme = "README.md"

[dependencies]
sameold = {path = "../sameold", version = "^0.5.0"}
sameplace = {path = "../sameplace", version = "^0.1.0", features = ["chrono"]}
anyhow = "^1"
byteorder = "^1.4"
clap = {version = "^4.5", features = ["color", "derive", "wrap_help"]}
Expand Down
14 changes: 2 additions & 12 deletions crates/sameold/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,18 @@ repository = "https://github.com/cbs228/sameold.git"
readme = "README.md"

[dependencies]
sameplace = {path = "../sameplace", version = "^0.1"}
arrayvec = "^0.7.1"
arraydeque = "^0.5"
lazy_static = "^1.4.0"
log = "0.4"
nalgebra = "^0.33.2"
num-complex = "^0.4"
num-traits = "^0.2"
phf = {version = "^0.11", features = ["macros"]}
regex = "^1.5.5"
slice-ring-buffer = "^0.3"
strum = "^0.26"
strum_macros = "^0.26"
thiserror = "^2.0"

[dev-dependencies]
assert_approx_eq = "1.1.0"

[dependencies.chrono]
version = "^0.4"
default-features = false
features = ["clock", "std"]
optional = true

[features]
default = ["chrono"]
chrono = ["sameplace/chrono"]
9 changes: 7 additions & 2 deletions crates/sameold/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ is decoded.
| 3 | Error correction (bit voting) |

SAME messages are always transmitted three times, in separate "bursts," for
redundancy. When decoding the start of message *headers* (`ZCZC`), `samedec`
redundancy. When decoding the start of message *headers* (`ZCZC`), `sameold`
will use all three bursts together to improve decoding—if possible.

If one retransmission is missed, `samedec` will automatically fall back to
If one retransmission is missed, `sameold` will automatically fall back to
decoding with only two bursts. The decoder imposes a delay of approximately
**1.311 seconds** on all received headers. This delay is not usually
problematic as most SAME messages are prefixed with a Warning Alarm Tone that
Expand Down Expand Up @@ -129,6 +129,11 @@ carrier signals before and during message decoding.

### Interpreting Messages

> Message decoding and interpretation is provided by the
> [`sameplace`](https://docs.rs/sameplace/latest/sameplace/)
> crate. `sameold` re-exports the `sameplace::Message` API
> for ease-of-use.

The [`Message`](https://docs.rs/sameold/latest/sameold/enum.Message.html) type
marks the start or end of a SAME message. The actual "message" part of a SAME
message is the audio itself, which should contain a voice message that
Expand Down
248 changes: 0 additions & 248 deletions crates/sameold/src/eventcodes.rs

This file was deleted.

16 changes: 11 additions & 5 deletions crates/sameold/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
//! | 3 | Error correction (bit voting) |
//!
//! SAME messages are always transmitted three times, in separate "bursts," for
//! redundancy. When decoding the start of message *headers* (`ZCZC`), `samedec`
//! redundancy. When decoding the start of message *headers* (`ZCZC`), `sameold`
//! will use all three bursts together to improve decoding—if possible.
//!
//! If one retransmission is missed, `samedec` will automatically fall back to
//! If one retransmission is missed, `sameold` will automatically fall back to
//! decoding with only two bursts. The decoder imposes a delay of approximately
//! **1.311 seconds** on all received headers. This delay is not usually
//! problematic as most SAME messages are prefixed with a Warning Alarm Tone that
Expand Down Expand Up @@ -125,6 +125,11 @@
//!
//! ### Interpreting Messages
//!
//! > Message decoding and interpretation is provided by the
//! > [`sameplace`](https://docs.rs/sameplace/latest/sameplace/)
//! > crate. `sameold` re-exports the `sameplace::Message` API
//! > for ease-of-use.
//!
//! The [`Message`] type marks the start or end of a SAME message. The
//! actual "message" part of a SAME message is the audio itself, which
//! should contain a voice message that
Expand Down Expand Up @@ -229,14 +234,15 @@
#![deny(unsafe_code)]
#![warn(missing_docs)]

pub mod eventcodes;
mod message;
mod receiver;

pub use message::{
// re-export sameplace's public API
pub use sameplace::eventcodes;
pub use sameplace::{
EventCode, InvalidDateErr, Message, MessageDecodeErr, MessageHeader, MessageResult, Originator,
Phenomenon, SignificanceLevel,
};

pub use receiver::{
EqualizerBuilder, LinkState, SameEventType, SameReceiver, SameReceiverBuilder,
SameReceiverEvent, TransportState,
Expand Down
Loading