kopia lustrzana https://github.com/mobilinkd/tnc3-firmware
Add digi implementation notes.
rodzic
383a751a9f
commit
a9ef136d41
|
@ -5,6 +5,23 @@
|
|||
#include "Digipeater.h"
|
||||
#include "IOEventTask.h"
|
||||
|
||||
/*
|
||||
* APRS Digipeater implementation.
|
||||
*
|
||||
* Note that these rules are for digipeating only. We have other rules for
|
||||
* packets sent to this station directly.
|
||||
*
|
||||
* 0. Ignore all packets that are not UI packets.
|
||||
* 1. Ignore all packets with destination address == MYCALL or any ALIASES.
|
||||
* 2. Compute CRC32 on source and destination address, and information fields.
|
||||
* 3. Ignore all packets with same CRC32 heard in past 30 seconds.
|
||||
* 4. Ignore all digipeated VIA entries.
|
||||
* 5. Find VIA entries matching preempted aliases.
|
||||
* 5.1. http://www.aprs.org/aprs12/preemptive-digipeating.txt
|
||||
* 6. Find first non-digipeated VIA entry.
|
||||
* 6.1. If it matches one of our set and used aliases, relay.
|
||||
*/
|
||||
|
||||
void startDigipeaterTask(void* arg)
|
||||
{
|
||||
using mobilinkd::tnc::Digipeater;
|
||||
|
|
|
@ -57,6 +57,7 @@ struct Digipeater
|
|||
/**
|
||||
* Can the frame be digipeated?
|
||||
*
|
||||
* - Is it a UI frame
|
||||
* - Does it match an active digi alias?
|
||||
* - set = true
|
||||
* - use = true
|
||||
|
@ -65,11 +66,12 @@ struct Digipeater
|
|||
* matches any frame via.
|
||||
* - Does it not exist in history?
|
||||
* @param frame
|
||||
* @return
|
||||
* @return nullptr if the frame cannot be digipeated, otherwise a pointer
|
||||
* to the alias that it matched.
|
||||
*/
|
||||
bool can_repeat(hdlc::IoFrame* frame)
|
||||
const kiss::Alias* can_repeat(hdlc::IoFrame* frame)
|
||||
{
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
hdlc::IoFrame* rewrite_frame(hdlc::IoFrame* frame)
|
||||
|
|
Ładowanie…
Reference in New Issue