Return field position by its ASN.1 type. Parameters ---------- tagSet: :class:`~pysnmp.type.tag.TagSet` ASN.1 tag set distinguishing one ASN.1 type from others. Returns ------- : :py:class:`int` ASN.1 type position in fields s
(self, tagSet)
| 294 | raise error.PyAsn1Error('Type position out of range') |
| 295 | |
| 296 | def getPositionByType(self, tagSet): |
| 297 | """Return field position by its ASN.1 type. |
| 298 | |
| 299 | Parameters |
| 300 | ---------- |
| 301 | tagSet: :class:`~pysnmp.type.tag.TagSet` |
| 302 | ASN.1 tag set distinguishing one ASN.1 type from others. |
| 303 | |
| 304 | Returns |
| 305 | ------- |
| 306 | : :py:class:`int` |
| 307 | ASN.1 type position in fields set |
| 308 | |
| 309 | Raises |
| 310 | ------ |
| 311 | ~pyasn1.error.PyAsn1Error |
| 312 | If *tagSet* is not present or ASN.1 types are not unique within callee *NamedTypes* |
| 313 | """ |
| 314 | try: |
| 315 | return self.__tagToPosMap[tagSet] |
| 316 | |
| 317 | except KeyError: |
| 318 | raise error.PyAsn1Error('Type %s not found' % (tagSet,)) |
| 319 | |
| 320 | def getNameByPosition(self, idx): |
| 321 | """Return field name by its position in fields set. |
no outgoing calls
no test coverage detected