vyra_base.defaults package

Submodules

vyra_base.defaults.constants module

class vyra_base.defaults.constants.RequiredVersion(*values)[Quellcode]

Bases: Enum

Constants 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)[Quellcode]

Bases: object

Constants for feeder limits.

Variablen:
  • 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.

Parameter:
MAX_DEFAULT_LENGTH: Final[int]
MAX_PULLREQUESTSFEED_LENGTH: Final[int]
MAX_NEWSFEED_LENGTH: Final[int]
MAX_ERRORFEED_LENGTH: Final[int]
MAX_STATEFEED_LENGTH: Final[int]
__init__(MAX_DEFAULT_LENGTH=1000, MAX_PULLREQUESTSFEED_LENGTH=1000, MAX_NEWSFEED_LENGTH=1000, MAX_ERRORFEED_LENGTH=1000, MAX_STATEFEED_LENGTH=1000)
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.constants.LoggerConstants(MAX_QUEUE_LENGTH=1000)[Quellcode]

Bases: object

Constants for logger configuration.

Variablen:

MAX_QUEUE_LENGTH – Maximum queue length for logger.

Parameter:

MAX_QUEUE_LENGTH (Final[int])

MAX_QUEUE_LENGTH: Final[int]
__init__(MAX_QUEUE_LENGTH=1000)
Parameter:

MAX_QUEUE_LENGTH (Final[int])

Rückgabetyp:

None

class vyra_base.defaults.constants.TimeoutConstants(CONNECT=5, SEND=5, RECEIVE=5, CLOSED=5)[Quellcode]

Bases: object

Sets all constants for handling timeout and message length of the different connection types like async, UDP.

Variablen:
  • CONNECT – Timeout for connect (seconds).

  • SEND – Timeout for send (seconds).

  • RECEIVE – Timeout for receive (seconds).

  • CLOSED – Timeout for closed state (seconds).

Parameter:
CONNECT: Final[int]
SEND: Final[int]
RECEIVE: Final[int]
CLOSED: Final[int]
__init__(CONNECT=5, SEND=5, RECEIVE=5, CLOSED=5)
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.constants.MessageLengthConstants(RECEIVE=4096)[Quellcode]

Bases: object

Constants for message length.

Variablen:

RECEIVE – Maximum receive message length (bytes).

Parameter:

RECEIVE (Final[int])

RECEIVE: Final[int]
__init__(RECEIVE=4096)
Parameter:

RECEIVE (Final[int])

Rückgabetyp:

None

class vyra_base.defaults.constants.CyclicRefreshConstants(NEWSFEED=100, LOGGER=20)[Quellcode]

Bases: object

Set the cyclic refresh time for the different modules in milliseconds.

Variablen:
  • NEWSFEED – Refresh time for news feed (ms).

  • LOGGER – Refresh time for logger (ms).

Parameter:
NEWSFEED: Final[int]
LOGGER: Final[int]
__init__(NEWSFEED=100, LOGGER=20)
Parameter:
Rückgabetyp:

None

vyra_base.defaults.entries module

class vyra_base.defaults.entries.FunctionConfigParamTypes(*values)[Quellcode]

Bases: Enum

Enum for the function configuration parameter types.

Represents the types of parameters that can be used in a function configuration.

Variablen:
  • 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[Quellcode]

Bases: object

Base dataclass providing utility methods for all VYRA dataclass entries.

Provides common functionality like dict conversion for dataclass instances.

asdict()[Quellcode]

Convert the dataclass instance to a dictionary.

Rückgabe:

Dictionary representation of the dataclass.

Rückgabetyp:

dict

__init__()
Rückgabetyp:

None

class vyra_base.defaults.entries.FunctionConfigBaseTypes(*values)[Quellcode]

Bases: Enum

Enum for the function configuration base types.

Represents the types of a function configuration.

Variablen:
  • 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)[Quellcode]

Bases: str, Enum

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, Enum so tag values compare equal to plain strings and serialise cleanly to JSON.

Variablen:
  • 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)[Quellcode]

Bases: DCBase

Enum for the function configuration base parameters.

Represents the parameters of a function configuration.

Variablen:
  • datatype – The data type of the parameter (FunctionConfigParamTypes)

  • displayname – The display name of the parameter

  • description – A description of the parameter

Parameter:
datatype: FunctionConfigParamTypes
displayname: str
description: str
__init__(datatype, displayname, description)
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.entries.FunctionConfigBaseReturn(datatype, displayname, description)[Quellcode]

Bases: DCBase

Enum for the function configuration base return values.

Represents the return values of a function configuration.

Variablen:
  • datatype – The data type of the return value (FunctionConfigParamTypes)

  • displayname – The display name of the return value

  • description – A description of the return value

Parameter:
datatype: FunctionConfigParamTypes
displayname: str
description: str
__init__(datatype, displayname, description)
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.entries.FunctionConfigDisplaystyle(visible=False, published=False)[Quellcode]

Bases: DCBase

Enum for the function configuration display style.

Defines how the function is displayed in the GUI.

Variablen:
  • visible – If True, the function is visible in the GUI

  • published – If True, the function is published in the GUI

Parameter:
visible: bool
published: bool
__init__(visible=False, published=False)
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.entries.FunctionConfigPeriodicPublisher(caller, interval=1.0)[Quellcode]

Bases: DCBase

Stores the periodic publisher settings.

Parameter:
  • caller (Callable) – The function to be called periodically

  • interval (float) – The time interval in seconds for the periodic call (default: 1.0, must be between 0.01 and 10.0)

Verursacht:

ValueError – If the interval is not between 0.01 and 10.0 seconds

caller: Callable
interval: float
asdict()[Quellcode]

Convert periodic publisher config to dictionary, replacing callable with name.

Rückgabe:

Dictionary with caller function name instead of reference.

Rückgabetyp:

dict

__init__(caller, interval=1.0)
Parameter:
Rückgabetyp:

None

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)[Quellcode]

Bases: DCBase

Contains the function configuration.

Stores the function settings for type safety and DDS communication node configuration.

Parameter:
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
callbacks: dict[str, Callable] | None
periodic: FunctionConfigPeriodicPublisher | None
namespace: str | None
subsection: str | None
asdict()[Quellcode]

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.

Rückgabe:

Dictionary representation with serializable values.

Rückgabetyp:

dict

__init__(tags, type, interfacetypes, functionname, displayname, description, displaystyle, params=<factory>, returns=<factory>, qosprofile=10, callbacks=None, periodic=None, namespace=None, subsection=None)
Parameter:
Rückgabetyp:

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')[Quellcode]

Bases: DCBase

Container for the error entry.

Stores the error details.

Parameter:
  • 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 entry

  • timestamp (Any) – Timestamp of when the error occurred

  • description (str) – Description of the error

  • solution (str) – Suggested solution for the error

  • miscellaneous (str) – Additional information about the error

  • module_name (str) – Name of the module where the error occurred

  • module_id (Union[UUID, Any]) – Unique identifier for the module

level: ERROR_LEVEL | int
code: int
uuid: UUID | Any
timestamp: Any
description: str
solution: str
miscellaneous: str
module_name: str
module_id: UUID | Any
class ERROR_LEVEL(*values)[Quellcode]

Bases: IntEnum

Enum for the error level.

Variablen:
  • 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')
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.entries.NewsEntry(level=2, message='', timestamp=datetime.datetime(2026, 4, 2, 14, 6, 13, 751465), uuid=UUID('c64745c1-1520-47f2-b5aa-fe1c67111ad3'), module_name='N/A', module_id=UUID('fc67c4a1-02bc-4205-81f6-f726b268d081'))[Quellcode]

Bases: dict

News feed entry object.

Writes informational data to the graphical user interface.

Parameter:
  • level (Union[MESSAGE_LEVEL, int]) – The level of the message (default: 2, INFO)

  • message (str) – The message content

  • timestamp (Any) – Timestamp of when the message was created

  • uuid (Union[UUID, Any]) – Unique identifier for the news entry

  • module_name (str) – Name of the module that created the news entry

  • module_id (Union[UUID, Any]) – Unique identifier for the module

__init__(level=2, message='', timestamp=datetime.datetime(2026, 4, 2, 14, 6, 13, 751465), uuid=UUID('c64745c1-1520-47f2-b5aa-fe1c67111ad3'), module_name='N/A', module_id=UUID('fc67c4a1-02bc-4205-81f6-f726b268d081'))[Quellcode]
Parameter:
Rückgabetyp:

None

message: str
level: MESSAGE_LEVEL | int
timestamp: datetime | Any
uuid: UUID | Any
module_name: str
module_id: UUID | Any
class MESSAGE_LEVEL(*values)[Quellcode]

Bases: IntEnum

Enum for the message type.

Variablen:
  • ACTION – Action message (0)

  • DEBUG – Debug message (1)

  • INFO – Info message (2)

  • HINT – Hint message (3)

  • WARNING – Warning message (4)

ACTION = 0
DEBUG = 1
INFO = 2
HINT = 3
WARNING = 4
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)[Quellcode]

Bases: DCBase

Contains the pull request entry.

Stores the pull request details.

Parameter:
  • uuid (str) – Unique identifier for the pull request

  • ack_by_user (str) – User who acknowledged the pull request

  • ack_on_date (str) – Date when the pull request was acknowledged

  • request_structure (str) – Structure of the request

  • request_on_date (str) – Date when the request was made

  • request_description (str) – Description of the request

  • response (str) – Response to the request

  • request_action (str) – Action requested in the pull request

  • request_action_args (list) – Arguments for the requested action

  • module_id (str) – Unique identifier for the module associated with the pull request

  • color (int) – Color code for visual representation in GUI

uuid: str
ack_by_user: str
ack_on_date: str
request_structure: str
request_on_date: str
request_description: str
response: str
request_action: str
request_action_args: list
module_id: str
color: int
__init__(uuid, ack_by_user, ack_on_date, request_structure, request_on_date, request_description, response, request_action, request_action_args, module_id, color)
Parameter:
  • uuid (str)

  • ack_by_user (str)

  • ack_on_date (str)

  • request_structure (str)

  • request_on_date (str)

  • request_description (str)

  • response (str)

  • request_action (str)

  • request_action_args (list)

  • module_id (str)

  • color (int)

Rückgabetyp:

None

class vyra_base.defaults.entries.StateEntry(current, trigger, module_id, module_name, timestamp, previous='N/A')[Quellcode]

Bases: DCBase

Contains the state entry.

Stores the state details for life cycle overview of the module.

Parameter:
  • current (str) – Current state of the module

  • trigger (str) – Trigger that caused the state change

  • module_id (Union[UUID, Any]) – Unique identifier for the module

  • module_name (str) – Name of the module

  • timestamp (Any) – Timestamp of when the state was recorded

  • previous (str) – Previous state of the module (default: ‚N/A‘)

current: str
trigger: str
module_id: UUID | Any
module_name: str
timestamp: Any
previous: str
__init__(current, trigger, module_id, module_name, timestamp, previous='N/A')
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.entries.ModuleEntry(uuid, name, template, description, version)[Quellcode]

Bases: DCBase

Contains the module entry.

Stores the module details.

Parameter:
  • uuid (str) – Unique identifier for the module

  • name (str) – Name of the module

  • template (str) – Template identifier for the module

  • description (str) – Description of the module

  • version (str) – Version of the module (semantic versioning, e.g. ‚1.0.0‘)

uuid: str
name: str
template: str
description: str
version: str
to_dict()[Quellcode]

Returns the dictionary representation of the ModuleEntry.

Rückgabe:

Dictionary containing the module details.

Rückgabetyp:

dict

static gen_uuid()[Quellcode]

Generates a new UUID for the module entry in hex format

Rückgabetyp:

str

restructure_uuid()[Quellcode]

Converts the UUID string to a UUID object.

Rückgabe:

UUID object of the module entry.

Rückgabetyp:

UUID

__init__(uuid, name, template, description, version)
Parameter:
Rückgabetyp:

None

class vyra_base.defaults.entries.AvailableModuleEntry[Quellcode]

Bases: DCBase

Not used in the current implementation.

__init__()
Rückgabetyp:

None

vyra_base.defaults.exceptions module

exception vyra_base.defaults.exceptions.FeederException(message)[Quellcode]

Bases: Exception

Exception raised for errors in the feeder.

Parameter:

message (str) – Explanation of the error.

__init__(message)[Quellcode]

Initialize FeederException.

Parameter:

message (str) – Explanation of the error.

vyra_base.defaults.info module

class vyra_base.defaults.info.AuthorInfo[Quellcode]

Bases: object

Info about the development team.

Contains nested dataclasses classes 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')[Quellcode]

Bases: object

Author class for setting Author information.

Variablen:
  • creator – Name of the creator or team.

  • phone – Contact phone number.

  • mail – Contact email address.

Parameter:
creator: str
phone: str
mail: str
__init__(creator='V.Y.R.A. Development Team', phone='+49 731 85 07 22 0', mail='vyra.0a1@gmail.com')
Parameter:
Rückgabetyp:

None

class FileChange(date, time)[Quellcode]

Bases: object

File change class for setting file change information.

Variablen:
  • date – Date of the file change.

  • time – Time of the file change.

Parameter:
date: str
time: str
__init__(date, time)
Parameter:
Rückgabetyp:

None

class Version(major=0, minor=1, patch=0)[Quellcode]

Bases: object

Version class for setting version information.

Variablen:
  • major – Major version number.

  • minor – Minor version number.

  • patch – Patch version number.

Parameter:
major: int
minor: int
patch: int
__init__(major=0, minor=1, patch=0)
Parameter:
Rückgabetyp:

None

Module contents

This module provides default constants, entries, exceptions, and author information for the vyra_base package.

author:

See AuthorInfo