GNU Radio's DSD Package
dsd.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <math.h>
#include <mbelib.h>
#include <sndfile.h>
#include "p25p1_heuristics.h"

Go to the source code of this file.

Classes

struct  dsd_opts
struct  dsd_state

Macros

#define __USE_XOPEN
#define SAMPLE_RATE_IN   48000
#define SAMPLE_RATE_OUT   8000
#define INV_P25P1_SYNC   "333331331133111131311111"
#define P25P1_SYNC   "111113113311333313133333"
#define X2TDMA_BS_VOICE_SYNC   "113131333331313331113311"
#define X2TDMA_BS_DATA_SYNC   "331313111113131113331133"
#define X2TDMA_MS_DATA_SYNC   "313113333111111133333313"
#define X2TDMA_MS_VOICE_SYNC   "131331111333333311111131"
#define DSTAR_HD   "131313131333133113131111"
#define INV_DSTAR_HD   "313131313111311331313333"
#define DSTAR_SYNC   "313131313133131113313111"
#define INV_DSTAR_SYNC   "131313131311313331131333"
#define NXDN_MS_DATA_SYNC   "313133113131111333"
#define INV_NXDN_MS_DATA_SYNC   "131311331313333111"
#define NXDN_MS_VOICE_SYNC   "313133113131113133"
#define INV_NXDN_MS_VOICE_SYNC   "131311331313331311"
#define INV_NXDN_BS_DATA_SYNC   "131311331313333131"
#define NXDN_BS_DATA_SYNC   "313133113131111313"
#define INV_NXDN_BS_VOICE_SYNC   "131311331313331331"
#define NXDN_BS_VOICE_SYNC   "313133113131113113"
#define DMR_BS_DATA_SYNC   "313333111331131131331131"
#define DMR_BS_VOICE_SYNC   "131111333113313313113313"
#define DMR_MS_DATA_SYNC   "311131133313133331131113"
#define DMR_MS_VOICE_SYNC   "133313311131311113313331"
#define INV_PROVOICE_SYNC   "31313111333133133311331133113311"
#define PROVOICE_SYNC   "13131333111311311133113311331133"
#define INV_PROVOICE_EA_SYNC   "13313133113113333311313133133311"
#define PROVOICE_EA_SYNC   "31131311331331111133131311311133"

Functions

void processDMRdata (dsd_opts *opts, dsd_state *state)
void processDMRvoice (dsd_opts *opts, dsd_state *state)
void processAudio (dsd_opts *opts, dsd_state *state)
void writeSynthesizedVoice (dsd_opts *opts, dsd_state *state)
void playSynthesizedVoice (dsd_opts *opts, dsd_state *state)
void openAudioOutDevice (dsd_opts *opts, int speed)
void openAudioInDevice (dsd_opts *opts)
int getDibit (dsd_opts *opts, dsd_state *state)
int get_dibit_and_analog_signal (dsd_opts *opts, dsd_state *state, int *out_analog_signal)
void skipDibit (dsd_opts *opts, dsd_state *state, int count)
void saveImbe4400Data (dsd_opts *opts, dsd_state *state, char *imbe_d)
void saveAmbe2450Data (dsd_opts *opts, dsd_state *state, char *ambe_d)
int readImbe4400Data (dsd_opts *opts, dsd_state *state, char *imbe_d)
int readAmbe2450Data (dsd_opts *opts, dsd_state *state, char *ambe_d)
void openMbeInFile (dsd_opts *opts, dsd_state *state)
void closeMbeOutFile (dsd_opts *opts, dsd_state *state)
void openMbeOutFile (dsd_opts *opts, dsd_state *state)
void openWavOutFile (dsd_opts *opts, dsd_state *state)
void closeWavOutFile (dsd_opts *opts, dsd_state *state)
void printFrameInfo (dsd_opts *opts, dsd_state *state)
void processFrame (dsd_opts *opts, dsd_state *state)
void printFrameSync (dsd_opts *opts, dsd_state *state, char *frametype, int offset, char *modulation)
int getFrameSync (dsd_opts *opts, dsd_state *state)
int comp (const void *a, const void *b)
void noCarrier (dsd_opts *opts, dsd_state *state)
void initOpts (dsd_opts *opts)
void initState (dsd_state *state)
void usage ()
void liveScanner (dsd_opts *opts, dsd_state *state)
void cleanupAndExit (dsd_opts *opts, dsd_state *state)
int main (int argc, char **argv)
void playMbeFiles (dsd_opts *opts, dsd_state *state, int argc, char **argv)
void processMbeFrame (dsd_opts *opts, dsd_state *state, char imbe_fr[8][23], char ambe_fr[4][24], char imbe7100_fr[7][24])
void openSerial (dsd_opts *opts, dsd_state *state)
void resumeScan (dsd_opts *opts, dsd_state *state)
int getSymbol (dsd_opts *opts, dsd_state *state, int have_sync)
void upsample (dsd_state *state, float invalue)
void processDSTAR (dsd_opts *opts, dsd_state *state)
void processNXDNVoice (dsd_opts *opts, dsd_state *state)
void processNXDNData (dsd_opts *opts, dsd_state *state)
void processP25lcw (dsd_opts *opts, dsd_state *state, char *lcformat, char *mfid, char *lcinfo)
void processHDU (dsd_opts *opts, dsd_state *state)
void processLDU1 (dsd_opts *opts, dsd_state *state)
void processLDU2 (dsd_opts *opts, dsd_state *state)
void processTDU (dsd_opts *opts, dsd_state *state)
void processTDULC (dsd_opts *opts, dsd_state *state)
void processProVoice (dsd_opts *opts, dsd_state *state)
void processX2TDMAdata (dsd_opts *opts, dsd_state *state)
void processX2TDMAvoice (dsd_opts *opts, dsd_state *state)
void processDSTAR_HD (dsd_opts *opts, dsd_state *state)
short dmr_filter (short sample)
short nxdn_filter (short sample)

Macro Definition Documentation

◆ __USE_XOPEN

#define __USE_XOPEN

◆ DMR_BS_DATA_SYNC

#define DMR_BS_DATA_SYNC   "313333111331131131331131"

◆ DMR_BS_VOICE_SYNC

#define DMR_BS_VOICE_SYNC   "131111333113313313113313"

◆ DMR_MS_DATA_SYNC

#define DMR_MS_DATA_SYNC   "311131133313133331131113"

◆ DMR_MS_VOICE_SYNC

#define DMR_MS_VOICE_SYNC   "133313311131311113313331"

◆ DSTAR_HD

#define DSTAR_HD   "131313131333133113131111"

◆ DSTAR_SYNC

#define DSTAR_SYNC   "313131313133131113313111"

◆ INV_DSTAR_HD

#define INV_DSTAR_HD   "313131313111311331313333"

◆ INV_DSTAR_SYNC

#define INV_DSTAR_SYNC   "131313131311313331131333"

◆ INV_NXDN_BS_DATA_SYNC

#define INV_NXDN_BS_DATA_SYNC   "131311331313333131"

◆ INV_NXDN_BS_VOICE_SYNC

#define INV_NXDN_BS_VOICE_SYNC   "131311331313331331"

◆ INV_NXDN_MS_DATA_SYNC

#define INV_NXDN_MS_DATA_SYNC   "131311331313333111"

◆ INV_NXDN_MS_VOICE_SYNC

#define INV_NXDN_MS_VOICE_SYNC   "131311331313331311"

◆ INV_P25P1_SYNC

#define INV_P25P1_SYNC   "333331331133111131311111"

◆ INV_PROVOICE_EA_SYNC

#define INV_PROVOICE_EA_SYNC   "13313133113113333311313133133311"

◆ INV_PROVOICE_SYNC

#define INV_PROVOICE_SYNC   "31313111333133133311331133113311"

◆ NXDN_BS_DATA_SYNC

#define NXDN_BS_DATA_SYNC   "313133113131111313"

◆ NXDN_BS_VOICE_SYNC

#define NXDN_BS_VOICE_SYNC   "313133113131113113"

◆ NXDN_MS_DATA_SYNC

#define NXDN_MS_DATA_SYNC   "313133113131111333"

◆ NXDN_MS_VOICE_SYNC

#define NXDN_MS_VOICE_SYNC   "313133113131113133"

◆ P25P1_SYNC

#define P25P1_SYNC   "111113113311333313133333"

◆ PROVOICE_EA_SYNC

#define PROVOICE_EA_SYNC   "31131311331331111133131311311133"

◆ PROVOICE_SYNC

#define PROVOICE_SYNC   "13131333111311311133113311331133"

◆ SAMPLE_RATE_IN

#define SAMPLE_RATE_IN   48000

◆ SAMPLE_RATE_OUT

#define SAMPLE_RATE_OUT   8000

◆ X2TDMA_BS_DATA_SYNC

#define X2TDMA_BS_DATA_SYNC   "331313111113131113331133"

◆ X2TDMA_BS_VOICE_SYNC

#define X2TDMA_BS_VOICE_SYNC   "113131333331313331113311"

◆ X2TDMA_MS_DATA_SYNC

#define X2TDMA_MS_DATA_SYNC   "313113333111111133333313"

◆ X2TDMA_MS_VOICE_SYNC

#define X2TDMA_MS_VOICE_SYNC   "131331111333333311111131"

Function Documentation

◆ cleanupAndExit()

void cleanupAndExit ( dsd_opts * opts,
dsd_state * state )

References cleanupAndExit().

Referenced by cleanupAndExit().

◆ closeMbeOutFile()

void closeMbeOutFile ( dsd_opts * opts,
dsd_state * state )

References closeMbeOutFile().

Referenced by closeMbeOutFile().

◆ closeWavOutFile()

void closeWavOutFile ( dsd_opts * opts,
dsd_state * state )

References closeWavOutFile().

Referenced by closeWavOutFile().

◆ comp()

int comp ( const void * a,
const void * b )

References comp().

Referenced by comp().

◆ dmr_filter()

short dmr_filter ( short sample)

References dmr_filter().

Referenced by dmr_filter().

◆ get_dibit_and_analog_signal()

int get_dibit_and_analog_signal ( dsd_opts * opts,
dsd_state * state,
int * out_analog_signal )

◆ getDibit()

int getDibit ( dsd_opts * opts,
dsd_state * state )

References getDibit().

Referenced by getDibit().

◆ getFrameSync()

int getFrameSync ( dsd_opts * opts,
dsd_state * state )

References getFrameSync().

Referenced by getFrameSync().

◆ getSymbol()

int getSymbol ( dsd_opts * opts,
dsd_state * state,
int have_sync )

References getSymbol().

Referenced by getSymbol().

◆ initOpts()

void initOpts ( dsd_opts * opts)
extern

References initOpts().

Referenced by initOpts().

◆ initState()

void initState ( dsd_state * state)
extern

References initState().

Referenced by initState().

◆ liveScanner()

void liveScanner ( dsd_opts * opts,
dsd_state * state )
extern

References liveScanner().

Referenced by liveScanner().

◆ main()

int main ( int argc,
char ** argv )

References main().

Referenced by main().

◆ noCarrier()

void noCarrier ( dsd_opts * opts,
dsd_state * state )

References noCarrier().

Referenced by noCarrier().

◆ nxdn_filter()

short nxdn_filter ( short sample)

References nxdn_filter().

Referenced by nxdn_filter().

◆ openAudioInDevice()

void openAudioInDevice ( dsd_opts * opts)

References openAudioInDevice().

Referenced by openAudioInDevice().

◆ openAudioOutDevice()

void openAudioOutDevice ( dsd_opts * opts,
int speed )

References openAudioOutDevice().

Referenced by openAudioOutDevice().

◆ openMbeInFile()

void openMbeInFile ( dsd_opts * opts,
dsd_state * state )

References openMbeInFile().

Referenced by openMbeInFile().

◆ openMbeOutFile()

void openMbeOutFile ( dsd_opts * opts,
dsd_state * state )

References openMbeOutFile().

Referenced by openMbeOutFile().

◆ openSerial()

void openSerial ( dsd_opts * opts,
dsd_state * state )

References openSerial().

Referenced by openSerial().

◆ openWavOutFile()

void openWavOutFile ( dsd_opts * opts,
dsd_state * state )

References openWavOutFile().

Referenced by openWavOutFile().

◆ playMbeFiles()

void playMbeFiles ( dsd_opts * opts,
dsd_state * state,
int argc,
char ** argv )

References playMbeFiles().

Referenced by playMbeFiles().

◆ playSynthesizedVoice()

void playSynthesizedVoice ( dsd_opts * opts,
dsd_state * state )

References playSynthesizedVoice().

Referenced by playSynthesizedVoice().

◆ printFrameInfo()

void printFrameInfo ( dsd_opts * opts,
dsd_state * state )

References printFrameInfo().

Referenced by printFrameInfo().

◆ printFrameSync()

void printFrameSync ( dsd_opts * opts,
dsd_state * state,
char * frametype,
int offset,
char * modulation )

References printFrameSync().

Referenced by printFrameSync().

◆ processAudio()

void processAudio ( dsd_opts * opts,
dsd_state * state )

References processAudio().

Referenced by processAudio().

◆ processDMRdata()

void processDMRdata ( dsd_opts * opts,
dsd_state * state )

References processDMRdata().

Referenced by processDMRdata().

◆ processDMRvoice()

void processDMRvoice ( dsd_opts * opts,
dsd_state * state )

References processDMRvoice().

Referenced by processDMRvoice().

◆ processDSTAR()

void processDSTAR ( dsd_opts * opts,
dsd_state * state )

References processDSTAR().

Referenced by processDSTAR().

◆ processDSTAR_HD()

void processDSTAR_HD ( dsd_opts * opts,
dsd_state * state )

References processDSTAR_HD().

Referenced by processDSTAR_HD().

◆ processFrame()

void processFrame ( dsd_opts * opts,
dsd_state * state )

References processFrame().

Referenced by processFrame().

◆ processHDU()

void processHDU ( dsd_opts * opts,
dsd_state * state )

References processHDU().

Referenced by processHDU().

◆ processLDU1()

void processLDU1 ( dsd_opts * opts,
dsd_state * state )

References processLDU1().

Referenced by processLDU1().

◆ processLDU2()

void processLDU2 ( dsd_opts * opts,
dsd_state * state )

References processLDU2().

Referenced by processLDU2().

◆ processMbeFrame()

void processMbeFrame ( dsd_opts * opts,
dsd_state * state,
char imbe_fr[8][23],
char ambe_fr[4][24],
char imbe7100_fr[7][24] )

References processMbeFrame().

Referenced by processMbeFrame().

◆ processNXDNData()

void processNXDNData ( dsd_opts * opts,
dsd_state * state )

References processNXDNData().

Referenced by processNXDNData().

◆ processNXDNVoice()

void processNXDNVoice ( dsd_opts * opts,
dsd_state * state )

References processNXDNVoice().

Referenced by processNXDNVoice().

◆ processP25lcw()

void processP25lcw ( dsd_opts * opts,
dsd_state * state,
char * lcformat,
char * mfid,
char * lcinfo )

References processP25lcw().

Referenced by processP25lcw().

◆ processProVoice()

void processProVoice ( dsd_opts * opts,
dsd_state * state )

References processProVoice().

Referenced by processProVoice().

◆ processTDU()

void processTDU ( dsd_opts * opts,
dsd_state * state )

References processTDU().

Referenced by processTDU().

◆ processTDULC()

void processTDULC ( dsd_opts * opts,
dsd_state * state )

References processTDULC().

Referenced by processTDULC().

◆ processX2TDMAdata()

void processX2TDMAdata ( dsd_opts * opts,
dsd_state * state )

References processX2TDMAdata().

Referenced by processX2TDMAdata().

◆ processX2TDMAvoice()

void processX2TDMAvoice ( dsd_opts * opts,
dsd_state * state )

References processX2TDMAvoice().

Referenced by processX2TDMAvoice().

◆ readAmbe2450Data()

int readAmbe2450Data ( dsd_opts * opts,
dsd_state * state,
char * ambe_d )

References readAmbe2450Data().

Referenced by readAmbe2450Data().

◆ readImbe4400Data()

int readImbe4400Data ( dsd_opts * opts,
dsd_state * state,
char * imbe_d )

References readImbe4400Data().

Referenced by readImbe4400Data().

◆ resumeScan()

void resumeScan ( dsd_opts * opts,
dsd_state * state )

References resumeScan().

Referenced by resumeScan().

◆ saveAmbe2450Data()

void saveAmbe2450Data ( dsd_opts * opts,
dsd_state * state,
char * ambe_d )

References saveAmbe2450Data().

Referenced by saveAmbe2450Data().

◆ saveImbe4400Data()

void saveImbe4400Data ( dsd_opts * opts,
dsd_state * state,
char * imbe_d )

References saveImbe4400Data().

Referenced by saveImbe4400Data().

◆ skipDibit()

void skipDibit ( dsd_opts * opts,
dsd_state * state,
int count )

References skipDibit().

Referenced by skipDibit().

◆ upsample()

void upsample ( dsd_state * state,
float invalue )

References upsample().

Referenced by upsample().

◆ usage()

void usage ( )

References usage().

Referenced by usage().

◆ writeSynthesizedVoice()

void writeSynthesizedVoice ( dsd_opts * opts,
dsd_state * state )