Goby3 3.6.1
2026.09.15
Loading...
Searching...
No Matches
goby::middleware::python::ApplicationWrapperTrampoline< App > Class Template Reference

Lets Python subclasses override the Goby virtual methods. More...

#include <goby/middleware/languages/python/application.h>

Inheritance diagram for goby::middleware::python::ApplicationWrapperTrampoline< App >:
goby::middleware::python::ApplicationWrapper< App >

Public Member Functions

void loop () override
 Override in Python to do work at loop_frequency Hz.
 
void initialize () override
 Override in Python for work that can't be done in the constructor.
 
void finalize () override
 Override in Python for cleanup just before the application exits.
 
std::string health (py::bytes serialized) override
 Override in Python to answer goby_coroner's health request.
 
- Public Member Functions inherited from goby::middleware::python::ApplicationWrapper< App >
 ApplicationWrapper (double loop_frequency_hertz=0)
 Constructs the underlying Goby application.
 
virtual ~ApplicationWrapper ()=default
 
 ApplicationWrapper (const ApplicationWrapper &)=delete
 
ApplicationWrapper & operator= (const ApplicationWrapper &)=delete
 
int run ()
 Runs the Goby event loop until quit() is called or the application is terminated.
 
void quit (int return_value=0)
 Requests a clean exit.
 
std::string app_name ()
 The application name, as set by –app_name or derived from argv[0].
 
py::bytes cfg_serialized ()
 The configuration the application was started with, serialized as Protobuf.
 
void set_loop_frequency_hertz (double loop_frequency_hertz)
 
void publish (int layer, const std::string &type_name, int scheme, const std::string &group, const std::string &data)
 Publishes already-marshalled bytes; dispatched by the generated glue code.
 
void subscribe (int layer, const std::string &type_name, int scheme, const std::string &group, py::object callback)
 Subscribes a Python callable; dispatched by the generated glue code.
 

Additional Inherited Members

- Static Public Member Functions inherited from goby::middleware::python::ApplicationWrapper< App >
static py::bytes configure (const std::vector< std::string > &argv)
 Reads the command line into the application configuration.
 
static py::bytes configure_from_text (const std::string &config_text)
 Reads the application configuration from a Protobuf TextFormat string.
 
static py::bytes configure_from_serialized (const std::string &config_bytes)
 Reads the application configuration from a serialized Protobuf message.
 

Detailed Description

template<typename App>
class goby::middleware::python::ApplicationWrapperTrampoline< App >

Lets Python subclasses override the Goby virtual methods.

Definition at line 456 of file application.h.

Member Function Documentation

◆ finalize()

template<typename App >
void goby::middleware::python::ApplicationWrapperTrampoline< App >::finalize ( )
inlineoverridevirtual

Override in Python for cleanup just before the application exits.

Reimplemented from goby::middleware::python::ApplicationWrapper< App >.

Definition at line 463 of file application.h.

◆ health()

template<typename App >
std::string goby::middleware::python::ApplicationWrapperTrampoline< App >::health ( py::bytes  serialized)
inlineoverridevirtual

Override in Python to answer goby_coroner's health request.

Parameters
serializedthe ThreadHealth Goby filled in
Returns
the ThreadHealth to report, or an empty string to keep Goby's unchanged

Reimplemented from goby::middleware::python::ApplicationWrapper< App >.

Definition at line 464 of file application.h.

◆ initialize()

template<typename App >
void goby::middleware::python::ApplicationWrapperTrampoline< App >::initialize ( )
inlineoverridevirtual

Override in Python for work that can't be done in the constructor.

Reimplemented from goby::middleware::python::ApplicationWrapper< App >.

Definition at line 462 of file application.h.

◆ loop()

template<typename App >
void goby::middleware::python::ApplicationWrapperTrampoline< App >::loop ( )
inlineoverridevirtual

Override in Python to do work at loop_frequency Hz.

Reimplemented from goby::middleware::python::ApplicationWrapper< App >.

Definition at line 461 of file application.h.


The documentation for this class was generated from the following file: