DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
|
Interprocess communication decorator. More...
#include <interprocess_decorator.hpp>
Public Member Functions | |
InterprocessDecorator (std::unique_ptr< AbstractIntegrator< S > > integrator, InterprocessConfig config={}) | |
Construct interprocess decorator. | |
~InterprocessDecorator () | |
Destructor ensures proper cleanup. | |
void | step (typename IntegratorDecorator< S >::state_type &state, typename IntegratorDecorator< S >::time_type dt) override |
Override step to handle IPC during integration. | |
void | integrate (typename IntegratorDecorator< S >::state_type &state, typename IntegratorDecorator< S >::time_type dt, typename IntegratorDecorator< S >::time_type end_time) override |
Override integrate to handle IPC during integration. | |
void | set_receive_callback (std::function< void(const S &, typename IntegratorDecorator< S >::time_type)> callback) |
Set callback for received data. | |
bool | send_state (const S &state, typename IntegratorDecorator< S >::time_type time) |
Send state data to other processes. | |
const IPCStats & | get_statistics () const |
Get current IPC statistics. | |
void | reset_statistics () |
Reset IPC statistics. | |
bool | is_connected () const |
Check if channel is connected. | |
std::string | get_status () const |
Get channel status. | |
InterprocessConfig & | config () |
Access and modify interprocess configuration. | |
const InterprocessConfig & | config () const |
![]() | |
IntegratorDecorator (std::unique_ptr< base_type > integrator) | |
Construct decorator wrapping another integrator. | |
virtual | ~IntegratorDecorator ()=default |
Virtual destructor for proper cleanup. | |
void | step (state_type &state, time_type dt) override |
void | integrate (state_type &state, time_type dt, time_type end_time) override |
time_type | current_time () const override |
void | set_time (time_type t) override |
void | set_system (system_function sys) override |
base_type & | wrapped () |
Access to wrapped integrator for advanced use. | |
const base_type & | wrapped () const |
bool | has_wrapped_integrator () const |
Check if wrapped integrator exists. | |
![]() | |
AbstractIntegrator (system_function sys) | |
time_type | current_time () const |
void | set_time (time_type t) |
void | set_system (system_function sys) |
Additional Inherited Members | |
![]() | |
using | base_type = AbstractIntegrator< S > |
using | state_type = typename base_type::state_type |
using | time_type = typename base_type::time_type |
using | system_function = typename base_type::system_function |
![]() | |
using | state_type = S |
using | time_type = typename S::value_type |
using | value_type = typename S::value_type |
using | system_function = std::function< void(time_type, const state_type &, state_type &)> |
![]() | |
void | advance_time (time_type dt) |
![]() | |
std::unique_ptr< base_type > | wrapped_integrator_ |
![]() | |
system_function | sys_ |
time_type | current_time_ |
Interprocess communication decorator.
This decorator provides comprehensive IPC capabilities with the following features:
Key Design Principles:
Definition at line 567 of file interprocess_decorator.hpp.
|
inlineexplicit |
Construct interprocess decorator.
integrator | The integrator to wrap |
config | Interprocess configuration (validated on construction) |
std::invalid_argument | if config is invalid |
Definition at line 598 of file interprocess_decorator.hpp.
|
inline |
Destructor ensures proper cleanup.
Definition at line 613 of file interprocess_decorator.hpp.
|
inline |
Access and modify interprocess configuration.
Definition at line 743 of file interprocess_decorator.hpp.
|
inline |
Definition at line 744 of file interprocess_decorator.hpp.
|
inline |
Get current IPC statistics.
Definition at line 715 of file interprocess_decorator.hpp.
|
inline |
Get channel status.
Definition at line 736 of file interprocess_decorator.hpp.
|
inlineoverride |
Override integrate to handle IPC during integration.
Definition at line 646 of file interprocess_decorator.hpp.
|
inline |
Check if channel is connected.
Definition at line 729 of file interprocess_decorator.hpp.
|
inline |
Reset IPC statistics.
Definition at line 722 of file interprocess_decorator.hpp.
|
inline |
Send state data to other processes.
state | Current state |
time | Current time |
Definition at line 675 of file interprocess_decorator.hpp.
|
inline |
Set callback for received data.
callback | Function to call when data is received |
Definition at line 665 of file interprocess_decorator.hpp.
|
inlineoverride |
Override step to handle IPC during integration.
Definition at line 623 of file interprocess_decorator.hpp.