Get field offset within the structure. Args: fname: field name Returns: field offset in bytes Raises: `AttributeError` if the specified field does not exist
(cls, fname: str)
| 186 | |
| 187 | @classmethod |
| 188 | def offsetof(cls, fname: str) -> int: |
| 189 | """Get field offset within the structure. |
| 190 | |
| 191 | Args: |
| 192 | fname: field name |
| 193 | |
| 194 | Returns: field offset in bytes |
| 195 | Raises: `AttributeError` if the specified field does not exist |
| 196 | """ |
| 197 | |
| 198 | return getattr(cls, fname).offset |
| 199 | |
| 200 | @classmethod |
| 201 | def memberat(cls, offset: int) -> Optional[str]: |
no outgoing calls