This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
YASMIN/sensors/linux/WiFiSensorLinuxC.h
kazu 075d8bb633 a lot!!! of changes
added main menu
added debug display
many debug widgets for plotting live data
worked on android live sensors
added offline-data sensor feeding
some dummy data sensors
worked on the map display
added ui debug for grid-points, particles and weights
added a cool dude to display the estimation
added real filtering based on the Indoor components
c++11 fixes for android compilation
online and offline filtering support
new resampling technique for testing
map loading via dialog
2016-09-16 19:30:04 +02:00

50 lines
1.1 KiB
C

#ifndef WIFISENSORLINUXC_H
#define WIFISENSORLINUXC_H
#ifdef LINUX_DESKTOP
#include <errno.h>
#include <netlink/errno.h>
#include <netlink/netlink.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/ctrl.h>
#include <linux/nl80211.h>
#include <net/if.h>
struct wifiChannels {
uint32_t* frequencies; // array of frequencies
uint32_t numUsed; // number of array elements
};
struct wifiScanResultEntry {
char mac[17];
int rssi;
};
struct wifiScanResult {
struct wifiScanResultEntry entries[128];
int numUsed;
};
struct wifiState {
struct nl_sock* socket;
int driverID;
int mcid;
};
/** get the driver used for scanning */
int wifiGetDriver(struct wifiState* state);
/** convert interface name to index number. 0 if interface is not present */
int wifiGetInterfaceIndex(const char* name);
/** trigger a scan on the given channels / the provided interface */
int wifiTriggerScan(struct wifiState* state, int interfaceIndex, struct wifiChannels* channels);
/** blocking get the result of a triggered scan */
int wifiGetScanResult(struct wifiState* state, int interfaceIndex, struct wifiScanResult* res);
#ifdef LINUX_DESKTOP
#endif // WIFISENSORLINUXC_H