Changeset 161
- Timestamp:
- 03/13/09 17:08:39 (15 years ago)
- Location:
- vtcross/trunk
- Files:
-
- 49 added
- 12 removed
- 1 modified
- 12 moved
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/README
r12 r161 1 1 # 2 # Cognitive Radio Simulation Program2 # Virginia Tech Cognitive Radio Open Source Systems 3 3 # 4 4 5 Compile and run: 5 All files are handled by root-level autofoo magic. In the top-level directory, 6 run the following commands to build the system: 6 7 7 $ make 8 $ ./cognitive_radio_test 8 $ ./reconf 9 $ ./configure 10 $ make 9 11 10 To change adaption algorithm, scroll down to line including11 *** execute cognition here *** and add your source code.12 13 # Dependencies14 15 This package relies on a DSP library on the OSSIE repo that you will16 need to download, compile, and install. To download from the17 repository, execute18 $ svn co https://ossie.wireless.vt.edu/repos/ossie/people/jgaeddert/sigprocc/tags/sigprocc-0.7.019 20 Compile and install21 $ ./reconf22 $ ./configure23 $ make24 $ sudo make install25 26 If this is your first time installing sigprocc, yo uwill need to run27 $ sudo /sbin/ldconfig28 29 To ensure that the library run properly, run the autotests. NOTE: you30 will need cxxtest [http://cxxtest.sourceforge.net] to do this.31 $ make check32 33 If everything works properly, you should see34 PASS: autotest35 ==================36 All 1 tests passed37 ==================38 39 Additionally you can benchmark the code on your machine by executing40 $ make bench41 -
vtcross/trunk/src/cognitive_engines/cbr.c
r98 r161 7 7 #include <stdio.h> 8 8 9 #include "cbr.h" 9 #include "vtcross/cbr.h" 10 #include "vtcross/common.h" 10 11 11 12 -
vtcross/trunk/src/cognitive_engines/cbr_demo.c
r99 r161 7 7 #include <stdlib.h> 8 8 #include <string.h> 9 10 #include "cbr.h" 9 #include <sqlite3.h> 10 #include <sqlite3ext.h> 11 12 #include "vtcross/cbr.h" 13 #include "vtcross/common.h" 11 14 12 15 //using namespace std; -
vtcross/trunk/src/include/vtcross/cbr.h
r98 r161 2 2 // Case-based reasoner 3 3 // 4 5 #ifndef CBR_H 6 #define CBR_H 4 7 5 8 #include "sqlite3.h" … … 29 32 int cbr_add_row(cbr _cbr, char *_cols[], float *_vals, unsigned int _len); 30 33 34 #endif -
vtcross/trunk/src/shell/cr_shell.cpp
r97 r161 5 5 #include <netinet/in.h> 6 6 #include <netdb.h> 7 #include "tinyxml.h"8 #include "tinystr.h"9 7 #include <arpa/inet.h> 10 8 #include <sys/mman.h> … … 15 13 //#include "socket/SocketException.h" 16 14 15 #include "vtcross/containers.h" 16 #include "vtcross/common.h" 17 #include "tinyxml/tinyxml.h" 18 #include "tinyxml/tinystr.h" 19 17 20 using namespace std; 18 21 19 22 #define CE_SERVER_PORT 30001 20 23 #define POLICY_SERVER_PORT 30003 21 22 struct CE_Info {23 int numUtilities;24 int numParameters;25 int numObservables;26 int policy_engine;27 int policy_socket;28 int ce_socket;29 };30 31 struct Utility {32 string name;33 string units;34 string goal;35 float target;36 float value;37 };38 struct Affect {39 Utility * u;40 string relation;41 };42 struct Parameter {43 string name;44 string units;45 float min;46 int numAffects;47 Affect affection_list[10];48 float max;49 float step;50 float value;51 };52 53 struct Observable {54 string name;55 Affect affection_list[10];56 int numAffects;57 float value;58 };59 24 60 25 void DieWithError(char *errorMessage)