MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / getComponent

Method getComponent

pager_lib/pyasn1/type/univ.py:3151–3166  ·  view source on GitHub ↗

Return currently assigned component of the |ASN.1| object. Returns ------- : :py:class:`~pyasn1.type.base.PyAsn1Item` a PyASN1 object

(self, innerFlag=False)

Source from the content-addressed store, hash-verified

3149 return self.componentType.tagMapUnique
3150
3151 def getComponent(self, innerFlag=False):
3152 """Return currently assigned component of the |ASN.1| object.
3153
3154 Returns
3155 -------
3156 : :py:class:`~pyasn1.type.base.PyAsn1Item`
3157 a PyASN1 object
3158 """
3159 if self._currentIdx is None:
3160 raise error.PyAsn1Error('Component not chosen')
3161 else:
3162 c = self._componentValues[self._currentIdx]
3163 if innerFlag and isinstance(c, Choice):
3164 return c.getComponent(innerFlag)
3165 else:
3166 return c
3167
3168 def getName(self, innerFlag=False):
3169 """Return the name of currently assigned component of the |ASN.1| object.

Callers 2

_cloneComponentValuesMethod · 0.95
effectiveTagSetMethod · 0.95

Calls 1

getComponentMethod · 0.45

Tested by

no test coverage detected