root/vtcross/trunk/src/cognitive_engines/DSA_CE/examples/libcross_demo.py @ 389

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
11from cross import *
12
13p = Parameter(1)
14currentParameters = Parameter(1)
15o = Observable(1)
16
17o[0].value = 15.00
18o[0].name = "energy"
19
20currentParameters[0].name = "channel"
21currentParameters[0].value = 3
22
23p = GetOptimalParameters(o,1,currentParameters,1);
24
25print p[0].name, p[0].value
26
27
Note: See TracBrowser for help on using the browser.