Пример #1
0
class _BindValue(univ.Choice):
    componentType = namedtype.NamedTypes(
        namedtype.NamedType('value', rfc1902.ObjectSyntax()),
        namedtype.NamedType('unSpecified', unSpecified),
        namedtype.NamedType('noSuchObject', noSuchObject),
        namedtype.NamedType('noSuchInstance', noSuchInstance),
        namedtype.NamedType('endOfMibView', endOfMibView))
Пример #2
0
class _BindValue(univ.Choice):  # Made a separate class for better readability
    componentType = namedtype.NamedTypes(
        namedtype.NamedType('value', rfc1902.ObjectSyntax()),
        namedtype.NamedType('unSpecified', univ.Null()),
        namedtype.NamedType(
            'noSuchObject',
            univ.Null().subtype(implicitTag=tag.Tag(
                tag.tagClassContext, tag.tagFormatSimple, 0x00))),
        namedtype.NamedType(
            'noSuchInstance',
            univ.Null().subtype(implicitTag=tag.Tag(
                tag.tagClassContext, tag.tagFormatSimple, 0x01))),
        namedtype.NamedType(
            'endOfMibView',
            univ.Null().subtype(implicitTag=tag.Tag(
                tag.tagClassContext, tag.tagFormatSimple, 0x02))))