]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/commitdiff
Added and updated comments, removed unused definitions
authorTuka Martin <tukamart@fel.cvut.cz>
Tue, 19 Apr 2011 18:34:57 +0000 (20:34 +0200)
committerTuka Martin <tukamart@fel.cvut.cz>
Tue, 19 Apr 2011 18:34:57 +0000 (20:34 +0200)
src/fwp/fwp/mngr/test/Makefile.omk
src/fwp/fwp/mngr/test/fwp_adm_test.c
src/fwp/fwp/mngr/test/list_of_stations_test.c
src/fwp/fwp/mngr/wifi_agent.c
src/fwp/fwp/wifi_agent/wifi_agent.c
src/fwp/fwp/wifi_agent/wifi_agent.h

index ab33b4b1b4a4c4117cff196e1cf4c7d0b4bd2c04..8b0470133c0e4985dfb3be65e6fd53f4a386838d 100644 (file)
@@ -2,10 +2,10 @@ CFLAGS += -DWVTEST_CONFIGURED
 
 wvtest_PROGRAMS += fwp_adm_test
 fwp_adm_test_SOURCES = fwp_adm_test.c
-fwp_adm_test_LIBS += frm forb frsh contract pthread fosa rt ulut fwp_admctrl wvtest
+fwp_adm_test_LIBS += frm frsh fwp_admctrl wvtest
 
 wvtest_SCRIPTS += list_of_stations_test.sh
 test_PROGRAMS += list_of_stations_test
 list_of_stations_test_SOURCES = list_of_stations_test.c
-list_of_stations_test_LIBS += wvtest forb ulut wifi_agent_client_functions
+list_of_stations_test_LIBS += wifi_agent_client_functions
 
index 9860316312e9bee752d4bfc674b3cc53a410f7d0..f632ef621d71ab315b93a411a257c13599397172 100644 (file)
@@ -5,11 +5,7 @@
 #include <fwp_res.h>
 #include <fwp_vres.h>
 #include <string.h>
-#include <stdio.h>
 #include <stdbool.h>
-#include <ul_list.h>
-#include <ul_log.h>
-#include <ul_logreg.h>
 #include <stdio.h>
 #include <wvtest.h>
 
index e4efd1c7acbfa00b4bcd2ba87db07bc595d9233e..4f1622b7bd8b9b8c3272bc335c7f51baed4dd00c 100644 (file)
@@ -1,20 +1,14 @@
+/*
+ *     @brief client for testing purposes - sends information about stations to 
+ *     list in frm_fwp manager and print it
+ *
+ */
+
 #include <forb.h>
-#include <error.h>
-#include <errno.h>
-#include <getopt.h>
-#include <fres_sa_scenario.h>
-#include <stdbool.h>
-#include <ul_list.h>
-#include <ul_log.h>
-#include <ul_logreg.h>
-#include <fwp_res.h>
 #include <stdio.h>
-#include <string.h>
 #include "wifi_agent_idl.h"
 #include "wifi_agent.h"
-#include "wvtest.h"
 
-//WVTEST_MAIN("list-of-stations-test")
 int main(void)
 {
        forb_orb fwp_orb;
index d0a3159912a28cc8314fd241d8b1e96abd4ae31c..0ed30e54df5fe00757ccf646387cdb293912c1ed 100644 (file)
@@ -1,3 +1,8 @@
+/*
+ *     @brief server side (frm_fwp) functions for communication 
+ *     resource manager - station
+ */
+
 #include <frm_generic.h>
 #include <forb.h>
 #include <error.h>
@@ -46,23 +51,22 @@ CORBA_long wifi_agent_idl_add(wifi_agent_idl _obj, const CORBA_long rate, const
 
        new_to_add = (fwp_sta_t*)malloc(sizeof(fwp_sta_t));
 
-       //client transmission bitrate (wifi_agent -> fwp_manager)
+       /*client transmission bitrate (wifi_agent -> fwp_manager)*/
        ed->rate = rate;
        ed->client_mac_addr = client_mac_addr;
 
-       //fill the linked list here
-       //for each list         
+       /*fill the linked list here*/
        ul_list_for_each(sta_list, &priv.sta_list, sta){
-               //client was sending info before
                
+               /*client was sending info before*/
                if(sta->client_mac_addr == ed->client_mac_addr) {
-                       //mac address is the same change only rate
+                       /*mac address is the same change only rate*/
                        sta->rate = ed->rate;
 
                        return 0;
                }
        }
-       //client was not sending info yet
+       /*client was not sending info yet*/
        new_to_add->rate = ed->rate;
        new_to_add->client_mac_addr = ed->client_mac_addr;
        
index 6813723f84b6e169adb7aefc92eed116f7d162f0..367d1c1f07d77f2f51051af298fbb5ee7ef70b57 100644 (file)
@@ -1,5 +1,6 @@
 /*
- *     
+ *     @brief: Program finds out mac address and tx bitrate of station
+ *     and sends it to frm_fwp manager
  *
  */
 
@@ -329,8 +330,6 @@ int main(int argc, char **argv)
        forb_orb fwp_orb;
         wifi_agent_idl wai;
         CORBA_Environment env;
-        /*CORBA_long*/ //int rate;
-       /*COBRA_string*/ //char client_mac_addr[20];
 
        // if some arguments whitch are not needed
        // if (argc > 1) {
index f5db49f9b3e2dade0812156c9073abf465294fbf..04fcc02e742681c3ad1dbf76a9a026d048966de8 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _WIFI_AGENT_H
+#define _WIFI_AGENT_H
+
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
@@ -32,3 +35,5 @@ struct nl80211_state {
        struct genl_family *nl80211;
 };
 
+#endif
+