GNU Radio's SATNOGS Package
|
AX.25 decoder that supports the legacy hardware radios. More...
#include <ax25_decoder.h>
Public Member Functions | |
ax25_decoder (const std::string &addr, uint8_t ssid, bool promisc=false, bool descramble=true, bool crc_check=true, size_t max_frame_len=512, bool error_correction=false) | |
~ax25_decoder () | |
decoder_status_t | decode (const void *in, int len) |
void | reset () |
![]() | |
int | unique_id () const |
decoder (const std::string &name, const std::string &version, int input_item_size, size_t max_frame_len=8192) | |
virtual | ~decoder () |
virtual size_t | input_multiple () const |
size_t | max_frame_len () const |
int | sizeof_input_item () const |
std::string | name () const |
std::string | version () const |
Static Public Member Functions | |
static decoder::decoder_sptr | make (const std::string &addr, uint8_t ssid, bool promisc=false, bool descramble=true, bool crc_check=true, size_t max_frame_len=512, bool error_correction=false) |
Additional Inherited Members | |
![]() | |
static int | base_unique_id |
![]() | |
void | incr_nitems_read (size_t nitems) |
uint64_t | nitems_read () const |
AX.25 decoder that supports the legacy hardware radios.
This block takes as input a quadrature demodulated bit stream. Each byte should contains only one bit of information at the LSB.
The block will try to find an AX.25 frame. If the frame pass the CRC check then a blob PMT message is produced at the message output indicated with name 'out'. Otherwise if the frame did not pass the CRC check or the size was invalid, a blob PMT message is generated at the output port with the name 'fail'. This will help to recover at least some bytes from a corrupted message.
The block also supports destination callsign check. Only frames with the right destination Callsign will be accepted. This feature can be disabled using the promisc parameter.
gr::satnogs::ax25_decoder::ax25_decoder | ( | const std::string & | addr, |
uint8_t | ssid, | ||
bool | promisc = false , |
||
bool | descramble = true , |
||
bool | crc_check = true , |
||
size_t | max_frame_len = 512 , |
||
bool | error_correction = false |
||
) |
The decoder take as input a quadrature demodulated bit stream. Each byte should contains only one bit of information at the LSB.
The decoder will try to find an AX.25 frame. If the frame pass the CRC check then at the metadata the CRC_VALID option will be set to true, otherwise to false. CRC invalid frames are meaningful because only one bit of error can cause the entire frame to fail. This will help to recover at least some bytes from a corrupted message.
The decoder also supports destination callsign check. Only frames with the right destination Callsign will be accepted. This feature can be disabled using the promisc parameter.
addr | the Callsign of the receiver |
ssid | the SSID of the receiver |
promisc | if set to yes, the Callsign check is disabled |
descramble | if set to yes, the data will be descrambled prior decoding using the G3RUH self-synchronizing descrambler. |
crc_check | bypass the CRC check of the frame |
max_frame_len | the maximum allowed frame length |
error_correction | set to true to enable the 1-bit error correction |
gr::satnogs::ax25_decoder::~ax25_decoder | ( | ) |
|
virtual |
Decodes a buffer of input items contained in the in buffer. This method is called continuously by the frame_decoder. Based on the returned status data, the frame_decoder() instructs properly the GNU Radio scheduler and/or propagates decoded data.
As the number of input items may not enough to decode a frame, each decoder should keep internal state, so decoding can be accomplished after an arbitrary number of calls to this method
in | the input items |
nitems | the number of input items contained in the in buffer |
Implements gr::satnogs::decoder.
|
static |
The decoder take as input a quadrature demodulated bit stream. Each byte should contains only one bit of information at the LSB.
The decoder will try to find an AX.25 frame. If the frame pass the CRC check then at the metadata the CRC_VALID option will be set to true, otherwise to false. CRC invalid frames are meaningful because only one bit of error can cause the entire frame to fail. This will help to recover at least some bytes from a corrupted message.
The decoder also supports destination callsign check. Only frames with the right destination Callsign will be accepted. This feature can be disabled using the promisc parameter.
addr | the Callsign of the receiver |
ssid | the SSID of the receiver |
promisc | if set to yes, the Callsign check is disabled |
descramble | if set to yes, the data will be descrambled prior decoding using the G3RUH self-synchronizing descrambler. |
max_frame_len | the maximum allowed frame length |
error_correction | set to true to enable the 1-bit error correction |
|
virtual |
Resets the internal state of the decoder to the initial defaults
Implements gr::satnogs::decoder.