vyra_base.defaults package¶
Submodules¶
vyra_base.defaults.constants module¶
- class vyra_base.defaults.constants.RequiredVersion(*values)[source]¶
Bases:
EnumConstants used in the V.Y.R.A. universe.
According to “Pyright”, annotations like
Final[str]are not allowed.- PYTHON_MIN = (3, 9, 0)¶
- class vyra_base.defaults.constants.FeederConstants(MAX_DEFAULT_LENGTH=1000, MAX_PULLREQUESTSFEED_LENGTH=1000, MAX_NEWSFEED_LENGTH=1000, MAX_ERRORFEED_LENGTH=1000, MAX_STATEFEED_LENGTH=1000)[source]¶
Bases:
objectConstants for feeder limits.
- Variables:
MAX_DEFAULT_LENGTH – Default maximum length.
MAX_PULLREQUESTSFEED_LENGTH – Maximum length for pull requests feed.
MAX_NEWSFEED_LENGTH – Maximum length for news feed.
MAX_ERRORFEED_LENGTH – Maximum length for error feed.
MAX_STATEFEED_LENGTH – Maximum length for state feed.
- Parameters:
- __init__(MAX_DEFAULT_LENGTH=1000, MAX_PULLREQUESTSFEED_LENGTH=1000, MAX_NEWSFEED_LENGTH=1000, MAX_ERRORFEED_LENGTH=1000, MAX_STATEFEED_LENGTH=1000)¶
- class vyra_base.defaults.constants.LoggerConstants(MAX_QUEUE_LENGTH=1000)[source]¶
Bases:
objectConstants for logger configuration.
- Variables:
MAX_QUEUE_LENGTH – Maximum queue length for logger.
- Parameters:
- class vyra_base.defaults.constants.TimeoutConstants(CONNECT=5, SEND=5, RECEIVE=5, CLOSED=5)[source]¶
Bases:
objectSets all constants for handling timeout and message length of the different connection types like async, UDP.
- Variables:
CONNECT – Timeout for connect (seconds).
SEND – Timeout for send (seconds).
RECEIVE – Timeout for receive (seconds).
CLOSED – Timeout for closed state (seconds).
- Parameters:
- class vyra_base.defaults.constants.MessageLengthConstants(RECEIVE=4096)[source]¶
Bases:
objectConstants for message length.
vyra_base.defaults.entries module¶
- class vyra_base.defaults.entries.FunctionConfigParamTypes(*values)[source]¶
Bases:
EnumEnum for the function configuration parameter types.
Represents the types of parameters that can be used in a function configuration.
- Variables:
BOOL – Boolean type
BYTE – Byte type
CHAR – Char type
INT8 – 8-bit integer
UINT8 – 8-bit unsigned integer
INT16 – 16-bit integer
UINT16 – 16-bit unsigned integer
INT32 – 32-bit integer
UINT32 – 32-bit unsigned integer
INT64 – 64-bit integer
UINT64 – 64-bit unsigned integer
FLOAT32 – 32-bit float
FLOAT64 – 64-bit float
STRING – String type
TIME – Time type
DURATION – Duration type
ANY – Any type (user defined)
NONE – None type
ARRAY – Array type
- BOOL = 'bool'¶
- BYTE = 'byte'¶
- CHAR = 'char'¶
- INT8 = 'int8'¶
- UINT8 = 'uint8'¶
- INT16 = 'int16'¶
- UINT16 = 'uint16'¶
- INT32 = 'int32'¶
- UINT32 = 'uint32'¶
- INT64 = 'int64'¶
- UINT64 = 'uint64'¶
- FLOAT32 = 'float32'¶
- FLOAT64 = 'float64'¶
- STRING = 'string'¶
- TIME = 'time'¶
- DURATION = 'duration'¶
- ANY = 'any'¶
- NONE = 'none'¶
- ARRAY = 'array'¶
- class vyra_base.defaults.entries.DCBase[source]¶
Bases:
objectBase dataclass providing utility methods for all VYRA dataclass entries.
Provides common functionality like dict conversion for dataclass instances.
- asdict()[source]¶
Convert the dataclass instance to a dictionary.
- Returns:
Dictionary representation of the dataclass.
- Return type:
- __init__()¶
- Return type:
None
- class vyra_base.defaults.entries.FunctionConfigBaseTypes(*values)[source]¶
Bases:
EnumEnum for the function configuration base types.
Represents the types of a function configuration.
- Variables:
message – Represents a message function (simple message)
service – Represents a service function (request-reply pattern)
action – Represents an action function (request-feedback-reply pattern)
- message = 'message'¶
- service = 'service'¶
- action = 'action'¶
- class vyra_base.defaults.entries.FunctionConfigTags(*values)[source]¶
-
Enum for the function configuration tags.
Defines which transport protocol(s) a function entry supports. Matches the protocol identifiers used in interface metadata JSON files.
Using
str, Enumso tag values compare equal to plain strings and serialise cleanly to JSON.- Variables:
ROS2 – ROS2 transport (DDS topics, services, actions)
ZENOH – Zenoh transport (pub/sub, queryable)
REDIS – Redis transport (pub/sub, streams)
UDS – Unix Domain Socket transport
- ROS2 = 'ros2'¶
- ZENOH = 'zenoh'¶
- REDIS = 'redis'¶
- UDS = 'uds'¶
- class vyra_base.defaults.entries.FunctionConfigBaseParams(datatype, displayname, description)[source]¶
Bases:
DCBaseEnum for the function configuration base parameters.
Represents the parameters of a function configuration.
- Variables:
datatype – The data type of the parameter (
FunctionConfigParamTypes)displayname – The display name of the parameter
description – A description of the parameter
- Parameters:
datatype (FunctionConfigParamTypes)
displayname (str)
description (str)
- datatype: FunctionConfigParamTypes¶
- __init__(datatype, displayname, description)¶
- Parameters:
datatype (FunctionConfigParamTypes)
displayname (str)
description (str)
- Return type:
None
- class vyra_base.defaults.entries.FunctionConfigBaseReturn(datatype, displayname, description)[source]¶
Bases:
DCBaseEnum for the function configuration base return values.
Represents the return values of a function configuration.
- Variables:
datatype – The data type of the return value (
FunctionConfigParamTypes)displayname – The display name of the return value
description – A description of the return value
- Parameters:
datatype (FunctionConfigParamTypes)
displayname (str)
description (str)
- datatype: FunctionConfigParamTypes¶
- __init__(datatype, displayname, description)¶
- Parameters:
datatype (FunctionConfigParamTypes)
displayname (str)
description (str)
- Return type:
None
- class vyra_base.defaults.entries.FunctionConfigDisplaystyle(visible=False, published=False)[source]¶
Bases:
DCBaseEnum for the function configuration display style.
Defines how the function is displayed in the GUI.
- Variables:
visible – If True, the function is visible in the GUI
published – If True, the function is published in the GUI
- Parameters:
- class vyra_base.defaults.entries.FunctionConfigPeriodicPublisher(caller, interval=1.0)[source]¶
Bases:
DCBaseStores the periodic publisher settings.
- Parameters:
- Raises:
ValueError – If the interval is not between 0.01 and 10.0 seconds
- class vyra_base.defaults.entries.FunctionConfigEntry(tags, type, interfacetypes, functionname, displayname, description, displaystyle, params=<factory>, returns=<factory>, qosprofile=10, callbacks=None, periodic=None, namespace=None, subsection=None)[source]¶
Bases:
DCBaseContains the function configuration.
Stores the function settings for type safety and DDS communication node configuration.
- Parameters:
tags (
list[FunctionConfigTags]) – Tags for the functiontype (
FunctionConfigBaseTypes) – Type of the functioninterfacetypes (
Any) – Interface types of the functionfunctionname (
str) – Name of the functiondisplayname (
str) – Display name of the functiondescription (
str) – Description of the functiondisplaystyle (
FunctionConfigDisplaystyle) – Display style of the functionparams (
list[FunctionConfigBaseParams]) – Parameters of the functionreturns (
list[FunctionConfigBaseReturn]) – Return values of the functionqosprofile (
Union[int,QoSProfile]) – Quality of Service profile (default: 10)callbacks (
Optional[dict[str,Callable]]) – Functions to be called when the function is invoked (only for callable)periodic (
Optional[FunctionConfigPeriodicPublisher]) – Function to be called periodically (only for publisher)namespace (
Optional[str]) – Optional topic namespace segment inserted between module id and function namesubsection (
Optional[str]) – Optional sub-topic segment appended after the function name
- tags: list[FunctionConfigTags]¶
- type: FunctionConfigBaseTypes¶
- displaystyle: FunctionConfigDisplaystyle¶
- params: list[FunctionConfigBaseParams]¶
- returns: list[FunctionConfigBaseReturn]¶
- periodic: FunctionConfigPeriodicPublisher | None¶
- asdict()[source]¶
Convert FunctionConfigEntry to dictionary with special handling for callable fields.
Converts callable references and ROS2 types to their string names for serialization. Nested dataclasses are recursively converted.
- Returns:
Dictionary representation with serializable values.
- Return type:
- __init__(tags, type, interfacetypes, functionname, displayname, description, displaystyle, params=<factory>, returns=<factory>, qosprofile=10, callbacks=None, periodic=None, namespace=None, subsection=None)¶
- Parameters:
tags (list[FunctionConfigTags])
type (FunctionConfigBaseTypes)
interfacetypes (Any)
functionname (str)
displayname (str)
description (str)
displaystyle (FunctionConfigDisplaystyle)
params (list[FunctionConfigBaseParams])
returns (list[FunctionConfigBaseReturn])
qosprofile (int | rclpy.qos.QoSProfile)
periodic (FunctionConfigPeriodicPublisher | None)
namespace (str | None)
subsection (str | None)
- Return type:
None
- class vyra_base.defaults.entries.ErrorEntry(level=0, code=0, uuid=<factory>, timestamp='', description='', solution='', miscellaneous='', module_name='N/A', module_id='N/A')[source]¶
Bases:
DCBaseContainer for the error entry.
Stores the error details.
- Parameters:
level (
Union[ERROR_LEVEL,int]) – The level of the error (default: 0, MINOR_FAULT)code (
int) – The error code (default: 0x00000000)uuid (
Union[UUID,Any]) – Unique identifier for the error entrytimestamp (
Any) – Timestamp of when the error occurreddescription (
str) – Description of the errorsolution (
str) – Suggested solution for the errormiscellaneous (
str) – Additional information about the errormodule_name (
str) – Name of the module where the error occurredmodule_id (
Union[UUID,Any]) – Unique identifier for the module
- level: ERROR_LEVEL | int¶
- class ERROR_LEVEL(*values)[source]¶
Bases:
IntEnumEnum for the error level.
- Variables:
MINOR_FAULT – Minor fault (0)
MAJOR_FAULT – Major fault (1)
CRITICAL_FAULT – Critical fault (2)
EMERGENCY_FAULT – Emergency fault (3)
- MINOR_FAULT = 0¶
- MAJOR_FAULT = 1¶
- CRITICAL_FAULT = 2¶
- EMERGENCY_FAULT = 3¶
- __init__(level=0, code=0, uuid=<factory>, timestamp='', description='', solution='', miscellaneous='', module_name='N/A', module_id='N/A')¶
- class vyra_base.defaults.entries.NewsEntry(level=2, message='', timestamp=datetime.datetime(2026, 4, 2, 14, 5, 6, 171085), uuid=UUID('13afed0f-41a9-421b-bab8-fa0663e59806'), module_name='N/A', module_id=UUID('4d0989ba-060f-42ee-9bc1-52924516803d'))[source]¶
Bases:
dictNews feed entry object.
Writes informational data to the graphical user interface.
- Parameters:
level (
Union[MESSAGE_LEVEL,int]) – The level of the message (default: 2, INFO)message (
str) – The message contenttimestamp (
Any) – Timestamp of when the message was createduuid (
Union[UUID,Any]) – Unique identifier for the news entrymodule_name (
str) – Name of the module that created the news entrymodule_id (
Union[UUID,Any]) – Unique identifier for the module
- __init__(level=2, message='', timestamp=datetime.datetime(2026, 4, 2, 14, 5, 6, 171085), uuid=UUID('13afed0f-41a9-421b-bab8-fa0663e59806'), module_name='N/A', module_id=UUID('4d0989ba-060f-42ee-9bc1-52924516803d'))[source]¶
- level: MESSAGE_LEVEL | int¶
- class vyra_base.defaults.entries.PullRequestEntry(uuid, ack_by_user, ack_on_date, request_structure, request_on_date, request_description, response, request_action, request_action_args, module_id, color)[source]¶
Bases:
DCBaseContains the pull request entry.
Stores the pull request details.
- Parameters:
uuid (
str) – Unique identifier for the pull requestack_by_user (
str) – User who acknowledged the pull requestack_on_date (
str) – Date when the pull request was acknowledgedrequest_structure (
str) – Structure of the requestrequest_on_date (
str) – Date when the request was maderequest_description (
str) – Description of the requestresponse (
str) – Response to the requestrequest_action (
str) – Action requested in the pull requestrequest_action_args (
list) – Arguments for the requested actionmodule_id (
str) – Unique identifier for the module associated with the pull requestcolor (
int) – Color code for visual representation in GUI
- __init__(uuid, ack_by_user, ack_on_date, request_structure, request_on_date, request_description, response, request_action, request_action_args, module_id, color)¶
- class vyra_base.defaults.entries.StateEntry(current, trigger, module_id, module_name, timestamp, previous='N/A')[source]¶
Bases:
DCBaseContains the state entry.
Stores the state details for life cycle overview of the module.
- Parameters:
current (
str) – Current state of the moduletrigger (
str) – Trigger that caused the state changemodule_id (
Union[UUID,Any]) – Unique identifier for the modulemodule_name (
str) – Name of the moduletimestamp (
Any) – Timestamp of when the state was recordedprevious (
str) – Previous state of the module (default: ‘N/A’)
- class vyra_base.defaults.entries.ModuleEntry(uuid, name, template, description, version)[source]¶
Bases:
DCBaseContains the module entry.
Stores the module details.
- Parameters:
- to_dict()[source]¶
Returns the dictionary representation of the ModuleEntry.
- Returns:
Dictionary containing the module details.
- Return type:
vyra_base.defaults.exceptions module¶
vyra_base.defaults.info module¶
- class vyra_base.defaults.info.AuthorInfo[source]¶
Bases:
objectInfo about the development team.
Contains nested
dataclassesclasses which are logically related to the AuthorInfo class. It adds some additional information about the development team and the company behind the software solution.- class Author(creator='V.Y.R.A. Development Team', phone='+49 731 85 07 22 0', mail='vyra.0a1@gmail.com')[source]¶
Bases:
objectAuthor class for setting Author information.
- Variables:
creator – Name of the creator or team.
phone – Contact phone number.
mail – Contact email address.
- Parameters:
- class FileChange(date, time)[source]¶
Bases:
objectFile change class for setting file change information.
- Variables:
date – Date of the file change.
time – Time of the file change.
- Parameters:
Module contents¶
This module provides default constants, entries, exceptions, and author information for the vyra_base package.
- author:
See AuthorInfo