Esempio n. 1
0
from   __future__  import absolute_import, division, print_function, unicode_literals

from   _MOM.import_MOM        import *
from   _FFM                   import FFM

_Ancestor_Essence = FFM.Object

class Regulatory_Domain (_Ancestor_Essence) :
    """Wireless Regulatory Domain"""

    class _Attributes (_Ancestor_Essence._Attributes) :

        _Ancestor = _Ancestor_Essence._Attributes

        class countrycode (A_String) :
            """Two-letter country-code"""

            kind               = Attr.Primary
            max_length         = 2
            ignore_case        = True

        # end class countrycode

    # end class _Attributes

# end class Regulatory_Domain

if __name__ != "__main__" :
    FFM._Export ("*")
### __END__ FFM.Regulatory_Domain
Esempio n. 2
0
        class txpower (_Ancestor.txpower) :

            kind               = Attr.Query
            auto_up_depends    = ("hardware", )
            query              = Q.hardware.txpower

        # end class power

    # end class _Attributes

    class _Predicates (_Ancestor_Essence._Predicates) :

        _Ancestor = _Ancestor_Essence._Predicates

        class valid_left (Pred.Condition) :
            """`left` must be equal to `hardware.left`"""

            kind               = Pred.Object
            assertion          = "left is hardware.left"
            attributes         = ("left", "hardware.left")

        # end class valid_left

    # end class _Predicates

# end class Virtual_Wireless_Interface

if __name__ != "__main__" :
    FFM._Export ("*", "_Wireless_Interface_")
### __END__ FFM.Wireless_Interface
Esempio n. 3
0
            kind = Attr.Necessary

        # end class polarization

    # end class _Attributes

    class _Predicates(_Ancestor_Essence._Predicates):

        _Ancestor = _Ancestor_Essence._Predicates

        class band_exists(Pred.Condition):
            """There must be at least one frequency band for the antenna."""

            kind = Pred.Region
            assertion = "number_of_bands >= 1"
            attributes = ("bands", )
            bindings           = dict \
                ( number_of_bands = "len (this.bands)"
                )

        # end class band_exists

    # end class _Predicates


# end class Antenna_Type

if __name__ != "__main__":
    FFM._Export("*")
### __END__ FFM.Antenna_Type
Esempio n. 4
0
_Ancestor_Essence = FFM.Id_Entity

class _Belongs_to_Node_ (_Ancestor_Essence) :
    """Mixin for computed `belongs_to_node` attribute"""

    is_partial = True

    class _Attributes (_Ancestor_Essence._Attributes) :

        _Ancestor = _Ancestor_Essence._Attributes

        class belongs_to_node (A_Id_Entity) :
            """Node this %(ui_type_name)s belongs to."""

            kind                = Attr.Query
            hidden              = True
            P_Type              = FFM.Node
            query               = Q.left.belongs_to_node
            query_preconditions = (Q.left, )

        # end class belongs_to_node

    # end class _Attributes

# end class _Belongs_to_Node_

if __name__ != "__main__" :
    FFM._Export ("_Belongs_to_Node_")
### __END__ FFM._Belongs_to_Node_