@@ -513,7 +513,7 @@ class sff8472InterfaceId(sffbase):
513513 'size' :3 ,
514514 'type' : 'hex' }
515515 }
516-
516+
517517 vendor_date = {
518518 'VendorDataCode(YYYY-MM-DD Lot)' :
519519 {'offset' :0 ,
@@ -569,7 +569,7 @@ def parse_vendor_date(self, sn_raw_data, start_pos):
569569
570570 def parse_vendor_oui (self , sn_raw_data , start_pos ):
571571 return sffbase .parse (self , self .vendor_oui , sn_raw_data , start_pos )
572-
572+
573573 def dump_pretty (self ):
574574 if self .interface_data == None :
575575 print ('Object not initialized, nothing to print' )
@@ -1175,6 +1175,90 @@ def calc_rx_power(self, eeprom_data, offset, size):
11751175 'type' : 'func' ,
11761176 'decode' : {'func' : calc_rx_power }}
11771177 }
1178+ dom_module_monitor = {
1179+ 'TempHighAlarm' :
1180+ {'offset' :0 ,
1181+ 'bit' :7 ,
1182+ 'type' : 'bitvalue' },
1183+ 'TempLowAlarm' :
1184+ {'offset' :0 ,
1185+ 'bit' :6 ,
1186+ 'type' : 'bitvalue' },
1187+ 'TempHighWarning' :
1188+ {'offset' : 4 ,
1189+ 'bit' : 7 ,
1190+ 'type' : 'bitvalue' },
1191+ 'TempLowWarning' :
1192+ {'offset' : 4 ,
1193+ 'bit' : 6 ,
1194+ 'type' : 'bitvalue' },
1195+ 'VccHighAlarm' :
1196+ {'offset' : 0 ,
1197+ 'bit' : 5 ,
1198+ 'type' : 'bitvalue' },
1199+ 'VccLowAlarm' :
1200+ {'offset' : 0 ,
1201+ 'bit' : 4 ,
1202+ 'type' : 'bitvalue' },
1203+ 'VccHighWarning' :
1204+ {'offset' : 4 ,
1205+ 'bit' : 5 ,
1206+ 'type' : 'bitvalue' },
1207+ 'VccLowWarning' :
1208+ {'offset' : 4 ,
1209+ 'bit' : 4 ,
1210+ 'type' : 'bitvalue' }}
1211+
1212+ dom_channel_thresh_monitor_params = {
1213+ 'BiasHighAlarm' :
1214+ {'offset' :0 ,
1215+ 'bit' :3 ,
1216+ 'type' : 'bitvalue' },
1217+ 'BiasLowAlarm' :
1218+ {'offset' :0 ,
1219+ 'bit' :2 ,
1220+ 'type' : 'bitvalue' },
1221+ 'BiasHighWarning' :
1222+ {'offset' :4 ,
1223+ 'bit' :3 ,
1224+ 'type' : 'bitvalue' },
1225+ 'BiasLowWarning' :
1226+ {'offset' :4 ,
1227+ 'bit' :2 ,
1228+ 'type' : 'bitvalue' },
1229+ 'TxPowerHighAlarm' :
1230+ {'offset' :0 ,
1231+ 'bit' :1 ,
1232+ 'type' : 'bitvalue' },
1233+ 'TxPowerLowAlarm' :
1234+ {'offset' :0 ,
1235+ 'bit' :0 ,
1236+ 'type' : 'bitvalue' },
1237+ 'TxPowerHighWarning' :
1238+ {'offset' :4 ,
1239+ 'bit' :1 ,
1240+ 'type' : 'bitvalue' },
1241+ 'TxPowerLowWarning' :
1242+ {'offset' :4 ,
1243+ 'bit' :0 ,
1244+ 'type' : 'bitvalue' },
1245+ 'RxPowerHighAlarm' :
1246+ {'offset' :1 ,
1247+ 'bit' :7 ,
1248+ 'type' : 'bitvalue' },
1249+ 'RxPowerLowAlarm' :
1250+ {'offset' :1 ,
1251+ 'bit' :6 ,
1252+ 'type' : 'bitvalue' },
1253+ 'RxPowerHighWarning' :
1254+ {'offset' :5 ,
1255+ 'bit' :7 ,
1256+ 'type' : 'bitvalue' },
1257+ 'RxPowerLowWarning' :
1258+ {'offset' :5 ,
1259+ 'bit' :6 ,
1260+ 'type' : 'bitvalue' }
1261+ }
11781262
11791263 def __init__ (self , eeprom_raw_data = None , calibration_type = 0 ):
11801264 self ._calibration_type = calibration_type
@@ -1200,6 +1284,14 @@ def parse_channel_monitor_params(self, eeprom_raw_data, start_pos):
12001284 return sffbase .parse (self , self .dom_channel_monitor_params , eeprom_raw_data ,
12011285 start_pos )
12021286
1287+ def parse_module_monitor_params (self , eeprom_raw_data , start_pos ):
1288+ return sffbase .parse (self , self .dom_module_monitor , eeprom_raw_data ,
1289+ start_pos )
1290+
1291+ def parse_channel_thresh_monitor_params (self , eeprom_raw_data , start_pos ):
1292+ return sffbase .parse (self , self .dom_channel_thresh_monitor_params , eeprom_raw_data ,
1293+ start_pos )
1294+
12031295 def parse_alarm_warning_threshold (self , eeprom_raw_data , start_pos ):
12041296 return sffbase .parse (self , self .dom_aw_thresholds , eeprom_raw_data ,
12051297 start_pos )
@@ -1217,3 +1309,4 @@ def get_data(self):
12171309
12181310 def get_data_pretty (self ):
12191311 return sffbase .get_data_pretty (self , self .dom_data )
1312+
0 commit comments