@@ -43,9 +43,9 @@ def __init__(self, constellation, samples_per_symbol,
43
43
gr .hier_block2 .__init__ (self , "bert_transmit" ,
44
44
gr .io_signature (0 , 0 , 0 ), # Output signature
45
45
gr .io_signature (1 , 1 , gr .sizeof_gr_complex )) # Input signature
46
-
47
- # Create BERT data bit stream
48
- self ._bits = blocks .vector_source_b ([1 ,], True ) # Infinite stream of ones
46
+
47
+ # Create BERT data bit stream
48
+ self ._bits = blocks .vector_source_b ([1 ,], True ) # Infinite stream of ones
49
49
self ._scrambler = digital .scrambler_bb (0x8A , 0x7F , 7 ) # CCSDS 7-bit scrambler
50
50
51
51
self ._mod = digital .generic_mod (constellation , differential ,
@@ -60,15 +60,15 @@ def __init__(self, constellation, samples_per_symbol,
60
60
61
61
class tx_psk_block (gr .top_block ):
62
62
def __init__ (self , mod , options ):
63
- gr .top_block .__init__ (self , "tx_mpsk" )
63
+ gr .top_block .__init__ (self , "tx_mpsk" )
64
64
65
65
self ._modulator_class = mod
66
66
67
67
# Get mod_kwargs
68
68
mod_kwargs = self ._modulator_class .extract_kwargs_from_options (options )
69
-
69
+
70
70
# transmitter
71
- self ._modulator = self ._modulator_class (** mod_kwargs )
71
+ self ._modulator = self ._modulator_class (** mod_kwargs )
72
72
73
73
if (options .tx_freq is not None ):
74
74
symbol_rate = options .bitrate / self ._modulator .bits_per_symbol ()
@@ -78,13 +78,13 @@ def __init__(self, mod, options):
78
78
options .spec ,
79
79
options .antenna , options .verbose )
80
80
options .samples_per_symbol = self ._sink ._sps
81
-
81
+
82
82
elif (options .to_file is not None ):
83
83
self ._sink = blocks .file_sink (gr .sizeof_gr_complex , options .to_file )
84
84
else :
85
85
self ._sink = blocks .null_sink (gr .sizeof_gr_complex )
86
-
87
-
86
+
87
+
88
88
self ._transmitter = bert_transmit (self ._modulator ._constellation ,
89
89
options .samples_per_symbol ,
90
90
options .differential ,
@@ -94,7 +94,7 @@ def __init__(self, mod, options):
94
94
log = options .log )
95
95
96
96
self .amp = blocks .multiply_const_cc (options .amplitude )
97
- self .connect (self ._transmitter , self .amp , self ._sink )
97
+ self .connect (self ._transmitter , self .amp , self ._sink )
98
98
99
99
100
100
def get_options (mods ):
@@ -120,22 +120,22 @@ def get_options(mods):
120
120
121
121
for mod in list (mods .values ()):
122
122
mod .add_options (parser )
123
-
123
+
124
124
(options , args ) = parser .parse_args ()
125
125
if len (args ) != 0 :
126
126
parser .print_help ()
127
127
sys .exit (1 )
128
-
128
+
129
129
return (options , args )
130
130
131
131
if __name__ == "__main__" :
132
- print ("Warning : this example in its current shape is deprecated and
132
+ print (""" Warning: this example in its current shape is deprecated and
133
133
will be removed or fundamentally reworked in a coming GNU Radio
134
- release .")
134
+ release.""" )
135
135
mods = digital .modulation_utils .type_1_mods ()
136
136
137
137
(options , args ) = get_options (mods )
138
-
138
+
139
139
mod = mods [options .modulation ]
140
140
tb = tx_psk_block (mod , options )
141
141
0 commit comments