Update of /cvsroot/playerstage/code/player/server/drivers/wifi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4552/server/drivers/wifi
Modified Files:
Tag: release-2-0-patches
aodv.cc iwspy.cc
Log Message:
backported lots of stuff from HEAD
Index: aodv.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/aodv.cc,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -d -r1.8 -r1.8.2.1
*** aodv.cc 23 Feb 2006 18:54:55 -0000 1.8
--- aodv.cc 7 Jun 2006 16:12:54 -0000 1.8.2.1
***************
*** 32,38 ****
* @brief Linux AODV ad hoc networking
- @todo This driver is currently disabled because it needs to be updated to
- the Player 2.0 API.
-
The aodv driver reports signal strengths for AODV ah-hoc network software.
--- 32,35 ----
***************
*** 99,105 ****
// Get the current readings
! public: virtual size_t GetData(player_device_id_t id,
! void* dest, size_t len,
! struct timeval* timestamp);
// File handle for the /proc file system entry
--- 96,100 ----
// Get the current readings
! public: virtual void Update();
// File handle for the /proc file system entry
***************
*** 125,129 ****
// Constructor
Aodv::Aodv( ConfigFile *cf, int section)
! : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN,
PLAYER_WIFI_CODE, PLAYER_READ_MODE)
{
return;
--- 120,124 ----
// Constructor
Aodv::Aodv( ConfigFile *cf, int section)
! : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN,
PLAYER_WIFI_CODE)
{
return;
***************
*** 155,161 ****
// Get new data
! size_t Aodv::GetData(player_device_id_t id,
! void* dest, size_t maxsize,
! struct timeval* timestamp)
{
int n, link_count;
--- 150,154 ----
// Get new data
! void Aodv::Update()
{
int n, link_count;
***************
*** 166,170 ****
int qual, level, noise;
! struct timeval curr;
// Rewind to start of file
--- 159,163 ----
int qual, level, noise;
! //struct timeval curr;
// Rewind to start of file
***************
*** 191,210 ****
link = data.links + link_count++;
! strncpy(link->ip, ip, sizeof(link->ip));
//link->qual_type = PLAYER_WIFI_QUAL_UNKNOWN;
! link->qual = htons(qual);
! link->level = htons(level);
! link->noise = htons(noise);
}
! data.link_count = htons(link_count);
// Copy data to the server's buffer
! assert(sizeof(data) < maxsize);
! memcpy(dest, &data, sizeof(data));
- // Set the data timestamp
- GlobalTime->GetTime(&curr);
- *timestamp = curr;
! return (sizeof(data));
}
--- 184,198 ----
link = data.links + link_count++;
! strncpy((char*)link->ip, ip, sizeof(link->ip));
//link->qual_type = PLAYER_WIFI_QUAL_UNKNOWN;
! link->qual = (qual);
! link->noise = (noise);
}
! data.links_count = (link_count);
// Copy data to the server's buffer
! Publish(device_addr, NULL, PLAYER_MSGTYPE_DATA, PLAYER_WIFI_DATA_STATE,
&data, sizeof(data), NULL);
! return;
}
Index: iwspy.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/iwspy.cc,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -C2 -d -r1.17 -r1.17.2.1
*** iwspy.cc 6 Mar 2006 21:43:11 -0000 1.17
--- iwspy.cc 7 Jun 2006 16:12:54 -0000 1.17.2.1
***************
*** 36,42 ****
* @brief Linux iwspy access
- @todo This driver is currently disabled because it needs to be updated to
- the Player 2.0 API.
-
This driver works like iwspy; it uses the linux wireless extensions
to get signal strengths to wireless NICS.
--- 36,39 ----
***************
*** 328,332 ****
int argc;
char *args[16];
!
// Fork here
pid = fork();
--- 325,329 ----
int argc;
char *args[16];
!
// Fork here
pid = fork();
***************
*** 462,469 ****
// Get data for each registered NIC
! if (sscanf(line, " %s : Quality%*c%d/%*d Signal level%*c%d/%*d Noise
level%*c%d/%*d",
mac, &link, &level, &noise) < 4)
{
! continue;
}
--- 459,471 ----
// Get data for each registered NIC
! if (sscanf(line, " %s : Quality%*c%d%*s Signal level%*c%d%*s Noise
level%*c%d%*s",
mac, &link, &level, &noise) < 4)
{
! link = 0;
! if (sscanf(line, " %s : Signal level%*c%d%*s Noise level%*c%d%*s",
! mac, &level, &noise) < 3)
! {
! continue;
! }
}
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit