Revision 389, 0.5 KB
(checked in by trnewman, 15 years ago)
|
Added DSA CBR reference implementation.
Added simple python example application for DSA CBR.
Added GNUradio python application that uses CROSS and the DSA CBR.
Fixed several bugs in the socket interface.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | # Simple Python demonstration script for using |
---|
2 | # the CROSS system. |
---|
3 | # |
---|
4 | # Use with demo.xml shell configuration file |
---|
5 | # Instructions: |
---|
6 | # Start shell with demo.xml config from the examples directory |
---|
7 | # Start cognitive engine |
---|
8 | # Run this script |
---|
9 | # |
---|
10 | |
---|
11 | from cross import * |
---|
12 | |
---|
13 | p = Parameter(1) |
---|
14 | currentParameters = Parameter(1) |
---|
15 | o = Observable(1) |
---|
16 | |
---|
17 | o[0].value = 15.00 |
---|
18 | o[0].name = "energy" |
---|
19 | |
---|
20 | currentParameters[0].name = "channel" |
---|
21 | currentParameters[0].value = 3 |
---|
22 | |
---|
23 | p = GetOptimalParameters(o,1,currentParameters,1); |
---|
24 | |
---|
25 | print p[0].name, p[0].value |
---|
26 | |
---|
27 | |
---|