PacketBufferQueue
Python template · sinapsis_generic_data_tools.templates.packet_buffer_queue
Overview
Template to perform buffering of a data packet Data is stored in a front buffer unless a trigger is set in which case, a PacketBuffer is generated, and data is stored in the tail buffer. Once the tail buffer is full, it is appended to the generic_data field in DataContainer
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-generic-data-tools==1.0.0uv pip install sinapsis-generic-data-tools==1.0.0uv add sinapsis-generic-data-tools==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: null
size of the tail queue packet_to_store(Literal["audios", "images", "texts", "time_series", "binary_data"]): type of packet to be buffered.
Required
Default: null
size of the front queue
Required
Default: null
name of the buffer
Required
Default: null
Required
Default: null
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "PacketBufferQueue"
class_name: "PacketBufferQueue"
attributes:
tail_size: "<required>"
front_size: "<required>"
buffer_name: "<required>"
packet_to_store: "<required>"
View original docstring example
The source example references BufferTemplate, not PacketBufferQueue.
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: BufferTemplate
class_name: BufferTemplate
template_input: InputTemplate
attributes:
buffer_name: 'name_of_buffer'
front_size: '10'
tail_size: '10'
packet_to_store: 'texts'Inheritance
sinapsis_core.template_base.template.TemplateEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.