|        |   | 
- abc.ABC(builtins.object)
 - 
- ProtocolFactory
  
 
- runtimepy.codec.protocol.json.JsonProtocol(runtimepy.codec.protocol.base.ProtocolBase)
 - 
- Protocol
  
 
 
 
 
  class Protocol(runtimepy.codec.protocol.json.JsonProtocol) |  
    
|     | 
Protocol(enum_registry: runtimepy.enum.registry.EnumRegistry, names: runtimepy.registry.name.NameRegistry = None, fields: runtimepy.primitives.field.manager.BitFieldsManager = None, build: list[typing.Union[int, runtimepy.codec.protocol.base.FieldSpec, str]] = None, identifier: int = 1, byte_order: Union[runtimepy.primitives.byte_order.ByteOrder, str, int] = <ByteOrder.NETWORK: 4>, serializables: dict[str, runtimepy.primitives.serializable.base.Serializable] = None) -> None 
  
A class for defining runtime communication protocols.   |  
|   | 
- Method resolution order:
 
- Protocol
 
- runtimepy.codec.protocol.json.JsonProtocol
 
- runtimepy.codec.protocol.base.ProtocolBase
 
- builtins.object
 
 
 
Methods inherited from runtimepy.codec.protocol.json.JsonProtocol: 
- export_json(self, resolve_enum: bool = True) -> dict[str, typing.Dict[str, typing.Union[str, int, float, bool, NoneType, typing.Dict[str, typing.Union[str, int, float, bool, NoneType]], typing.List[typing.Union[str, int, float, bool, NoneType]]]]]
 - Export this protocol's data to JSON.
  
- meta_bytes(self, resolve_enum: bool = True) -> bytes
 - Get protocol metadata as a bytes object.
  
- meta_str(self, resolve_enum: bool = True) -> str
 - Get protocol metadata as a string..
  
- write_meta(self, stream: <class 'BinaryIO'>, resolve_enum: bool = True) -> int
 - Write protocol metadata to a stream.
  
 
Class methods inherited from runtimepy.codec.protocol.json.JsonProtocol: 
- import_json(data: dict[str, typing.Dict[str, typing.Union[str, int, float, bool, NoneType, typing.Dict[str, typing.Union[str, int, float, bool, NoneType]], typing.List[typing.Union[str, int, float, bool, NoneType]]]]]) -> ~T from builtins.type
 - Create a bit-fields manager from JSON data.
  
 
Methods inherited from runtimepy.codec.protocol.base.ProtocolBase: 
- __copy__(self: ~T) -> ~T
 - Create another protocol instance from this one.
  
- __getitem__(self, name: str) -> Union[int, float, bool, str]
 - Get the value of a protocol field.
  
- __init__(self, enum_registry: runtimepy.enum.registry.EnumRegistry, names: runtimepy.registry.name.NameRegistry = None, fields: runtimepy.primitives.field.manager.BitFieldsManager = None, build: list[typing.Union[int, runtimepy.codec.protocol.base.FieldSpec, str]] = None, identifier: int = 1, byte_order: Union[runtimepy.primitives.byte_order.ByteOrder, str, int] = <ByteOrder.NETWORK: 4>, serializables: dict[str, runtimepy.primitives.serializable.base.Serializable] = None) -> None
 - Initialize this protocol.
  
- __setitem__(self, name: str, val: Union[int, float, bool, str]) -> None
 - Set a value of a field belonging to the protocol.
  
- __str__(self) -> str
 - Get this instance as a string.
  
- add_bit_fields(self, kind: 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] = 'uint8') -> Iterator[runtimepy.primitives.field.fields.BitFields]
 - Add a bit-fields primitive to the protocol.
  
- add_field(self, name: str, kind: 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] = None, enum: Union[str, int] = None, serializable: runtimepy.primitives.serializable.base.Serializable = None, track: bool = True, array_length: int = None) -> int
 - Add a new field to the protocol.
  
- add_serializable(self, name: str, serializable: runtimepy.primitives.serializable.base.Serializable, array_length: int = None) -> int
 - Add a serializable instance.
  
- register_name(self, name: str) -> int
 - Register the field name.
  
- trace_size(self, logger: Union[logging.Logger, logging.LoggerAdapter[Any]]) -> None
 - Log a size trace.
  
- value(self, name: str, resolve_enum: bool = True) -> Union[int, float, bool, str]
 - Get the value of a field belonging to the protocol.
  
 
Readonly properties inherited from runtimepy.codec.protocol.base.ProtocolBase: 
- size
 
- Get this protocol's size in bytes.
 
 
 
Data descriptors inherited from runtimepy.codec.protocol.base.ProtocolBase: 
- __dict__
 
- dictionary for instance variables
 
 
- __weakref__
 
- list of weak references to the object
 
 
 |    
 
  class ProtocolFactory(abc.ABC) |  
    
|     | 
A class implementing an interface for creating runtime instances of a 
prototypes that are unique to the implementing class.   |  
|   | 
- Method resolution order:
 
- ProtocolFactory
 
- abc.ABC
 
- builtins.object
 
 
 
Class methods defined here: 
- initialize(protocol: runtimepy.codec.protocol.Protocol) -> None from abc.ABCMeta
 - Initialize this protocol.
  
- instance() -> runtimepy.codec.protocol.Protocol from abc.ABCMeta
 - Create an instance of this factory's protocol.
  
- singleton() -> runtimepy.codec.protocol.Protocol from abc.ABCMeta
 - Get a shared single instance of a protocol for this class.
  
 
Data descriptors defined here: 
- __dict__
 
- dictionary for instance variables
 
 
- __weakref__
 
- list of weak references to the object
 
 
 
Data and other attributes defined here: 
- __abstractmethods__ = frozenset({'initialize'})
  
- __annotations__ = {'_singleton': typing.Optional[runtimepy.codec.protocol.Protocol], 'protocol': <class 'runtimepy.codec.protocol.Protocol'>}
  
- initialized = False
  
- protocol = <runtimepy.codec.protocol.Protocol object>
  
 |    |