runtimepy.channel.environment.array
index
/home/vkottler/src/vkottler/workspace/runtimepy/runtimepy/channel/environment/array.py

A channel-environment extension for creating arrays of primitives.

 
Classes
       
builtins.tuple(builtins.object)
ChannelArray
runtimepy.channel.environment.base.BaseChannelEnvironment(vcorelib.namespace.mixin.NamespaceMixin, runtimepy.mixins.finalize.FinalizeMixin)
ArrayChannelEnvironment

 
class ArrayChannelEnvironment(runtimepy.channel.environment.base.BaseChannelEnvironment)
    ArrayChannelEnvironment(channels: runtimepy.channel.registry.ChannelRegistry = None, enums: runtimepy.enum.registry.EnumRegistry = None, values: dict[typing.Union[str, int], typing.Union[bool, int, float, str]] = None, fields: Iterable[runtimepy.primitives.field.fields.BitFields] = None, namespace: vcorelib.namespace.base.Namespace = None, namespace_delim: str = '.') -> None
 
A channel-environment extension for working with arrays of primitives.
 
 
Method resolution order:
ArrayChannelEnvironment
runtimepy.channel.environment.base.BaseChannelEnvironment
vcorelib.namespace.mixin.NamespaceMixin
runtimepy.mixins.finalize.FinalizeMixin
builtins.object

Methods defined here:
array(self, keys: Iterable[Union[str, int]]) -> runtimepy.channel.environment.array.ChannelArray
Create a primitive array from an in-order iterable of registry keys.

Methods inherited from runtimepy.channel.environment.base.BaseChannelEnvironment:
__eq__(self, other) -> bool
Determine if two channel environments are equivalent.
__getitem__(self, key: Union[str, int]) -> tuple[typing.Union[runtimepy.channel.Channel[runtimepy.primitives.int.Int8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int64Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint64Primitive], runtimepy.channel.Channel[runtimepy.primitives.float.FloatPrimitive], runtimepy.channel.Channel[runtimepy.primitives.float.DoublePrimitive], runtimepy.channel.Channel[runtimepy.primitives.bool.BooleanPrimitive]], typing.Optional[runtimepy.enum.RuntimeEnum]]
Get a channel and its enumeration.
__init__(self, channels: runtimepy.channel.registry.ChannelRegistry = None, enums: runtimepy.enum.registry.EnumRegistry = None, values: dict[typing.Union[str, int], typing.Union[bool, int, float, str]] = None, fields: Iterable[runtimepy.primitives.field.fields.BitFields] = None, namespace: vcorelib.namespace.base.Namespace = None, namespace_delim: str = '.') -> None
Initialize this channel environment.
__setitem__(self, key: Union[str, int], value: Union[bool, int, float, str]) -> None
Mapping-set interface.
add_field(self, field: runtimepy.primitives.field.BitField, namespace: vcorelib.namespace.base.Namespace = None) -> str
Add a bit field to the environment.
add_int(self, key: Union[str, int], amount: int) -> int
Modify an integer channel.
age_ns(self, key: Union[str, int]) -> int
Get the age of an entity based on registry key.
apply(self, values: dict[typing.Union[str, int], typing.Union[bool, int, float, str]]) -> None
Apply a map of values to the environment.
exists(self, val: Union[str, int]) -> bool
Determine if a channel exists.
field_or_channel(self, val: Union[str, int]) -> Union[runtimepy.primitives.field.BitField, runtimepy.channel.Channel[runtimepy.primitives.int.Int8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int64Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint64Primitive], runtimepy.channel.Channel[runtimepy.primitives.float.FloatPrimitive], runtimepy.channel.Channel[runtimepy.primitives.float.DoublePrimitive], runtimepy.channel.Channel[runtimepy.primitives.bool.BooleanPrimitive], NoneType]
Attempt to look up a field or channel for a given registry key.
finalize(self, strict: bool = True) -> None
Finalize this instance.
get(self, val: Union[str, int]) -> Optional[tuple[Union[runtimepy.channel.Channel[runtimepy.primitives.int.Int8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int64Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint64Primitive], runtimepy.channel.Channel[runtimepy.primitives.float.FloatPrimitive], runtimepy.channel.Channel[runtimepy.primitives.float.DoublePrimitive], runtimepy.channel.Channel[runtimepy.primitives.bool.BooleanPrimitive]], Optional[runtimepy.enum.RuntimeEnum]]]
Attempt to get a channel and its enumeration (if it has one).
get_bool(self, key: Union[str, int]) -> tuple[runtimepy.channel.Channel[runtimepy.primitives.bool.BooleanPrimitive], typing.Optional[runtimepy.enum.RuntimeEnum]]
Get a boolean channel.
get_float(self, key: Union[str, int]) -> Union[runtimepy.channel.Channel[runtimepy.primitives.float.FloatPrimitive], runtimepy.channel.Channel[runtimepy.primitives.float.DoublePrimitive]]
Get a floating-point channel.
get_int(self, key: Union[str, int]) -> tuple[typing.Union[runtimepy.channel.Channel[runtimepy.primitives.int.Int8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Int64Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint8Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint16Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint32Primitive], runtimepy.channel.Channel[runtimepy.primitives.int.Uint64Primitive]], typing.Optional[runtimepy.enum.RuntimeEnum]]
Get an integer channel.
set(self, key: Union[str, int], value: Union[bool, int, float, str]) -> None
Attempt to set an arbitrary channel value.
value(self, key: Union[str, int], resolve_enum: bool = True) -> Union[bool, int, float, str]
Attempt to get a channel's current value.
values(self, resolve_enum: bool = True) -> dict[typing.Union[str, int], typing.Union[bool, int, float, str]]
Get a new dictionary of current channel values.

Data and other attributes inherited from runtimepy.channel.environment.base.BaseChannelEnvironment:
__hash__ = None

Methods inherited from vcorelib.namespace.mixin.NamespaceMixin:
child_namespace(self, *names: str, namespace: vcorelib.namespace.base.Namespace = None) -> vcorelib.namespace.base.Namespace
Obtain a child namespace.
names_pushed(self, *names: str, namespace: vcorelib.namespace.base.Namespace = None) -> Iterator[NoneType]
Apply some names to this object's namespace as a managed context.
namespace(self, name: str = None, delim: str = None, namespace: vcorelib.namespace.base.Namespace = None) -> str
Get a namespace string for this object.
namespace_search(self, *names: str, pattern: str = '.*', namespace: vcorelib.namespace.base.Namespace = None) -> Iterator[str]
Perform a search on the namespace.
namespace_suggest(self, data: str, delta: bool = True, namespace: vcorelib.namespace.base.Namespace = None) -> Optional[str]
Find the shortest name suggestion.
pop_name(self, name: str = None, namespace: vcorelib.namespace.base.Namespace = None) -> str
Pop the latest name off the stack.
push_name(self, name: str, namespace: vcorelib.namespace.base.Namespace = None) -> None
Push a name onto the stack.

Readonly properties inherited from vcorelib.namespace.mixin.NamespaceMixin:
ns
Get this instance's namespace.

Data descriptors inherited from vcorelib.namespace.mixin.NamespaceMixin:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Methods inherited from runtimepy.mixins.finalize.FinalizeMixin:
async wait_finalized(self) -> None
Wait for this instance to be finalized.

Readonly properties inherited from runtimepy.mixins.finalize.FinalizeMixin:
finalized
Determine if this instance is finalized or not.

 
class ChannelArray(builtins.tuple)
    ChannelArray(names: list[str], array: runtimepy.primitives.array.PrimitiveArray)
 
A class for managing an array of channels and bit-fields.
 
 
Method resolution order:
ChannelArray
builtins.tuple
builtins.object

Methods defined here:
__getnewargs__(self)
Return self as a plain tuple.  Used by copy and pickle.
__repr__(self)
Return a nicely formatted representation string
_asdict(self)
Return a new dict which maps field names to their values.
_replace(self, /, **kwds)
Return a new ChannelArray object replacing specified fields with new values

Class methods defined here:
_make(iterable) from builtins.type
Make a new ChannelArray object from a sequence or iterable

Static methods defined here:
__new__(_cls, names: list[str], array: runtimepy.primitives.array.PrimitiveArray)
Create new instance of ChannelArray(names, array)
create() -> 'ChannelArray'
Create a new, empty channel array.

Data descriptors defined here:
names
Alias for field number 0
array
Alias for field number 1

Data and other attributes defined here:
__annotations__ = {'array': <class 'runtimepy.primitives.array.PrimitiveArray'>, 'names': list[str]}
__match_args__ = ('names', 'array')
__orig_bases__ = (<function NamedTuple>,)
_field_defaults = {}
_fields = ('names', 'array')

Methods inherited from builtins.tuple:
__add__(self, value, /)
Return self+value.
__contains__(self, key, /)
Return bool(key in self).
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__getattribute__(self, name, /)
Return getattr(self, name).
__getitem__(self, key, /)
Return self[key].
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__iter__(self, /)
Implement iter(self).
__le__(self, value, /)
Return self<=value.
__len__(self, /)
Return len(self).
__lt__(self, value, /)
Return self<value.
__mul__(self, value, /)
Return self*value.
__ne__(self, value, /)
Return self!=value.
__rmul__(self, value, /)
Return value*self.
count(self, value, /)
Return number of occurrences of value.
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.
 
Raises ValueError if the value is not present.

Class methods inherited from builtins.tuple:
__class_getitem__(...) from builtins.type
See PEP 585