(self)
return True
Get demodulator configurations via SNMP

        Returns:
            Bool indicating whether the demodulator configurations were printed
            successfully.
Get demodulator configurations via SNMP
Get demodulator configurations via SNMP
def print_demod_config(self):
        """Get demodulator configurations via SNMP

        Returns:
            Bool indicating whether the demodulator configurations were printed
            successfully.

        """
        res = self._get(
            's400FirmwareVersion',
            # Demodulator
            's400ModulationStandard' + self.demod,
            's400LBandFrequency' + self.demod,
            's400SymbolRate' + self.demod,
            's400Modcod' + self.demod,
            # LNB
            's400LNBSupply',
            's400LOFrequency',
            's400Polarization',
            's400Enable22KHzTone',
            's400LongLineCompensation',
            # MPE
            ('s400MpePid1Pid', 0),
            ('s400MpePid1Pid', 1),
            ('s400MpePid1RowStatus', 0),
            ('s400MpePid1RowStatus', 1))

        if (res is None):
            return False

        # Form dictionary with the S400 configs
        cfg = {}
        for res in res:
            key = res[0].replace('NOVRA-s400-MIB::s400', '')
            val = res[1]
            cfg[key] = val

        # Map dictionary to more informative labels
        demod_label_map = {
            'ModulationStandard' + self.demod + '.0': "Standard",
            'LBandFrequency' + self.demod + '.0': "L-band Frequency",
            'SymbolRate' + self.demod + '.0': "Symbol Rate",
            'Modcod' + self.demod + '.0': "MODCOD",
        }
        lnb_label_map = {
            'LNBSupply.0': "LNB Power Supply",
            'LOFrequency.0': "LO Frequency",
            'Polarization.0': "Polarization",
            'Enable22KHzTone.0': "22 kHz Tone",
            'LongLineCompensation.0': "Long Line Compensation"
        }
        mpe_label_map = {
            'MpePid1Pid.0': "MPE PID",
            'MpePid1RowStatus.0': "MPE PID Status"
        }
        label_map = {
            "Demodulator": demod_label_map,
            "LNB Options": lnb_label_map,
            "MPE Options": mpe_label_map
        }

        print("Firmware Version: {}".format(cfg['FirmwareVersion.0']))
        for map_key in label_map:
            print("{}:".format(map_key))
            for key in cfg:
                if key in label_map[map_key]:
                    label = label_map[map_key][key]
                    if (label == "MODCOD"):
                        val = "VCM" if cfg[key] == "31" else cfg[key]
                    elif (label == "Standard"):
                        val = cfg[key].upper()
                    else:
                        val = cfg[key]
                    print("- {}: {}".format(label, val))
        return True
def print_demod_config ( self ) : res = self . _get ( 's400FirmwareVersion' , # Demodulator 's400ModulationStandard' + self . demod , 's400LBandFrequency' + self . demod , 's400SymbolRate' + self . demod , 's400Modcod' + self . demod , # LNB 's400LNBSupply' , 's400LOFrequency' , 's400Polarization' , 's400Enable22KHzTone' , 's400LongLineCompensation' , # MPE ( 's400MpePid1Pid' , 0 ) , ( 's400MpePid1Pid' , 1 ) , ( 's400MpePid1RowStatus' , 0 ) , ( 's400MpePid1RowStatus' , 1 ) ) if ( res is None ) : return False # Form dictionary with the S400 configs cfg = { } for res in res : key = res [ 0 ] . replace ( 'NOVRA-s400-MIB::s400' , '' ) val = res [ 1 ] cfg [ key ] = val # Map dictionary to more informative labels demod_label_map = { 'ModulationStandard' + self . demod + '.0' : "Standard" , 'LBandFrequency' + self . demod + '.0' : "L-band Frequency" , 'SymbolRate' + self . demod + '.0' : "Symbol Rate" , 'Modcod' + self . demod + '.0' : "MODCOD" , } lnb_label_map = { 'LNBSupply.0' : "LNB Power Supply" , 'LOFrequency.0' : "LO Frequency" , 'Polarization.0' : "Polarization" , 'Enable22KHzTone.0' : "22 kHz Tone" , 'LongLineCompensation.0' : "Long Line Compensation" } mpe_label_map = { 'MpePid1Pid.0' : "MPE PID" , 'MpePid1RowStatus.0' : "MPE PID Status" } label_map = { "Demodulator" : demod_label_map , "LNB Options" : lnb_label_map , "MPE Options" : mpe_label_map } print ( "Firmware Version: {}" . format ( cfg [ 'FirmwareVersion.0' ] ) ) for map_key in label_map : print ( "{}:" . format ( map_key ) ) for key in cfg : if key in label_map [ map_key ] : label = label_map [ map_key ] [ key ] if ( label == "MODCOD" ) : val = "VCM" if cfg [ key ] == "31" else cfg [ key ] elif ( label == "Standard" ) : val = cfg [ key ] . upper ( ) else : val = cfg [ key ] print ( "- {}: {}" . format ( label , val ) ) return True