Get the member name at a given offset. Args: offset: field offset within the structure Returns: field name, or None if no field starts at the specified offset
(cls, offset: int)
| 199 | |
| 200 | @classmethod |
| 201 | def memberat(cls, offset: int) -> Optional[str]: |
| 202 | """Get the member name at a given offset. |
| 203 | |
| 204 | Args: |
| 205 | offset: field offset within the structure |
| 206 | |
| 207 | Returns: field name, or None if no field starts at the specified offset |
| 208 | """ |
| 209 | |
| 210 | return next((fname for fname, *_ in cls._fields_ if cls.offsetof(fname) == offset), None) |
| 211 | |
| 212 | |
| 213 | class BaseStructEL(BaseStruct, ctypes.LittleEndianStructure): |