Connecting to 2 hosts and show contacts
This example will connect to two SBS-1 hosts and will show all the contacted aircrafts on stdout. The library will be initialized with the LHR_AUTOCONNECT flag to immediatly connect to added hosts....
Connect to hosts with event handler
In this example we try to add 3 hosts to the library handle and for every host we add an event handler for the LHR_ONCONNECT, LHR_ONTIMEOUT, LHR_ONFAILED and LHR_ONLOSS event handler. All contacted...
Show contacts with full database support
This example is nearly the same as example #1. Now we try to load the provided databases and now (if successfully loaded) all contacted aircrafts can be written will full type informations, flight ...
Connecting to one host with eventhandler
This example will show you how to connect to a single SBS-1 source with an event listener for the LHR_ONCONTACT event. Contacted aircrafts will be written to the terminal. The lib will be initializ...
Show only Lufthansa aircrafts
This example will connect to a single SBS-1 host and only aircrafts from the German Carrier 'Lufthansa' will be written to stdout. We use a single filter rule to realize this plan. For some filter ...
Connecting to a single host and get new contacts
This example will connect to one SBS-1 host and only the new contacted aircrafts will be written to stdout. All other contacts will be ignored. The library will be initialized with the LHR_AUTOCONN...
Show all aircrafts within 100km from server
This short example will try to establish a connection with our SBS-1 box and will set the GPS coordinates of the SBS-1 host location. Only aircrafts will be shown which are within an radius of 100k...
Show only aircrafts from the russian federation
This example will establish a connection to our SBS-1 server and will display only aircrafts which are registered in the Russian Federation. This will be done by a filterrule ( see homeradar_addfil...
Extended filter rules in use
This short example will connect to our SBS-1 host and will display only aircrafts from the Austrian carrier 'Austrian Airlines' and only aircrafts which are not build by Airbus. This will be realiz...
Connect to two hosts with statistic output
Here we try to connect to two SBS-1 hosts. All contacted aircrafts will be written to stdout. New contacts will get a special output format. During shutdown of the program the usage statistics from...
libhomeradar database lookup samples
This program will only initialize the libhomeradar handle but we will not add any hosts. Here you see the database lookups which can be made by libhomeradar. To enable database lookups you should l...
FullQueue event listener example
This example will connect to our SBS-1 box and will immediatly new contacted aircrafts. All other contacts will be inserted into the libraries internal queue. After the queue has reached the limit ...
Connect to SBS1 and RadarBox
This short example will connect to an SBS1 host and to an RadarBox host. There will be a listener on port 10000 installed on which you can see all decoded messages (telnet localhost 10000). After 5...
Connect to a socketserver on port 10000
With this example we will not add any hosts. We try to connect to a running libhomeradar instance which have a listener on port 10000 installed. (See example #13). The mode is LHR_POLL (active mode...
Send contacts to the collector server
This example show you how to send your contact data to our collector server at collector.libhomeradar.org on port 8080 . All messages from the connected host will be send to the collector. This is ...
Importing data into libhomeradar
libhomeradar provides a lot of possible import functions. You can import contacts as strings (format must be acceptable), as struct (see LHR_CONTACT) or by plain data (all needed input is given wit...
Connect to a server and enable data sharing
This short example will demonstrate the data sharing option of libhomeradar. As known from SBS1 and Radarbox, you can also pickup all contacts over TCP/IP sockets. Since version 1.005 libhomeradar ...
libhomeradar's control interface
Since version 1.005 libhomeradar comes with a small administration interface which is disabled by default. If the control interface is enabled, you can use a normal telnet session to connect to the...
Writing contact data to disc
If you wish to share your data but currently you have no internet access, you can use the homeradar_dump2disc() function to write all contacts to a normal textfile which can later be imported by th...