Source code for pcapkit.const.mh.lma_mag_suboption
# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""LMA-Controlled MAG Parameters Sub-Option Type Values==========================================================.. module:: pcapkit.const.mh.lma_mag_suboptionThis module contains the constant enumeration for **LMA-Controlled MAG Parameters Sub-Option Type Values**,which is automatically generated from :class:`pcapkit.vendor.mh.lma_mag_suboption.LMAControlledMAGSuboption`."""fromaenumimportIntEnum,extend_enum__all__=['LMAControlledMAGSuboption']
[docs]classLMAControlledMAGSuboption(IntEnum):"""[LMAControlledMAGSuboption] LMA-Controlled MAG Parameters Sub-Option Type Values"""#: Reserved [:rfc:`8127`]Reserved_0=0#: Binding Re-registration Control Sub-Option [:rfc:`8127`]Binding_Re_registration_Control=1#: Heartbeat Control Sub-Option [:rfc:`8127`]Heartbeat_Control=2@staticmethoddefget(key:'int | str',default:'int'=-1)->'LMAControlledMAGSuboption':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnLMAControlledMAGSuboption(key)ifkeynotinLMAControlledMAGSuboption._member_map_:# pylint: disable=no-memberreturnextend_enum(LMAControlledMAGSuboption,key,default)returnLMAControlledMAGSuboption[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'LMAControlledMAGSuboption':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=255):raiseValueError('%r is not a valid %s'%(value,cls.__name__))if3<=value<=255:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)