2 Copyright 2008, 2009 Free Software Foundation, Inc.
3 This file is part of GNU Radio
5 GNU Radio Companion is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 GNU Radio Companion is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21 from .. import VERSION #TEMP: until gnuradio has __version__
22 from .. base.Platform import Platform as _Platform
23 from FlowGraph import FlowGraph as _FlowGraph
24 from Connection import Connection as _Connection
25 from Block import Block as _Block
26 from Port import Source,Sink
27 from Param import Param as _Param
28 from Generator import Generator
29 from Constants import \
30 HIER_BLOCKS_LIB_DIR, BLOCK_DTD, \
31 DEFAULT_FLOW_GRAPH, BLOCKS_DIRS
34 COLORS = (#title, #color spec
35 ('Complex', Constants.COMPLEX_COLOR_SPEC),
36 ('Float', Constants.FLOAT_COLOR_SPEC),
37 ('Integer', Constants.INT_COLOR_SPEC),
38 ('Short', Constants.SHORT_COLOR_SPEC),
39 ('Byte', Constants.BYTE_COLOR_SPEC),
40 ('Complex Vector', Constants.COMPLEX_VECTOR_COLOR_SPEC),
41 ('Float Vector', Constants.FLOAT_VECTOR_COLOR_SPEC),
42 ('Integer Vector', Constants.INT_VECTOR_COLOR_SPEC),
43 ('Short Vector', Constants.SHORT_VECTOR_COLOR_SPEC),
44 ('Byte Vector', Constants.BYTE_VECTOR_COLOR_SPEC),
45 ('Wildcard Type', Constants.WILDCARD_COLOR_SPEC),
48 class Platform(_Platform):
52 Make a platform for gnuradio.
55 if not os.path.exists(HIER_BLOCKS_LIB_DIR): os.mkdir(HIER_BLOCKS_LIB_DIR)
56 #convert block paths to absolute paths
57 block_paths = set(map(os.path.abspath, BLOCKS_DIRS))
61 name='GNU Radio Companion',
64 license=__doc__.strip(),
65 website='http://gnuradio.org/trac/wiki/GNURadioCompanion',
66 block_paths=block_paths,
68 default_flow_graph=DEFAULT_FLOW_GRAPH,
73 ##############################################
75 ##############################################
76 FlowGraph = _FlowGraph
77 Connection = _Connection