ppup1090.h
Go to the documentation of this file.
1 // ppup1090, a Mode S PlanePlotter Uploader for dump1090 devices.
2 //
3 // Copyright (C) 2013 by Malcolm Robb <Support@ATTAvionics.com>
4 //
5 // All rights reserved.
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are
9 // met:
10 //
11 // * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //
14 // * Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 #ifndef __PPUP1090_H
31 #define __PPUP1090_H
32 
33 // ============================= Include files ==========================
34 
35 #include "dump1090.h"
36 
37 #ifndef _WIN32
38  #include <stdio.h>
39  #include <string.h>
40  #include <stdlib.h>
41  #include <pthread.h>
42  #include <stdint.h>
43  #include <errno.h>
44  #include <unistd.h>
45  #include <math.h>
46  #include <sys/time.h>
47  #include <sys/timeb.h>
48  #include <signal.h>
49  #include <fcntl.h>
50  #include <ctype.h>
51  #include <sys/stat.h>
52  #include "rtl-sdr.h"
53  #include "anet.h"
54  #include <netdb.h>
55 #else
56  #include "winstubs.h" //Put everything Windows specific in here
57 #endif
58 
59 // ============================= #defines ===============================
60 
61 #define PPUP1090_NET_OUTPUT_IP_ADDRESS "127.0.0.1"
62 
63 #define NOTUSED(V) ((void) V)
64 
65 #define STR_HELPER(x) #x
66 #define STR(x) STR_HELPER(x)
67 
68 // ======================== structure declarations ========================
69 
70 // Program global state
71 struct { // Internal state
72  int quiet;
73  // Networking
74  char net_input_beast_ipaddr[32]; // IPv4 address or network name of server/RPi
75 } ppup1090;
76 
77 
78 // COAA Initialisation structure
79 struct _coaa1090 {
80  double fUserLat;
81  double fUserLon;
82  char strAuthCode[16];
83  char strRegNo[16];
84  char strVersion[16];
85 } coaa1090;
86 
87 // ======================== function declarations =========================
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
93 //
94 // Functions exported from coaa1090.c
95 //
96 int openCOAA (void);
97 int closeCOAA (void);
98 int initCOAA (struct _coaa1090 coaa1090);
99 void postCOAA (void);
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif // __PPUP1090_H
int openCOAA(void)
double fUserLat
Definition: ppup1090.h:80
struct _coaa1090 coaa1090
int initCOAA(struct _coaa1090 coaa1090)
char strVersion[16]
Definition: ppup1090.h:84
char net_input_beast_ipaddr[32]
Definition: ppup1090.h:74
char strAuthCode[16]
Definition: ppup1090.h:82
char strRegNo[16]
Definition: ppup1090.h:83
struct @1 ppup1090
int quiet
Definition: dump1090.h:288
void postCOAA(void)
int closeCOAA(void)
double fUserLon
Definition: ppup1090.h:81

, generated on Tue Sep 26 2023.