Split into separate module files
Ok - this is likely to upset some people. Up until now, the vast majority of the code has been in just one file - dump1090.c. This file has grown so that it was approaching of 5000 lines long, and it was becoming unmanagable. So I've split the file into several modules, hopefully along fairly logical boundaries. The files are : 1) dump1090.c : Basically just the main() entry function, the help function, the RTL dongle hardware interface, and a few orphan functions that don't really fit anywhere else. 2) mode_s.c : This contains all the mode S / ADSB decoding functions. 3) mode_ac.c : This contains all the mode A & C decoding functions 4) interactive.c : This contains all the functions to maintain an internal list of aircraft seen over the last period, and functions to print them out to the local console. 5) net_io.c : This contains all the network input/output functions allowing data to be passed in/out to/from other receivers, in formats such as SBS-1/3, Beast, AVR and JavaScript. Hopefully this should provide an easier way forward if/when more functions are added.
This commit is contained in:
parent
1ebdd6d7a7
commit
6997715fed
7 changed files with 3897 additions and 3582 deletions
29
dump1090.h
29
dump1090.h
|
@ -388,29 +388,30 @@ int detectModeA (uint16_t *m, struct modesMessage *mm);
|
|||
void decodeModeAMessage(struct modesMessage *mm, int ModeA);
|
||||
int ModeAToModeC (unsigned int ModeA);
|
||||
|
||||
//
|
||||
// Functions exported from mode_s.c
|
||||
//
|
||||
void detectModeS (uint16_t *m, uint32_t mlen);
|
||||
void decodeModesMessage (struct modesMessage *mm, unsigned char *msg);
|
||||
void displayModesMessage(struct modesMessage *mm);
|
||||
void useModesMessage (struct modesMessage *mm);
|
||||
void computeMagnitudeVector();
|
||||
void decodeCPR (struct aircraft *a, int fflag, int surface);
|
||||
int decodeCPRrelative (struct aircraft *a, int fflag, int surface);
|
||||
void modesInitErrorInfo ();
|
||||
//
|
||||
// Functions exported from interactive.c
|
||||
//
|
||||
struct aircraft* interactiveReceiveData(struct modesMessage *mm);
|
||||
void interactiveShowData(void);
|
||||
void interactiveRemoveStaleAircrafts(void);
|
||||
|
||||
//
|
||||
// Functions exported from dump1090.c
|
||||
// Functions exported from net_io.c
|
||||
//
|
||||
void modesInitNet (void);
|
||||
void modesReadFromClients (void);
|
||||
void modesSendAllClients (int service, void *msg, int len);
|
||||
void modesSendRawOutput (struct modesMessage *mm);
|
||||
void modesSendBeastOutput (struct modesMessage *mm);
|
||||
void modesSendSBSOutput (struct modesMessage *mm);
|
||||
void useModesMessage (struct modesMessage *mm);
|
||||
|
||||
void decodeCPR (struct aircraft *a, int fflag, int surface);
|
||||
int decodeCPRrelative(struct aircraft *a, int fflag, int surface);
|
||||
|
||||
int fixBitErrors (unsigned char *msg, int bits, int maxfix, char *fixedbits);
|
||||
|
||||
void modesInitErrorInfo ();
|
||||
int modesMessageLenByType(int type);
|
||||
void modesQueueOutput (struct modesMessage *mm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue