2008-04-11 10:11:29 +02:00
|
|
|
#ifndef _ACCESSPOINT_HH_
|
|
|
|
#define _ACCESSPOINT_HH_
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
|
2008-04-11 10:11:29 +02:00
|
|
|
#include "point.hh"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using std::string;
|
|
|
|
|
2008-04-15 12:19:15 +02:00
|
|
|
#define AP_DEFAULT_ADDR ""
|
|
|
|
#define AP_DEFAULT_FRIIS_INDEX 0
|
|
|
|
#define AP_DEFAULT_FREQ 2412
|
|
|
|
#define AP_DEFAULT_ANTENNA_GAIN 2 // A good value
|
|
|
|
#define AP_DEFAULT_OUTPUT_POWER 20 // Another good value, eq. to 100mW
|
|
|
|
|
2008-04-11 10:11:29 +02:00
|
|
|
class AccessPoint
|
2009-05-29 13:46:49 +02:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
Point coordinates;
|
|
|
|
string ap_addr;
|
|
|
|
float friis_index;
|
|
|
|
unsigned int freq;
|
|
|
|
float antenna_gain;
|
|
|
|
float output_power;
|
|
|
|
|
|
|
|
public:
|
|
|
|
AccessPoint(const string &addr = AP_DEFAULT_ADDR, const float &fidx = AP_DEFAULT_FRIIS_INDEX, const Point &coords = Point(), const unsigned int &f = AP_DEFAULT_FREQ, const float &antg = AP_DEFAULT_ANTENNA_GAIN, const float &outp = AP_DEFAULT_OUTPUT_POWER);
|
|
|
|
AccessPoint(const AccessPoint &ap);
|
|
|
|
~AccessPoint() {};
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
|
2009-05-29 13:46:49 +02:00
|
|
|
string getApAddr()const
|
|
|
|
{
|
|
|
|
return ap_addr;
|
|
|
|
};
|
|
|
|
float getFriisIndex()const
|
|
|
|
{
|
|
|
|
return friis_index;
|
|
|
|
};
|
|
|
|
Point getCoordinates()const
|
|
|
|
{
|
|
|
|
return coordinates;
|
|
|
|
};
|
|
|
|
float getAntennaGain()const
|
|
|
|
{
|
|
|
|
return antenna_gain;
|
|
|
|
};
|
|
|
|
unsigned int getFrequency()const
|
|
|
|
{
|
|
|
|
return freq;
|
|
|
|
};
|
|
|
|
float getOutputPower()const
|
|
|
|
{
|
|
|
|
return output_power;
|
|
|
|
};
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
|
2009-05-29 13:46:49 +02:00
|
|
|
void setApAddr(const string &addr)
|
|
|
|
{
|
|
|
|
ap_addr = addr;
|
|
|
|
};
|
|
|
|
void setFriisIndex(const float &fidx)
|
|
|
|
{
|
|
|
|
friis_index = fidx;
|
|
|
|
};
|
|
|
|
void setCoordinates(const Point &apc)
|
|
|
|
{
|
|
|
|
coordinates = apc;
|
|
|
|
};
|
|
|
|
void setCoordinates(const float &x, const float &y, const float &z)
|
|
|
|
{
|
|
|
|
Point apc(x, y, z);
|
|
|
|
coordinates = apc;
|
|
|
|
};
|
|
|
|
void setFrequency(const unsigned int &f)
|
|
|
|
{
|
|
|
|
freq = f;
|
|
|
|
};
|
|
|
|
void setAntennaGain(const float &antg)
|
|
|
|
{
|
|
|
|
antenna_gain = antg;
|
|
|
|
};
|
|
|
|
void setOutputPower(const float &outp)
|
|
|
|
{
|
|
|
|
output_power = outp;
|
|
|
|
};
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
|
2009-05-29 13:46:49 +02:00
|
|
|
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);
|
|
|
|
};
|
2008-04-11 10:11:29 +02:00
|
|
|
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
#endif // _ACCESSPOINT_HH_
|