58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
#ifndef _OWLPS_POSITIONING_ACCESSPOINT_HH_
|
|
#define _OWLPS_POSITIONING_ACCESSPOINT_HH_
|
|
|
|
#include "point3d.hh"
|
|
#include "posutil.hh"
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std ;
|
|
|
|
#define AP_DEFAULT_CHANNEL 6
|
|
#define AP_DEFAULT_ANTENNA_GAIN 2
|
|
#define AP_DEFAULT_TRX_POWER 20 // 20 dBm = 100 mW
|
|
|
|
class AccessPoint
|
|
{
|
|
protected:
|
|
Point3D coordinates ;
|
|
string ip_addr ;
|
|
string mac_addr ;
|
|
unsigned int frequency ; // Frequency (channel) in Hz
|
|
float antenna_gain ; // Antenna gain in dBi
|
|
float trx_power ; // Transmit power in dBm
|
|
|
|
public:
|
|
AccessPoint(const Point3D &_coordinates,
|
|
const string &_ip_addr,
|
|
const string &_mac_addr,
|
|
const unsigned int &_frequency = AP_DEFAULT_CHANNEL,
|
|
const float &_antenna_gain = AP_DEFAULT_ANTENNA_GAIN,
|
|
const float &_trx_power = AP_DEFAULT_TRX_POWER) ;
|
|
AccessPoint(const AccessPoint &ap) ;
|
|
|
|
~AccessPoint() {}
|
|
|
|
Point3D get_coordinates(void) const ;
|
|
string get_ip_addr(void) const ;
|
|
string get_mac_addr(void) const ;
|
|
unsigned int get_frequency(void) const ;
|
|
float get_antenna_gain(void) const ;
|
|
float get_trx_power(void) const ;
|
|
|
|
void set_coordinates(Point3D &_coordinates) ;
|
|
void set_ip_addr(const string &_ip_addr) ;
|
|
void set_mac_addr(const string &_mac_addr) ;
|
|
void set_frequency(unsigned int &_frequency) ;
|
|
void set_antenna_gain(float &_antenna_gain) ;
|
|
void set_trx_power(float &_trx_power) ;
|
|
|
|
bool operator==(const AccessPoint &ap) const;
|
|
bool operator!=(const AccessPoint &ap) const;
|
|
AccessPoint operator=(const AccessPoint &ap) ;
|
|
|
|
friend ostream &operator<<(ostream &os, const AccessPoint &ap) ;
|
|
} ;
|
|
|
|
#endif // _OWLPS_POSITIONING_ACCESSPOINT_HH_
|