runtimepy.primitives
index
/home/vkottler/src/vkottler/workspace/runtimepy/runtimepy/primitives/__init__.py

A module implementing a primitive-type storage entity.

 
Package Contents
       
array (package)
base
bool
byte_order
field (package)
float
int
scaling
serializable (package)
string
types (package)

 
Classes
       
builtins.tuple(builtins.object)
runtimepy.util.StrToBool
typing.Generic(builtins.object)
runtimepy.primitives.base.Primitive
runtimepy.primitives.bool.BooleanPrimitive
runtimepy.primitives.float.DoublePrimitive
runtimepy.primitives.float.FloatPrimitive
runtimepy.primitives.float.HalfPrimitive
runtimepy.primitives.int.Int16Primitive
runtimepy.primitives.int.Int32Primitive
runtimepy.primitives.int.Int64Primitive
runtimepy.primitives.int.Int8Primitive
runtimepy.primitives.int.Uint16Primitive
runtimepy.primitives.int.Uint32Primitive
runtimepy.primitives.int.Uint64Primitive
runtimepy.primitives.int.Uint8Primitive

 
Bool = class BooleanPrimitive(runtimepy.primitives.base.Primitive)
    Bool(value: bool = False) -> None
 
A simple primitive class for booleans.
 
 
Method resolution order:
BooleanPrimitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: bool = False) -> None
Initialize this boolean primitive.
clear(self) -> None
Coerce the underlying value to false.
set(self) -> None
Coerce the underlying value to true.
toggle(self) -> None
Toggle the underlying value.

Data and other attributes defined here:
__annotations__ = {'value': <class 'bool'>}
__orig_bases__ = (runtimepy.primitives.base.Primitive[bool],)
__parameters__ = ()
kind = <runtimepy.primitives.types.bool.BooleanType object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Double = class DoublePrimitive(runtimepy.primitives.base.Primitive)
    Double(value: float = 0.0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for double-precision floating-point.
 
 
Method resolution order:
DoublePrimitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: float = 0.0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this floating-point primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[float],)
__parameters__ = ()
kind = <runtimepy.primitives.types.float.DoubleType object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Float = class FloatPrimitive(runtimepy.primitives.base.Primitive)
    Float(value: float = 0.0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for single-precision floating-point.
 
 
Method resolution order:
FloatPrimitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: float = 0.0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this floating-point primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[float],)
__parameters__ = ()
kind = <runtimepy.primitives.types.float.FloatType object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Half = class HalfPrimitive(runtimepy.primitives.base.Primitive)
    Half(value: float = 0.0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for single-precision floating-point.
 
 
Method resolution order:
HalfPrimitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: float = 0.0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this floating-point primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[float],)
__parameters__ = ()
kind = <runtimepy.primitives.types.float.HalfType object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Int16 = class Int16Primitive(runtimepy.primitives.base.Primitive)
    Int16(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Int16Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Int16Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Int32 = class Int32Primitive(runtimepy.primitives.base.Primitive)
    Int32(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Int32Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Int32Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Int64 = class Int64Primitive(runtimepy.primitives.base.Primitive)
    Int64(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Int64Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Int64Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Int8 = class Int8Primitive(runtimepy.primitives.base.Primitive)
    Int8(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Int8Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Int8Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
class Primitive(typing.Generic)
    Primitive(value: ~T = None, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple class for storing and underlying primitive value.
 
 
Method resolution order:
Primitive
typing.Generic
builtins.object

Methods defined here:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__init__(self, value: ~T = None, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this primitive.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods defined here:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties defined here:
size
Get the size of this primitive.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes defined here:
__annotations__ = {'byte_order': <enum 'ByteOrder'>, 'kind': typing.Union[runtimepy.primitives.types.int.Int8...ype, runtimepy.primitives.types.bool.BooleanType]}
__orig_bases__ = (typing.Generic[~T],)
__parameters__ = (~T,)
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
class StrToBool(builtins.tuple)
    StrToBool(result: bool, valid: bool)
 
A container for results when converting strings to boolean.
 
 
Method resolution order:
StrToBool
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 StrToBool object replacing specified fields with new values

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

Static methods defined here:
__new__(_cls, result: bool, valid: bool)
Create new instance of StrToBool(result, valid)
parse(data: str) -> 'StrToBool'
Parse a string to boolean.

Data descriptors defined here:
result
Alias for field number 0
valid
Alias for field number 1

Data and other attributes defined here:
__annotations__ = {'result': <class 'bool'>, 'valid': <class 'bool'>}
__match_args__ = ('result', 'valid')
__orig_bases__ = (<function NamedTuple>,)
_field_defaults = {}
_fields = ('result', 'valid')

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

 
Uint16 = class Uint16Primitive(runtimepy.primitives.base.Primitive)
    Uint16(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Uint16Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Uint16Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Uint32 = class Uint32Primitive(runtimepy.primitives.base.Primitive)
    Uint32(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Uint32Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Uint32Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Uint64 = class Uint64Primitive(runtimepy.primitives.base.Primitive)
    Uint64(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Uint64Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Uint64Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Uint8 = class Uint8Primitive(runtimepy.primitives.base.Primitive)
    Uint8(value: int = 0, scaling: list[typing.Union[float, int]] = None) -&gt; None
 
A simple primitive class for integer primitives.
 
 
Method resolution order:
Uint8Primitive
runtimepy.primitives.base.Primitive
typing.Generic
builtins.object

Methods defined here:
__init__(self, value: int = 0, scaling: list[typing.Union[float, int]] = None) -> None
Initialize this integer primitive.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.base.Primitive[int],)
__parameters__ = ()
kind = <runtimepy.primitives.types.int.Uint8Type object>

Methods inherited from runtimepy.primitives.base.Primitive:
__bool__(self) -> bool
Use the underlying value for boolean evaluation.
__bytes__(self) -> bytes
Convert this instance to a byte array.
__call__(self, value: ~T = None) -> ~T
A callable interface for setting and getting the underlying value.
__copy__(self) -> 'Primitive[T]'
Make a copy of this primitive.
__eq__(self, other) -> bool
Determine if this instance is equivalent to the provided argument.
__hash__(self) -> int
A hash for this instance.
__str__(self) -> str
Get this primitive's value as a string.
age_ns(self, now: int = None) -> int
Get the age of this primitive's value in nanoseconds.
age_str(self, now: int = None) -> str
Get the age of this primitive's value as a string.
binary(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes
Convert this instance to a byte array.
copy(self) -> 'Primitive[T]'
A simple wrapper for copy.
from_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a stream and return the new value.
register_callback(self, callback: Callable[[~T, ~T], NoneType], once: bool = False) -> int
Register a callback and return an identifier for it.
remove_callback(self, callback_id: int) -> bool
Remove a callback if one is registered with this identifier.
to_stream(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int
Write this primitive to a stream.
update(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T
Update this primitive from a bytes object.

Class methods inherited from runtimepy.primitives.base.Primitive:
decode(data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Decode a primitive of this type from provided data.
encode(value: ~T, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> bytes from builtins.type
Create a bytes instance based on this primitive type.
read(stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> ~T from builtins.type
Read a primitive from the provided stream based on this primitive type.
write(value: ~T, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = None) -> int from builtins.type
Write a primitive to the stream based on this type.

Readonly properties inherited from runtimepy.primitives.base.Primitive:
size
Get the size of this primitive.

Data descriptors inherited from runtimepy.primitives.base.Primitive:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
scaled
Get this primitive as a scaled value.
value
Obtain the underlying value.

Data and other attributes inherited from runtimepy.primitives.base.Primitive:
byte_order = <ByteOrder.NETWORK: 4>

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Functions
       
create(value: Union[type[Union[runtimepy.primitives.int.Int8Primitive, runtimepy.primitives.int.Int16Primitive, runtimepy.primitives.int.Int32Primitive, runtimepy.primitives.int.Int64Primitive, runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive, runtimepy.primitives.float.HalfPrimitive, runtimepy.primitives.float.FloatPrimitive, runtimepy.primitives.float.DoublePrimitive, runtimepy.primitives.bool.BooleanPrimitive]], str], **kwargs) -> Union[runtimepy.primitives.int.Int8Primitive, runtimepy.primitives.int.Int16Primitive, runtimepy.primitives.int.Int32Primitive, runtimepy.primitives.int.Int64Primitive, runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive, runtimepy.primitives.float.HalfPrimitive, runtimepy.primitives.float.FloatPrimitive, runtimepy.primitives.float.DoublePrimitive, runtimepy.primitives.bool.BooleanPrimitive]
Create an instance of a primitive.
normalize(value: Union[type[Union[runtimepy.primitives.int.Int8Primitive, runtimepy.primitives.int.Int16Primitive, runtimepy.primitives.int.Int32Primitive, runtimepy.primitives.int.Int64Primitive, runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive, runtimepy.primitives.float.HalfPrimitive, runtimepy.primitives.float.FloatPrimitive, runtimepy.primitives.float.DoublePrimitive, runtimepy.primitives.bool.BooleanPrimitive]], str]) -> type[typing.Union[runtimepy.primitives.int.Int8Primitive, runtimepy.primitives.int.Int16Primitive, runtimepy.primitives.int.Int32Primitive, runtimepy.primitives.int.Int64Primitive, runtimepy.primitives.int.Uint8Primitive, runtimepy.primitives.int.Uint16Primitive, runtimepy.primitives.int.Uint32Primitive, runtimepy.primitives.int.Uint64Primitive, runtimepy.primitives.float.HalfPrimitive, runtimepy.primitives.float.FloatPrimitive, runtimepy.primitives.float.DoublePrimitive, runtimepy.primitives.bool.BooleanPrimitive]]
Normalize a type of primitive or a string into a type of primitive.

 
Data
        AnyPrimitive = typing.Union[runtimepy.primitives.int.Int8Primit...tive, runtimepy.primitives.bool.BooleanPrimitive]
ChannelScaling = list[typing.Union[float, int]]
Numeric = typing.Union[float, int]
Primitivelike = typing.Union[type[typing.Union[runtimepy.primiti...untimepy.primitives.bool.BooleanPrimitive]], str]
SignedInt = typing.Union[runtimepy.primitives.int.Int8Primit...imitive, runtimepy.primitives.int.Int64Primitive]
T = ~T
UnsignedInt = typing.Union[runtimepy.primitives.int.Uint8Primi...mitive, runtimepy.primitives.int.Uint64Primitive]
__all__ = ['ChannelScaling', 'Numeric', 'Bool', 'Double', 'Float', 'Half', 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'Uint32', 'Uint64', 'AnyPrimitive', 'T', 'Primitivelike', 'normalize', 'create', 'SignedInt', ...]
__annotations__ = {'Primitives': dict[str, type[typing.Union[runtimepy.primitives...ve, runtimepy.primitives.bool.BooleanPrimitive]]]}