| |
- builtins.object
-
- BitFieldBase
-
- BitField(BitFieldBase, runtimepy.mixins.regex.RegexMixin, runtimepy.mixins.enum.EnumMixin)
-
- BitFlag
class BitField(BitFieldBase, runtimepy.mixins.regex.RegexMixin, runtimepy.mixins.enum.EnumMixin) |
|
BitField(name: str, raw: Union[runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive], index: int, width: int, enum: Union[str, int] = None, commandable: bool = False, description: str = None) -> None
A class managing a portion of an unsigned-integer primitive. |
|
- Method resolution order:
- BitField
- BitFieldBase
- runtimepy.mixins.regex.RegexMixin
- runtimepy.mixins.enum.EnumMixin
- builtins.object
Methods defined here:
- __init__(self, name: str, raw: Union[runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive], index: int, width: int, enum: Union[str, int] = None, commandable: bool = False, description: str = None) -> None
- Initialize this bit-field.
- asdict(self) -> Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]]
- Get this field as a dictionary.
Data and other attributes defined here:
- __annotations__ = {}
- name_regex = re.compile('^[a-z0-9_.-]+$')
Methods inherited from BitFieldBase:
- __call__(self, val: int = None) -> int
- Set (or get) the underlying value of this field. Return the actual
value of the field.
- invert(self) -> int
- Invert the value of this field and return the result.
- where_str(self) -> str
- Get a simple string representing the bit locations this field occupies.
Data descriptors inherited from BitFieldBase:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Class methods inherited from runtimepy.mixins.regex.RegexMixin:
- validate_name(name: str, logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None) -> bool from builtins.type
- Determine if a name is valid for this class.
Readonly properties inherited from runtimepy.mixins.enum.EnumMixin:
- enum
- Get the enum-registry key for this channel.
- is_enum
- Determine if this channel has an associated enumeration.
|
class BitFieldBase(builtins.object) |
|
BitFieldBase(raw: Union[runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive], index: int, width: int, commandable: bool = False, description: str = None) -> None
A simple bit-field implementation. |
|
Methods defined here:
- __call__(self, val: int = None) -> int
- Set (or get) the underlying value of this field. Return the actual
value of the field.
- __init__(self, raw: Union[runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive], index: int, width: int, commandable: bool = False, description: str = None) -> None
- Initialize this bit-field.
- invert(self) -> int
- Invert the value of this field and return the result.
- where_str(self) -> str
- Get a simple string representing the bit locations this field occupies.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- __annotations__ = {}
|
class BitFlag(BitField) |
|
BitFlag(name: str, raw: Union[runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive], index: int, enum: Union[str, int] = None, commandable: bool = False, description: str = None) -> None
A bit field that is always a single bit. |
|
- Method resolution order:
- BitFlag
- BitField
- BitFieldBase
- runtimepy.mixins.regex.RegexMixin
- runtimepy.mixins.enum.EnumMixin
- builtins.object
Methods defined here:
- __init__(self, name: str, raw: Union[runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive], index: int, enum: Union[str, int] = None, commandable: bool = False, description: str = None) -> None
- Initialize this bit flag.
- clear(self) -> None
- Clear this field.
- get(self) -> bool
- Get the value of this flag.
- set(self, val: bool = True) -> None
- Set this flag.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from BitField:
- asdict(self) -> Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]]
- Get this field as a dictionary.
Data and other attributes inherited from BitField:
- name_regex = re.compile('^[a-z0-9_.-]+$')
Methods inherited from BitFieldBase:
- __call__(self, val: int = None) -> int
- Set (or get) the underlying value of this field. Return the actual
value of the field.
- invert(self) -> int
- Invert the value of this field and return the result.
- where_str(self) -> str
- Get a simple string representing the bit locations this field occupies.
Data descriptors inherited from BitFieldBase:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Class methods inherited from runtimepy.mixins.regex.RegexMixin:
- validate_name(name: str, logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None) -> bool from builtins.type
- Determine if a name is valid for this class.
Readonly properties inherited from runtimepy.mixins.enum.EnumMixin:
- enum
- Get the enum-registry key for this channel.
- is_enum
- Determine if this channel has an associated enumeration.
| |