@@ -1207,7 +1207,7 @@ def configure_tx_output_power(self, api, lport, tx_power):
1207
1207
self .log_error ("{} configured tx power {} > maximum power {} supported" .format (lport , tx_power , max_p ))
1208
1208
return api .set_tx_power (tx_power )
1209
1209
1210
- def config_laser_frequency_validate (self , api , lport , freq , grid = 75 ):
1210
+ def validate_frequency_and_grid (self , api , lport , freq , grid = 75 ):
1211
1211
supported_grid , _ , _ , lowf , highf = api .get_supported_freq_config ()
1212
1212
if freq < lowf :
1213
1213
self .log_error ("{} configured freq:{} GHz is lower than the supported freq:{} GHz" .format (lport , freq , lowf ))
@@ -1217,18 +1217,18 @@ def config_laser_frequency_validate(self, api, lport, freq, grid=75):
1217
1217
return False
1218
1218
if grid == 75 :
1219
1219
if (supported_grid >> 7 ) & 0x1 != 1 :
1220
- self .log_error ("{} 75GHz is not supported" .format (lport ))
1220
+ self .log_error ("{} configured freq:{}GHz supported grid:{} 75GHz is not supported" .format (lport , freq , supported_grid ))
1221
1221
return False
1222
1222
chan = int (round ((freq - 193100 )/ 25 ))
1223
1223
if chan % 3 != 0 :
1224
- self .log_error ("{} configured freq:{} GHz is NOT in 75GHz grid" .format (lport , freq ))
1224
+ self .log_error ("{} configured freq:{}GHz is NOT in 75GHz grid" .format (lport , freq ))
1225
1225
return False
1226
1226
elif grid == 100 :
1227
1227
if (supported_grid >> 5 ) & 0x1 != 1 :
1228
- self .log_error ("{} 100GHz is not supported" .format (lport ))
1228
+ self .log_error ("{} configured freq:{}GHz 100GHz is not supported" .format (lport , freq ))
1229
1229
return False
1230
1230
else :
1231
- self .log_error ("{} {}GHz is not supported" .format (lport , grid ))
1231
+ self .log_error ("{} configured freq: {}GHz {}GHz is not supported" .format (lport , freq , grid ))
1232
1232
return False
1233
1233
return True
1234
1234
@@ -1463,7 +1463,7 @@ def task_worker(self):
1463
1463
# If user requested frequency is NOT the same as configured on the module
1464
1464
# force datapath re-initialization
1465
1465
if 0 != freq and freq != api .get_laser_config_freq ():
1466
- if self .config_laser_frequency_validate (api , lport , freq ) == True :
1466
+ if self .validate_frequency_and_grid (api , lport , freq ) == True :
1467
1467
need_update = True
1468
1468
else :
1469
1469
# clear setting of invalid frequency config
0 commit comments