|
SObjectizer
5.5
|
Public part of message limit implementation. More...
Namespaces | |
| anonymous_namespace{agent.cpp} | |
| anonymous_namespace{agent_coop.cpp} | |
| anonymous_namespace{environment.cpp} | |
| anonymous_namespace{event_exception_logger.cpp} | |
| anonymous_namespace{queue_locks_defaults_manager.cpp} | |
| anonymous_namespace{wrapped_env.cpp} | |
| api | |
| Public API functions of SObjectizer-5. | |
| autoshutdown_guard | |
| chrono_helpers | |
| Helper tools for std::chrono interaction. | |
| custom_mbox_details | |
| delivery_filter_templates | |
| Template-based implementations of delivery filters. | |
| dereg_reason | |
| Enumeration of cooperation deregistration reasons. | |
| details | |
| Some reusable and low-level classes/functions which can be used in public header files. | |
| disp | |
| Event dispatchers. | |
| env_infrastructures | |
| Various implementations of environment_infrastructure. | |
| enveloped_msg | |
| experimental | |
| impl | |
| Details of SObjectizer run-time implementations. | |
| internal_timer_helpers | |
| log_msg_details | |
| Implementation details of error_logging facility. | |
| mchain_auto_close_details | |
| mchain_props | |
| Various properties and parameters of message chains. | |
| msg_tracing | |
| Public part of message delivery tracing mechanism. | |
| prio | |
| Helpers for working with priorities. | |
| rt | |
| All code related to implementation of SObjectizer run-time. | |
| send_functions_details | |
| Implementation details for send-family and request_future/value helper functions. | |
| stats | |
| All stuff related to run-time monitoring and statistics. | |
| stdcpp | |
| thread_auto_join_details | |
| timer_thread | |
| Old timer thread related stuff. | |
| timers_details | |
| Timers implementation details. | |
| wait_for_service_invoke_proxy_details | |
| Helper functions for implementation of wait_for_service_invoke_proxy_t class. | |
Classes | |
| class | abstract_message_box_t |
| Mail box class. More... | |
| class | abstract_message_chain_t |
| An interace of message chain. More... | |
| class | adhoc_agent_definition_proxy_t |
| A proxy for process of ad-hoc agent definition. More... | |
| class | adhoc_agent_wrapper_t |
| Special agent class which would be used as wrapper for ad-hoc agents. More... | |
| class | agent_context_t |
| A context for agent construction and tuning. More... | |
| class | agent_state_listener_t |
| Interface of the agent state listener. More... | |
| class | agent_t |
| A base class for agents. More... | |
| class | agent_tuning_options_t |
| A collector for agent tuning options. More... | |
| class | atomic_refcounted_t |
| The base class for the object with a reference counting. More... | |
| struct | autoname_indicator_t |
| Special type for autoname-cooperation implementation. More... | |
| class | coop_deleter_t |
| A custom deleter for cooperation. More... | |
| class | coop_dereg_notificators_container_t |
| Container for cooperation deregistration notificators. More... | |
| class | coop_dereg_reason_t |
| class | coop_listener_t |
| Interface for the cooperation listener. More... | |
| class | coop_reg_notificators_container_t |
| Container for cooperation registration notificators. More... | |
| class | coop_t |
| Agent cooperation. More... | |
| class | delivery_filter_t |
| An interface of delivery filter object. More... | |
| class | disp_binder_t |
| Interface for dispatcher binders. More... | |
| class | dispatcher_t |
| An interface for all dispatchers. More... | |
| class | environment_infrastructure_t |
| An interface for environment_infrastructure entity. More... | |
| class | environment_params_t |
| Parameters for the SObjectizer Environment initialization. More... | |
| class | environment_t |
| SObjectizer Environment. More... | |
| class | error_logger_t |
| An interface for logging error messages. More... | |
| class | event_exception_logger_t |
| An interface for the exception logging. More... | |
| class | event_queue_hook_t |
| Interface of event_queue_hook object. More... | |
| class | event_queue_t |
| An interface of event queue for agent. More... | |
| class | exception_t |
| The base class for all SObjectizer exceptions. More... | |
| struct | execution_demand_t |
| A description of event execution demand. More... | |
| class | execution_hint_t |
| A hint for a dispatcher for execution of event for the concrete execution_demand. More... | |
| struct | immutable_msg |
| A special marker for immutable message. More... | |
| class | infinite_wait_service_invoke_proxy_t |
| A special helper class for infinite waiting of service call. More... | |
| struct | initial_substate_of |
| Helper for marking initial substate of composite state. More... | |
| class | intrusive_ptr_t |
| Template class for smart reference wrapper on the atomic_refcounted_t. More... | |
| struct | is_classical_message |
| A helper class for checking that message is a classical message derived from message_t class. More... | |
| struct | is_mutable_message |
| A helper class for checking that message is a mutable message. More... | |
| struct | is_mutable_message< mutable_msg< T > > |
| struct | is_signal |
| A helper class for checking that message is a signal. More... | |
| struct | is_user_type_message |
| A helper for detection presence of message of user type. More... | |
| struct | is_user_type_message< user_type_message_t< M > > |
| class | layer_t |
| An interface of the additional SObjectizer Environment layer. More... | |
| struct | mbox_creation_data_t |
| An information which is necessary for creation of a new mbox. More... | |
| class | mchain_bulk_processing_params_t |
| Basic parameters for advanced receive from mchain and for multi chain select. More... | |
| class | mchain_master_handle_t |
| Helper class for automatic close of a mchain at the destruction of master handle instance. More... | |
| class | mchain_params_t |
| Parameters for message chain. More... | |
| class | mchain_receive_params_t |
| Parameters for advanced receive from mchain. More... | |
| class | mchain_receive_result_t |
| A result of receive from mchain. More... | |
| class | mchain_select_params_t |
| Parameters for advanced select from multiple mchains. More... | |
| struct | message_payload_type |
| A helper class for detection of payload type of message. More... | |
| struct | message_payload_type< user_type_message_t< T > > |
| struct | message_payload_type_impl |
| Implementation details for message_payload_type. More... | |
| struct | message_payload_type_impl< T, false > |
| Implementation details for message_payload_type. More... | |
| class | message_t |
| A base class for agent messages. More... | |
| class | mhood_t |
| A message wrapped to be used as type of argument for event handlers. More... | |
| struct | msg_coop_deregistered |
| Message about cooperation deregistration completion. More... | |
| struct | msg_coop_registered |
| Message about cooperation registration completion. More... | |
| class | msg_service_request_base_t |
| A base class for concrete messages with information about service requests. More... | |
| struct | msg_service_request_t |
| A concrete message with information about service request. More... | |
| struct | mutable_msg |
| A special marker for mutable message. More... | |
| class | nonempty_name_t |
| A class for the name which cannot be empty. More... | |
| class | null_mutex_t |
| A class which is like std::mutex but does not do any real actions. More... | |
| class | outliving_reference_t |
| Helper class for indication of long-lived reference via its type. More... | |
| class | pause_backoff_t |
| An implementation of backoff object using assembly instruction. More... | |
| class | prepared_receive_t |
| Special container for holding receive parameters and receive cases. More... | |
| class | prepared_select_t |
| Special container for holding select parameters and select cases. More... | |
| class | queue_locks_defaults_manager_t |
| A base class for manager of default locks for event queues. More... | |
| class | read_lock_guard_t |
| Scoped guard for shared locks. More... | |
| class | rw_spinlock_t |
| A simple multi-readers/single-writer spinlock (analog of std::shared_mutex). More... | |
| class | service_invoke_proxy_t |
| A special proxy for service request invocation. More... | |
| struct | signal_indicator_t |
| A special class which will be used as return value for signal-indication helper. More... | |
| class | signal_t |
| A base class for agent signals. More... | |
| class | spinlock_t |
| A simple spinlock (analog of std::mutex). More... | |
| class | state_t |
| Class for the representing agent state. More... | |
| class | stderr_logger_t |
| A standard implementation of error_logger interface. More... | |
| class | stop_guard_t |
| An interface of stop_guard entity. More... | |
| class | subscription_bind_t |
| A class for creating a subscription to messages from the mbox. More... | |
| struct | substate_of |
| Helper for marking a substate of composite state. More... | |
| class | timer_id_t |
| An indentificator for the timer. More... | |
| class | timer_manager_t |
| Timer manager interface. More... | |
| class | timer_t |
| A base class for timer identificator. More... | |
| struct | timer_thread_stats_t |
| Statistics for run-time monitoring. More... | |
| class | timer_thread_t |
| Timer thread interface. More... | |
| struct | tuple_as_message_t |
| A template which allows to use tuples as messages. More... | |
| struct | typed_mtag |
| A helper template for simplification of defining unique message tags for tuple as message. More... | |
| struct | user_type_message_t |
| Template class for representing object of user type as a message. More... | |
| class | wait_for_service_invoke_proxy_t |
| A special helper class for waiting of service call for the specified timeout. More... | |
| class | wrapped_env_t |
| A wrapped environment. More... | |
| class | yield_backoff_t |
| An implementation of backoff object with usage of std::yield. More... | |
Typedefs | |
| typedef std::thread::id | current_thread_id_t |
| Type of the current thread id. More... | |
| using | error_logger_shptr_t = std::shared_ptr< error_logger_t > |
| An alias for shared_ptr to error_logger. More... | |
| typedef spinlock_t< pause_backoff_t > | default_spinlock_t |
| typedef rw_spinlock_t< pause_backoff_t > | default_rw_spinlock_t |
| using | stop_guard_shptr_t = std::shared_ptr< stop_guard_t > |
| An alias of shared_ptr for stop_guard. More... | |
| typedef std::unique_ptr< timer_thread_t > | timer_thread_unique_ptr_t |
| Auxiliary typedef for timer_thread autopointer. More... | |
| using | timer_thread_factory_t = std::function< timer_thread_unique_ptr_t(error_logger_shptr_t) > |
| Type of factory for creating timer_thread objects. More... | |
| using | timer_manager_unique_ptr_t = std::unique_ptr< timer_manager_t > |
| Auxiliary typedef for timer_manager autopointer. More... | |
| using | timer_manager_factory_t = std::function< timer_manager_unique_ptr_t(error_logger_shptr_t, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t >) > |
| Type of factory for creating timer_manager objects. More... | |
| typedef std::atomic_ulong | atomic_counter_t |
| Atomic counter type. More... | |
| typedef std::atomic_ulong | atomic_flag_t |
| Atomic flag type. More... | |
| typedef unsigned long long | mbox_id_t |
| A type for mbox indentifier. More... | |
| typedef std::function< void(environment_t &, const std::string &) > | coop_reg_notificator_t |
| Type of cooperation registration notificator. More... | |
| typedef intrusive_ptr_t< coop_reg_notificators_container_t > | coop_reg_notificators_container_ref_t |
| Typedef for smart pointer to notificators_container. More... | |
| typedef std::function< void(environment_t &, const std::string &, const coop_dereg_reason_t &) > | coop_dereg_notificator_t |
| Type of cooperation deregistration notificator. More... | |
| typedef intrusive_ptr_t< coop_dereg_notificators_container_t > | coop_dereg_notificators_container_ref_t |
| Typedef for smart pointer to notificators_container. More... | |
| typedef std::unique_ptr< coop_t, coop_deleter_t > | coop_unique_ptr_t |
| Typedef for the agent_coop autopointer. More... | |
| typedef std::shared_ptr< coop_t > | coop_ref_t |
| Typedef for the agent_coop smart pointer. More... | |
| using | agent_ref_t = intrusive_ptr_t< agent_t > |
| A smart reference to an agent. More... | |
| using | agent_state_listener_unique_ptr_t = std::unique_ptr< agent_state_listener_t > |
| Typedef for the agent_state_listener autopointer. More... | |
| using | agent_state_listener_ref_t = std::shared_ptr< agent_state_listener_t > |
| Typedef for the agent_state_listener smart pointer. More... | |
| using | coop_listener_unique_ptr_t = std::unique_ptr< coop_listener_t > |
| Typedef for the coop_listener autopointer. More... | |
| using | dispatcher_unique_ptr_t = std::unique_ptr< dispatcher_t > |
| Typedef of the dispatcher autopointer. More... | |
| using | dispatcher_ref_t = std::shared_ptr< dispatcher_t > |
| Typedef of the dispatcher smart pointer. More... | |
| using | named_dispatcher_map_t = std::map< std::string, dispatcher_ref_t > |
| Typedef of the map from dispatcher name to a dispather. More... | |
| using | disp_binding_activator_t = std::function< void() > |
| Type of activator for agent to dispatcher binding. More... | |
| using | disp_binder_unique_ptr_t = std::unique_ptr< disp_binder_t > |
| Typedef for the disp_binder autopointer. More... | |
| using | disp_binder_ref_t = std::shared_ptr< disp_binder_t > |
| Typedef for the disp_binder smart pointer. More... | |
| using | environment_infrastructure_deleter_fnptr_t = void(*)(environment_infrastructure_t *) |
| A type for deleter for environment_infrastructure objects. More... | |
| using | environment_infrastructure_unique_ptr_t = std::unique_ptr< environment_infrastructure_t, environment_infrastructure_deleter_fnptr_t > |
| A type of unique pointer for environment_infrastructure entity. More... | |
| using | environment_infrastructure_factory_t = std::function< environment_infrastructure_unique_ptr_t(environment_t &, environment_params_t &, mbox_t) > |
| Type of factory for environment infrastructure. More... | |
| template<typename M > | |
| using | mutable_mhood_t = mhood_t< mutable_msg< M > > |
| A short name for message hood for mutable message. More... | |
| template<class Msg > | |
| using | event_data_t = mhood_t< Msg > |
| An alias for compatibility with previous versions. More... | |
| using | event_exception_logger_unique_ptr_t = std::unique_ptr< event_exception_logger_t > |
| Typedef for the event_exception_logger autopointer. More... | |
| using | event_queue_hook_deleter_fnptr_t = void(*)(event_queue_hook_t *) |
| A type for deleter of event_queue_hook object. More... | |
| using | event_queue_hook_unique_ptr_t = std::unique_ptr< event_queue_hook_t, event_queue_hook_deleter_fnptr_t > |
| Alias for unique pointer to event_queue_hook. More... | |
| typedef std::function< void(invocation_type_t, message_ref_t &) > | event_handler_method_t |
| Type of event handler method. More... | |
| typedef void(* | demand_handler_pfn_t) (current_thread_id_t, execution_demand_t &) |
| Demand handler prototype. More... | |
| using | delivery_filter_unique_ptr_t = std::unique_ptr< delivery_filter_t > |
| An alias of unique_ptr for delivery_filter. More... | |
| typedef intrusive_ptr_t< abstract_message_box_t > | mbox_t |
| Smart reference for the abstract_message_box. More... | |
| using | mchain_t = intrusive_ptr_t< abstract_message_chain_t > |
| Short name for smart pointer to message chain. More... | |
| typedef intrusive_ptr_t< message_t > | message_ref_t |
| A smart reference to the message. More... | |
| using | queue_locks_defaults_manager_unique_ptr_t = std::unique_ptr< queue_locks_defaults_manager_t > |
| An alias of unique_ptr for queue_locks_defaults_manager. More... | |
| using | layer_unique_ptr_t = std::unique_ptr< layer_t > |
| Typedef for the layer's autopointer. More... | |
| using | layer_ref_t = std::shared_ptr< layer_t > |
| Typedef for the layer's smart pointer. More... | |
| using | layer_map_t = std::map< std::type_index, layer_ref_t > |
| Typedef for the map from a layer typeid to the layer. More... | |
| using | subscription_storage_factory_t = std::function< impl::subscription_storage_unique_ptr_t(agent_t *) > |
| Type of subscription_storage factory. More... | |
| template<int N> | |
| using | mtag = std::integral_constant< int, N > |
| A helper template for simplification of defining unique message tags for tuple_as_message. More... | |
Functions | |
| SO_5_FUNC error_logger_shptr_t | create_stderr_logger () |
| A factory for creating error_logger implemenation which uses std::stderr as log stream. More... | |
| SO_5_FUNC coop_reg_notificator_t | make_coop_reg_notificator ( const mbox_t &mbox) |
| Create notificator about cooperation registration completion. More... | |
| SO_5_FUNC coop_dereg_notificator_t | make_coop_dereg_notificator ( const mbox_t &mbox) |
| Create notificator about cooperation deregistration completion. More... | |
| SO_5_FUNC disp_binder_unique_ptr_t | create_default_disp_binder () |
| Create an instance of the default dispatcher binding. More... | |
| SO_5_FUNC disp_binder_unique_ptr_t | make_default_disp_binder (environment_t &env) |
| Create an instance of the default dispatcher binder. More... | |
| SO_5_FUNC event_exception_logger_unique_ptr_t | create_std_event_exception_logger () |
| Create the default exception logger. More... | |
| SO_5_FUNC subscription_storage_factory_t | adaptive_subscription_storage_factory ( std::size_t threshold) |
| Factory for adaptive subscription storage. More... | |
| SO_5_FUNC subscription_storage_factory_t | adaptive_subscription_storage_factory ( std::size_t threshold, const subscription_storage_factory_t &small_storage_factory, const subscription_storage_factory_t &large_storage_factory) |
| Factory for adaptive subscription storage. More... | |
| SO_5_FUNC subscription_storage_factory_t | default_subscription_storage_factory () |
| Factory for default subscription storage object. More... | |
| SO_5_FUNC subscription_storage_factory_t | hash_table_based_subscription_storage_factory () |
| Factory for default subscription storage based on std::unordered_map. More... | |
| SO_5_FUNC subscription_storage_factory_t | map_based_subscription_storage_factory () |
| Factory for subscription storage based on std::map. More... | |
| SO_5_FUNC subscription_storage_factory_t | vector_based_subscription_storage_factory ( std::size_t initial_capacity) |
| Factory for subscription storage based on std::vector. More... | |
| SO_5_FUNC queue_locks_defaults_manager_unique_ptr_t | make_defaults_manager_for_simple_locks () |
| A factory for queue_locks_defaults_manager with generators for simple locks. More... | |
| SO_5_FUNC queue_locks_defaults_manager_unique_ptr_t | make_defaults_manager_for_combined_locks () |
| A factory for queue_locks_defaults_manager with generators for combined locks. More... | |
| void | launch (so_5::api::generic_simple_init_t init_routine) |
| Launch a SObjectizer Environment with default parameters. More... | |
| void | launch (so_5::api::generic_simple_init_t init_routine, so_5::api::generic_simple_so_env_params_tuner_t params_tuner) |
| Launch a SObjectizer Environment with explicitely specified parameters. More... | |
| current_thread_id_t | query_current_thread_id () |
| Get the ID of the current thread. More... | |
| current_thread_id_t | null_current_thread_id () |
| Get NULL thread id. More... | |
| std::thread::id | raw_id_from_current_thread_id (const current_thread_id_t &w) |
| Get the raw thread id from current_thread_id. More... | |
| mchain_t | create_mchain (environment_t &env, mchain_props::duration_t waiting_time, std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction) |
| Create size-limited chain with waiting on overflow. More... | |
| mchain_t | create_mchain (wrapped_env_t &sobj, mchain_props::duration_t waiting_time, std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction) |
| Create size-limited chain without waiting on overflow. More... | |
| template<typename... Tail> | |
| mchain_auto_close_details::auto_closer_t< sizeof...(Tail) > | auto_close_mchains (mchain_props::close_mode_t close_mode, Tail &&... tail) |
| Helper function for creation of automatic closer of mchains. More... | |
| template<typename... Tail> | |
| mchain_auto_close_details::auto_closer_t< sizeof...(Tail) > | auto_close_retain_content (Tail &&... tail) |
| Helper function for automatic closing of mchains with retaining their content. More... | |
| template<typename... Tail> | |
| mchain_auto_close_details::auto_closer_t< sizeof...(Tail) > | auto_close_drop_content (Tail &&... tail) |
| Helper function for automatic closing of mchains with dropping their content. More... | |
| template<typename T > | |
| outliving_reference_t< T > | outliving_mutable (T &r) |
| Make outliving_reference wrapper for mutable reference. More... | |
| template<typename T > | |
| outliving_reference_t< const T > | outliving_const (T const &r) |
| Make outliving_reference wrapper for const reference. More... | |
| template<typename T > | |
| outliving_reference_t< const T > | outliving_const (outliving_reference_t< T > r) |
| Make outliving_reference wrapper for const reference. More... | |
| std::size_t | to_size_t (priority_t priority) |
| Helper function for conversion from priority to size_t. More... | |
| priority_t | to_priority_t (std::size_t v) |
| Helper function for conversion from size_t to priority. More... | |
| template<typename... Tail> | |
| thread_auto_join_details::auto_joiner_t< 1+sizeof...(Tail) > | auto_join (std::thread &first_thread, Tail &&... tail) |
| Helper function for creation of automatic joiner of std::threads. More... | |
| mbox_id_t | null_mbox_id () |
| Default value for null mbox_id. More... | |
| template<class S > | |
| signal_indicator_t< S > | signal () |
| A special signal-indicator. More... | |
| void | operator>>= (agent_t *agent, const state_t &new_state) |
| A shortcat for switching the agent state. More... | |
| template<typename Option > | |
| agent_context_t | operator+ (environment_t &env, Option arg) |
| A plus operator for creating agent_context object from a reference to Environment and single agent tuning option. More... | |
| autoname_indicator_t | autoname () |
| Special marker for indication of automatic name generation. More... | |
| template<typename... Args> | |
| coop_unique_ptr_t | create_child_coop (agent_t &owner, Args &&... args) |
| A simple way for creating child cooperation. More... | |
| template<typename... Args> | |
| coop_unique_ptr_t | create_child_coop (const coop_t &parent, Args &&... args) |
| A simple way for creating child cooperation when there is a reference to the parent cooperation object. More... | |
| template<typename... Args> | |
| void | introduce_child_coop (agent_t &owner, Args &&... args) |
| A simple way for creating and registering child cooperation. More... | |
| template<typename... Args> | |
| void | introduce_child_coop (const coop_t &parent, Args &&... args) |
| A simple way for creating and registering child cooperation when there is a reference to parent coop. More... | |
| template<typename M > | |
| std::enable_if< !is_signal< M >::value, mhood_t< immutable_msg< M > > >::type | to_immutable (mhood_t< mutable_msg< M > > msg) |
| Transform mutable message instance into immutable. More... | |
| template<typename M > | |
| std::enable_if< is_signal< M >::value, mhood_t< immutable_msg< M > > >::type | to_immutable (mhood_t< mutable_msg< M > >) |
| template<typename Hook_Type , typename... Args> | |
| event_queue_hook_unique_ptr_t | make_event_queue_hook (event_queue_hook_deleter_fnptr_t deleter, Args &&...args) |
| Helper function for simplify creation of event_queue_hook object. More... | |
| SO_5_NODISCARD event_queue_hook_unique_ptr_t | make_empty_event_queue_hook_unique_ptr () |
| Helper function for creation of empty unique_ptr for event_queue_hook. More... | |
| template<class Lambda > | |
| details::msg_type_and_handler_pair_t | handler (Lambda &&lambda) |
| A function for creation event handler. More... | |
| template<class Signal , class Lambda > | |
| details::msg_type_and_handler_pair_t | handler (Lambda &&lambda) |
| A function for creation event handler. More... | |
| template<typename Method_Pointer > | |
| std::enable_if< details::is_agent_method_pointer< Method_Pointer >::value, details::msg_type_and_handler_pair_t >::type | preprocess_agent_event_handler (const mbox_t &mbox, agent_t &agent, Method_Pointer pfn) |
| Do preprocessing and some verification of event handler and return msg_type_and_handler_pair for it. More... | |
| template<typename Lambda > | |
| std::enable_if< details::lambda_traits::is_lambda< Lambda >::value, details::msg_type_and_handler_pair_t >::type | preprocess_agent_event_handler (const mbox_t &mbox, agent_t &, Lambda &&lambda) |
| Do preprocessing and some verification of event handler and return msg_type_and_handler_pair for it. More... | |
| void | close_drop_content (const mchain_t &ch) |
| Helper function for closing a message chain with dropping all its content. More... | |
| void | close_retain_content (const mchain_t &ch) |
| Helper function for closing a message chain with retaining all its content. More... | |
| template<typename Timeout , typename... Handlers> | |
| mchain_receive_result_t | receive (const so_5::mchain_t &chain, Timeout waiting_timeout, Handlers &&... handlers) |
| Receive and handle one message from message chain. More... | |
| mchain_receive_params_t | from (mchain_t chain) |
| A helper function for simplification of creation of mchain_receive_params instance. More... | |
| template<typename... Handlers> | |
| mchain_receive_result_t | receive (const mchain_receive_params_t ¶ms, Handlers &&... handlers) |
| Advanced version of receive from mchain. More... | |
| template<typename... Handlers> | |
| prepared_receive_t< sizeof...(Handlers) > | prepare_receive (const mchain_receive_params_t ¶ms, Handlers &&... handlers) |
| Create parameters for receive function to be used later. More... | |
| template<std::size_t Handlers_Count> | |
| mchain_receive_result_t | receive (const prepared_receive_t< Handlers_Count > &prepared) |
| A receive operation to be done on previously prepared receive params. More... | |
| mchain_select_params_t | from_all () |
| Helper function for creation of mchain_select_params instance with default values. More... | |
| template<typename... Handlers> | |
| mchain_props::select_case_unique_ptr_t | case_ (mchain_t chain, Handlers &&... handlers) |
| A helper for creation of select_case object for one multi chain select. More... | |
| template<typename... Cases> | |
| mchain_receive_result_t | select (const mchain_select_params_t ¶ms, Cases &&... cases) |
| An advanced form of multi chain select. More... | |
| template<typename Duration , typename... Cases> | |
| mchain_receive_result_t | select (Duration wait_time, Cases &&... cases) |
| A simple form of multi chain select. More... | |
| template<typename... Cases> | |
| prepared_select_t< sizeof...(Cases) > | prepare_select (const mchain_select_params_t ¶ms, Cases &&... cases) |
| Create prepared select statement to be used later. More... | |
| template<std::size_t Cases_Count> | |
| mchain_receive_result_t | select (const prepared_select_t< Cases_Count > &prepared) |
| A select operation to be done on previously prepared select params. More... | |
| template<class Msg > | |
| void | ensure_not_signal () |
| A special compile-time checker to guarantee that the message class is not a signal class. More... | |
| template<class Msg > | |
| void | ensure_message_with_actual_data (const Msg *m) |
| A special checker to guarantee that the message is an instance of the message_t (not signal_t) and has a not-null pointer to the message data. More... | |
| template<class S > | |
| void | ensure_not_mutable_signal () |
| A special compile-time checker to guarantee that S is not a mutable signal. More... | |
| template<class Msg > | |
| void | ensure_signal () |
| A special compile-time checker to guarantee that the Msg is derived from the signal_t. More... | |
| template<typename Msg > | |
| void | ensure_classical_message () |
| A special compile-time checker to guarantee that Msg is derived from message_t. More... | |
| invocation_type_t | detect_invocation_type_for_message_kind (message_t::kind_t kind) |
| Detect invocation type by analyzing message_kind value. More... | |
| invocation_type_t | detect_invocation_type_for_message (const message_t &msg) |
| Detect invocation_type for a message. More... | |
| invocation_type_t | detect_invocation_type_for_message (const message_ref_t &msg) |
| Detect invocation_type for a message. More... | |
| template<typename Message , typename Target , typename... Args> | |
| void | send (Target &&to, Args &&... args) |
| A utility function for creating and delivering a message or a signal. More... | |
| template<typename Target , typename Message > | |
| std::enable_if< !is_signal< Message >::value >::type | send (Target &&to, mhood_t< Message > what) |
| A version of send function for redirection of a message from exising message hood. More... | |
| template<typename Target , typename Message > | |
| std::enable_if< is_signal< Message >::value >::type | send (Target &&to, mhood_t< Message >) |
| A version of send function for redirection of a signal from exising message hood. More... | |
| template<typename Message , typename... Args> | |
| void | send_to_agent (const so_5::agent_t &receiver, Args &&... args) |
| A utility function for creating and delivering a message to the agent's direct mbox. More... | |
| template<typename Message , typename... Args> | |
| void | send_to_agent (const so_5::adhoc_agent_definition_proxy_t &receiver, Args &&... args) |
| A utility function for creating and delivering a message to the ad-hoc agent's direct mbox. More... | |
| template<typename Message , typename... Args> | |
| void | send_delayed (so_5::environment_t &env, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, Args &&... args) |
| A utility function for creating and delivering a delayed message. More... | |
| template<typename Message , typename Target , typename... Args> | |
| void | send_delayed (Target &&target, std::chrono::steady_clock::duration pause, Args &&... args) |
| A utility function for creating and delivering a delayed message to the specified destination. More... | |
| template<typename Message , typename... Args> | |
| void | send_delayed (so_5::agent_t &agent, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, Args &&... args) |
| A utility function for creating and delivering a delayed message. More... | |
| template<typename Message > | |
| std::enable_if< !message_payload_type< Message >::is_signal >::type | send_delayed (so_5::environment_t &env, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, mhood_t< Message > msg) |
| A utility function for delayed redirection of a message from existing message hood. More... | |
| template<typename Message > | |
| std::enable_if< message_payload_type< Message >::is_signal >::type | send_delayed (so_5::environment_t &env, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, mhood_t< Message >) |
| A utility function for delayed redirection of a signal from existing message hood. More... | |
| template<typename Message , typename... Args> | |
| void | send_delayed_to_agent (so_5::agent_t &agent, std::chrono::steady_clock::duration pause, Args &&... args) |
| A utility function for creating and delivering a delayed message to the agent's direct mbox. More... | |
| template<typename Target , typename Message > | |
| void | send_delayed (Target &&target, std::chrono::steady_clock::duration pause, mhood_t< Message > mhood) |
| A helper function for redirection of a message/signal as a delayed message/signal. More... | |
| template<typename Message , typename... Args> | |
| void | send_delayed_to_agent (const so_5::adhoc_agent_definition_proxy_t &agent, std::chrono::steady_clock::duration pause, Args &&... args) |
| A utility function for creating and delivering a delayed message to the ad-hoc agent's direct mbox. More... | |
| template<typename Message , typename... Args> | |
| SO_5_NODISCARD timer_id_t | send_periodic (so_5::environment_t &env, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, Args &&... args) |
| A utility function for creating and delivering a periodic message. More... | |
| template<typename Message , typename... Args> | |
| SO_5_NODISCARD timer_id_t | send_periodic (so_5::agent_t &agent, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, Args &&... args) |
| A utility function for creating and delivering a periodic message. More... | |
| template<typename Message , typename Target , typename... Args> | |
| SO_5_NODISCARD timer_id_t | send_periodic (Target &&target, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, Args &&... args) |
| A utility function for creating and delivering a periodic message to the specified destination. More... | |
| template<typename Message > | |
| SO_5_NODISCARD std::enable_if< !is_signal< Message >::value, timer_id_t >::type | send_periodic (so_5::environment_t &env, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, mhood_t< Message > mhood) |
| A utility function for delivering a periodic from an existing message hood. More... | |
| template<typename Message > | |
| SO_5_NODISCARD std::enable_if< is_signal< Message >::value, timer_id_t >::type | send_periodic (so_5::environment_t &env, const so_5::mbox_t &to, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, mhood_t< Message >) |
| A utility function for periodic redirection of a signal from existing message hood. More... | |
| template<typename Target , typename Message > | |
| SO_5_NODISCARD timer_id_t | send_periodic (Target &&target, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, mhood_t< Message > mhood) |
| A helper function for redirection of a message/signal as a periodic message/signal. More... | |
| template<typename Message , typename... Args> | |
| SO_5_NODISCARD timer_id_t | send_periodic_to_agent (so_5::agent_t &agent, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, Args &&... args) |
| A utility function for creating and delivering a periodic message to the agent's direct mbox. More... | |
| template<typename Message , typename... Args> | |
| SO_5_NODISCARD timer_id_t | send_periodic_to_agent (const so_5::adhoc_agent_definition_proxy_t &agent, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period, Args &&... args) |
| A utility function for creating and delivering a periodic message to the agent's direct mbox. More... | |
Tools for creating timer threads. | |
| SO_5_FUNC timer_thread_unique_ptr_t | create_timer_wheel_thread ( error_logger_shptr_t logger) |
| Create timer thread based on timer_wheel mechanism. More... | |
| SO_5_FUNC timer_thread_unique_ptr_t | create_timer_wheel_thread ( error_logger_shptr_t logger, unsigned int wheel_size, std::chrono::steady_clock::duration granuality) |
| Create timer thread based on timer_wheel mechanism. More... | |
| SO_5_FUNC timer_thread_unique_ptr_t | create_timer_heap_thread ( error_logger_shptr_t logger) |
| Create timer thread based on timer_heap mechanism. More... | |
| SO_5_FUNC timer_thread_unique_ptr_t | create_timer_heap_thread ( error_logger_shptr_t logger, std::size_t initial_heap_capacity) |
| Create timer thread based on timer_heap mechanism. More... | |
| SO_5_FUNC timer_thread_unique_ptr_t | create_timer_list_thread ( error_logger_shptr_t logger) |
| Create timer thread based on timer_list mechanism. More... | |
Tools for creating timer managers. | |
| SO_5_FUNC timer_manager_unique_ptr_t | create_timer_wheel_manager ( error_logger_shptr_t logger, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > collector) |
| Create timer manager based on timer_wheel mechanism. More... | |
| SO_5_FUNC timer_manager_unique_ptr_t | create_timer_wheel_manager ( error_logger_shptr_t logger, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > collector, unsigned int wheel_size, std::chrono::steady_clock::duration granuality) |
| Create timer manager based on timer_wheel mechanism. More... | |
| SO_5_FUNC timer_manager_unique_ptr_t | create_timer_heap_manager ( error_logger_shptr_t logger, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > collector) |
| Create timer manager based on timer_heap mechanism. More... | |
| SO_5_FUNC timer_manager_unique_ptr_t | create_timer_heap_manager ( error_logger_shptr_t logger, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > collector, std::size_t initial_heap_capacity) |
| Create timer manager based on timer_heap mechanism. More... | |
| SO_5_FUNC timer_manager_unique_ptr_t | create_timer_list_manager ( error_logger_shptr_t logger, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > collector) |
| Create timer thread based on timer_list mechanism. More... | |
Helper functions for mchain creation. | |
| mchain_t | create_mchain (environment_t &env) |
| Create size-unlimited chain. More... | |
| mchain_t | create_mchain (wrapped_env_t &sobj) |
| Create size-unlimited chain. More... | |
| mchain_t | create_mchain (environment_t &env, std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction) |
| Create size-limited chain without waiting on overflow. More... | |
| mchain_t | create_mchain (wrapped_env_t &sobj, std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction) |
| Create size-limited chain without waiting on overflow. More... | |
Standard timer thread factories. | |
| timer_thread_factory_t | timer_wheel_factory () |
| Factory for timer_wheel thread with default parameters. More... | |
| timer_thread_factory_t | timer_wheel_factory (unsigned int wheel_size, std::chrono::steady_clock::duration granularity) |
| Factory for timer_wheel thread with explicitely specified parameters. More... | |
| timer_thread_factory_t | timer_heap_factory () |
| Factory for timer_heap thread with default parameters. More... | |
| timer_thread_factory_t | timer_heap_factory (std::size_t initial_heap_capacity) |
| Factory for timer_heap thread with explicitely specified parameters. More... | |
| timer_thread_factory_t | timer_list_factory () |
| Factory for timer_list thread with default parameters. More... | |
Standard timer manager factories. | |
| timer_manager_factory_t | timer_wheel_manager_factory () |
| Factory for timer_wheel manager with default parameters. More... | |
| timer_manager_factory_t | timer_wheel_manager_factory (unsigned int wheel_size, std::chrono::steady_clock::duration granularity) |
| Factory for timer_wheel manager with explicitely specified parameters. More... | |
| timer_manager_factory_t | timer_heap_manager_factory () |
| Factory for timer_heap manager with default parameters. More... | |
| timer_manager_factory_t | timer_heap_manager_factory (std::size_t initial_heap_capacity) |
| Factory for timer_heap manager with explicitely specified parameters. More... | |
| timer_manager_factory_t | timer_list_manager_factory () |
| Factory for timer_list manager with default parameters. More... | |
Operators for tuning agent_context. | |
| agent_context_t | operator+ (agent_context_t ctx, subscription_storage_factory_t factory) |
| template<class M > | |
| agent_context_t | operator+ (agent_context_t ctx, message_limit::drop_indicator_t< M > limit) |
| template<class M > | |
| agent_context_t | operator+ (agent_context_t ctx, message_limit::abort_app_indicator_t< M > limit) |
| template<class M , class L > | |
| agent_context_t | operator+ (agent_context_t ctx, message_limit::log_then_abort_app_indicator_t< M, L > limit) |
| template<class M , class L > | |
| agent_context_t | operator+ (agent_context_t ctx, message_limit::redirect_indicator_t< M, L > limit) |
| template<class M > | |
| agent_context_t | operator+ (agent_context_t ctx, message_limit::transform_indicator_t< M > limit) |
| agent_context_t | operator+ (agent_context_t ctx, so_5::priority_t agent_priority) |
Helper functions for creating parameters for mchain. | |
| mchain_params_t | make_unlimited_mchain_params () |
| Create parameters for size-unlimited mchain. More... | |
| mchain_params_t | make_limited_without_waiting_mchain_params (std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction) |
| Create parameters for size-limited mchain without waiting on overflow. More... | |
| mchain_params_t | make_limited_with_waiting_mchain_params (std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction, mchain_props::duration_t wait_timeout) |
| Create parameters for size-limited mchain with waiting on overflow. More... | |
Helper functions for simplification of synchronous interactions. | |
| template<typename Result , typename Msg , typename Target , typename... Args> | |
| std::future< Result > | request_future (Target &&who, Args &&... args) |
| Make a synchronous request and receive result in form of a future object. Intended to use with messages. More... | |
| template<typename Result , typename Msg , typename Target > | |
| std::enable_if< !is_signal< Msg >::value, std::future< Result > >::type | request_future (Target &&who, mhood_t< Msg > mhood) |
| A version of request_future function for initiating of a synchonous request from exising message hood. More... | |
| template<typename Result , typename Msg , typename Target > | |
| std::enable_if< is_signal< Msg >::value, std::future< Result > >::type | request_future (Target &&who, mhood_t< Msg >) |
| A version of request_future function for initiating of a synchonous request from exising message hood. More... | |
| template<typename Result , typename Signal , typename Target , typename Future_Type = typename std::enable_if< so_5::is_signal< Signal >::value, std::future< Result > >::type> | |
| Future_Type | request_future (Target &&who) |
| Make a synchronous request and receive result in form of a future object. Intended to use with signals. More... | |
| template<typename Result , typename Msg , typename Target , typename Duration , typename... Args> | |
| Result | request_value (Target &&who, Duration timeout, Args &&... args) |
| Make a synchronous request and receive result in form of a value with waiting for some time. Intended to use with messages. More... | |
| template<typename Result , typename Target , typename Duration , typename Msg > | |
| std::enable_if< !so_5::is_signal< Msg >::value, Result >::type | request_value (Target &&who, Duration timeout, mhood_t< Msg > mhood) |
| A version of request_value function for initiating of a synchonous request from exising message hood. More... | |
| template<typename Result , typename Signal , typename Target , typename Duration , typename Result_Type = typename std::enable_if< so_5::is_signal< Signal >::value, Result >::type> | |
| Result_Type | request_value (Target &&who, Duration timeout) |
| Make a synchronous request and receive result in form of a value with waiting for some time. Intended to use with signals. More... | |
| template<typename Result , typename Target , typename Duration , typename Msg > | |
| std::enable_if< so_5::is_signal< Msg >::value, Result >::type | request_value (Target &&who, Duration timeout, mhood_t< Msg >) |
| A version of request_value function for initiating of a synchonous request from exising message hood. More... | |
Variables | |
| const int | rc_environment_error = 1 |
| so_environment launch is failed. More... | |
| const int | rc_another_state_switch_in_progress = 170 |
| An attempt to switch agent state when another switch operation is in progress. More... | |
| const int | rc_autoshutdown_must_be_enabled = 171 |
| An attempt to launch environment with autoshutdown disabled in conditions where autoshutdown must be enabled. More... | |
| const int | rc_mutable_msg_cannot_be_delivered_via_mpmc_mbox = 172 |
| An attempt to deliver mutable message via MPMC mbox. More... | |
| const int | rc_mutable_msg_cannot_be_periodic = 173 |
| An attempt to send mutable message as a periodic message. More... | |
| const int | rc_subscription_to_mutable_msg_from_mpmc_mbox = 174 |
| An attempt to make subscription on mutable message from MPMC mbox. More... | |
| const int | rc_cannot_set_stop_guard_when_stop_is_started = 175 |
| An attempt to set up a new stop_guard when the stop operation is already in progress. More... | |
| const int | rc_negative_value_for_pause = 176 |
| An attempt to use negative value for pause argument for delayed or periodic message/signal. More... | |
| const int | rc_negative_value_for_period = 177 |
| An attempt to use negative value for period argument for periodic message/signal. More... | |
| const int | rc_transfer_to_state_loop = 178 |
| A loop in transfer_to_state detected. More... | |
| const int | rc_attempt_to_cast_to_envelope_on_nullptr = 180 |
| An attempt to cast message to message envelope when a pointer to message is NULL. More... | |
| const int | rc_unable_to_define_new_step = 181 |
| New step can't be defined if testing scenario is already started or finished. More... | |
| const int | rc_scenario_must_be_completed = 182 |
| Testing scenario must be completed before an attempt to do the current operation. More... | |
| const int | rc_stored_state_name_not_found = 183 |
| There is no stored state name in the testing scenario. More... | |
| const thread_safety_t | not_thread_safe = thread_safety_t::unsafe |
| Shorthand for thread unsafety indicator. More... | |
| const thread_safety_t | thread_safe = thread_safety_t::safe |
| Shorthand for thread safety indicator. More... | |
| const infinite_wait_indication | infinite_wait |
| A special indicator for infinite waiting on service request or on receive from mchain. More... | |
| const no_wait_indication | no_wait = no_wait_indication::no_wait |
| A special indicator for no waiting on service request or on receive from mchain. More... | |
Error codes for agent's methods. | |
| const int | rc_agent_unknown_state = 10 |
| Trying to switch to the unknown state. More... | |
| const int | rc_agent_is_already_bind_to_env = 11 |
| Agent is already bound to the SObjectizer Environment. More... | |
| const int | rc_agent_is_already_bind_to_disp = 12 |
| Agent is already bound to the dispatcher. More... | |
| const int | rc_named_disp_not_found = 13 |
| Dispatcher with that name is not found. More... | |
| const int | rc_agent_has_no_cooperation = 14 |
| Agent is not bound to a cooperation. More... | |
| const int | rc_agent_incompatible_type_conversion = 15 |
| It is impossible to make a cast to that type. More... | |
| const int | rc_operation_enabled_only_on_agent_working_thread = 16 |
| An attempt to perform an operation which is enabled only on agent's working thread. More... | |
| const int | rc_no_initial_substate = 17 |
| An attempt to change agent state to a new composite state which have no initial state defined. More... | |
| const int | rc_state_nesting_is_too_deep = 18 |
| Nesting of agent states is too deep. More... | |
| const int | rc_initial_substate_already_defined = 19 |
| Initial substate for a composite state is already defined. More... | |
Error codes for cooperations of agents. | |
| const int | rc_zero_ptr_to_coop = 20 |
| A zero pointer is detected. More... | |
| const int | rc_coop_with_specified_name_is_already_registered = 21 |
| Cooperation name is not unique. More... | |
| const int | rc_coop_has_references_to_null_agents_or_binders = 22 |
| Cooperation has the null reference to an agent or dispatcher binding. More... | |
| const int | rc_coop_has_not_found_among_registered_coop = 23 |
| There is no registered cooperation with that name. More... | |
| const int | rc_coop_define_agent_failed = 24 |
| Cooperation couldn't be registered. More... | |
| const int | rc_coop_has_no_parent = 25 |
| Cooperation has no the parent cooperation. More... | |
| const int | rc_parent_coop_not_found = 26 |
| Parent cooperation not found. More... | |
| const int | rc_agent_to_disp_binding_failed = 27 |
| Binding of agent to dispatcher failed. More... | |
| const int | rc_unable_to_register_coop_during_shutdown = 28 |
| It is impossible to register cooperation during SObjectizer Environment shutdown. More... | |
Error codes for dispatchers. | |
| const int | rc_disp_start_failed = 30 |
| Unable to start a dispatcher. More... | |
| const int | rc_disp_create_failed = 31 |
| Unable to create a dispatcher. More... | |
| const int | rc_disp_type_mismatch = 32 |
| const int | rc_disp_cannot_be_added = 34 |
| New dispatcher cannot be added because of illegal state of SObjectizer Environment. More... | |
Error codes for event handlers and message interceptors registration. | |
| const int | rc_evt_handler_already_provided = 40 |
| A handler for that event/mbox/state is already registered. More... | |
| const int | rc_no_event_handler_provided = 41 |
| const int | rc_event_handler_match_error = 42 |
| Unable to deregister that handler. More... | |
| const int | rc_agent_is_not_the_state_owner = 43 |
| Agent doesn't own this state. More... | |
| const int | rc_intercept_handler_already_provided = 44 |
| An interceptor for the event/mbox/state is already registered. More... | |
| const int | rc_no_interception_handler_provided = 45 |
| const int | rc_interception_handler_match_error = 46 |
| Unable to deregister this interceptor. More... | |
| const int | rc_illegal_subscriber_for_mpsc_mbox = 47 |
| An attempt to create illegal subscription to mpsc_mbox. More... | |
| const int | rc_message_has_no_limit_defined = 48 |
| An attempt to create subscription to message without predefined limit for that message type. More... | |
| const int | rc_several_limits_for_one_message_type = 49 |
| An attempt to define several limits for one message type. More... | |
Error codes for mboxes. | |
| const int | rc_mbox_duplicating_name = 80 |
| The mbox name is not unique. More... | |
| const int | rc_mbox_unable_to_find_mbox = 81 |
| The name of mbox is unknown. More... | |
| const int | rc_null_message_data = 82 |
| Null message data. More... | |
| const int | rc_no_svc_handlers = 83 |
| No handlers for service request found. More... | |
| const int | rc_more_than_one_svc_handler = 84 |
| There are more then one handler for service request. More... | |
| const int | rc_svc_not_handled = 85 |
| Service request has not been handled. Service handler is disabled in the current agent state. More... | |
| const int | rc_svc_result_not_received_yet = 86 |
| Service request result has not beed received yet. More... | |
| const int | rc_msg_service_request_bad_cast = 87 |
| Unable to cast service call description object to the appropriate type. More... | |
| const int | rc_svc_request_cannot_be_transfomred_on_overlimit = 88 |
| Unable to transform service request as part of overlimit reaction. More... | |
| const int | rc_delivery_filter_cannot_be_used_on_mpsc_mbox = 89 |
| Delivery filter is not applicable to MPSC-mboxes. More... | |
Error codes for delayed or repeated events. | |
| const int | rc_unable_to_schedule_timer_act = 90 |
| Unable to schedule a timer event. More... | |
Error codes for layers. | |
| const int | rc_layer_not_binded_to_so_env = 100 |
| The layer is not bound to the SObjectizer Environment. More... | |
| const int | rc_trying_to_add_nullptr_extra_layer = 101 |
| Unable to bind a layer by the null pointer to it. More... | |
| const int | rc_trying_to_add_extra_layer_that_already_exists_in_default_list = 102 |
| The layer is already bound to the SObjectizer Environment as a default layer. More... | |
| const int | rc_trying_to_add_extra_layer_that_already_exists_in_extra_list = 103 |
| The layer is already bound to the SObjectizer Environment as an extra layer. More... | |
| const int | rc_unable_to_start_extra_layer = 104 |
| Layer initialization is failed. More... | |
| const int | rc_layer_does_not_exist = 105 |
| A layer with the specified type doesn't exist. More... | |
Error codes for priorities. | |
| const int | rc_priority_quote_illegal_value = 120 |
| Illegal value of quote for a priority. More... | |
Error codes for SObjectizer Environment related errors. | |
| const int | rc_msg_tracing_disabled = 140 |
| Message delivery tracing is disabled and cannot be used. More... | |
Error codes for message chains. | |
| const int | rc_msg_chain_is_empty = 160 |
| Attempt to get message from empty message queue. More... | |
| const int | rc_msg_chain_is_full = 161 |
| Attempt to push a message to full message queue. More... | |
| const int | rc_msg_chain_doesnt_support_subscriptions = 162 |
| Attempt to make subscription for message chain. More... | |
| const int | rc_msg_chain_doesnt_support_delivery_filters = 163 |
| Attempt to set delivery_filter for message chain. More... | |
| const int | rc_msg_chain_overflow = 164 |
| const int | rc_several_handlers_for_one_message_type = 165 |
| Attempt to define several handlers for one msg_type. More... | |
Common error codes. | |
| const int | rc_empty_name = 500 |
| The empty name doesn't allowed. More... | |
| const int | rc_invalid_time_limit_for_state = 501 |
| Invalid value of time limit for an agent's state. More... | |
| const int | rc_not_implemented = 502 |
| Feature or method has no implementation yet. More... | |
| const int | rc_unknown_exception_type = 503 |
| An exception of unknown type is caught. More... | |
| const int | rc_unexpected_error = 0xFFFFFF |
| Unclassified error. More... | |
Public part of message limit implementation.
Private part of message limit implementation.
Main SObjectizer-5 namespace.
| using so_5::agent_ref_t = typedef intrusive_ptr_t< agent_t > |
A smart reference to an agent.
| using so_5::agent_state_listener_ref_t = typedef std::shared_ptr< agent_state_listener_t > |
Typedef for the agent_state_listener smart pointer.
| using so_5::agent_state_listener_unique_ptr_t = typedef std::unique_ptr< agent_state_listener_t > |
Typedef for the agent_state_listener autopointer.
| typedef std::atomic_ulong so_5::atomic_counter_t |
Atomic counter type.
| typedef std::atomic_ulong so_5::atomic_flag_t |
Atomic flag type.
| typedef std::function< void( environment_t &, const std::string &, const coop_dereg_reason_t &) > so_5::coop_dereg_notificator_t |
Type of cooperation deregistration notificator.
Cooperation notificator should be a function with the following prototype:
| typedef intrusive_ptr_t< coop_dereg_notificators_container_t > so_5::coop_dereg_notificators_container_ref_t |
Typedef for smart pointer to notificators_container.
| using so_5::coop_listener_unique_ptr_t = typedef std::unique_ptr< coop_listener_t > |
Typedef for the coop_listener autopointer.
| typedef std::shared_ptr< coop_t > so_5::coop_ref_t |
Typedef for the agent_coop smart pointer.
| typedef std::function< void(environment_t &, const std::string &) > so_5::coop_reg_notificator_t |
Type of cooperation registration notificator.
Cooperation notificator should be a function with the following prototype:
| typedef intrusive_ptr_t< coop_reg_notificators_container_t > so_5::coop_reg_notificators_container_ref_t |
Typedef for smart pointer to notificators_container.
| typedef std::unique_ptr< coop_t, coop_deleter_t > so_5::coop_unique_ptr_t |
Typedef for the agent_coop autopointer.
| typedef std::thread::id so_5::current_thread_id_t |
Type of the current thread id.
| typedef spinlock_t< pause_backoff_t > so_5::default_spinlock_t |
| using so_5::delivery_filter_unique_ptr_t = typedef std::unique_ptr< delivery_filter_t > |
An alias of unique_ptr for delivery_filter.
| typedef void(* so_5::demand_handler_pfn_t) (current_thread_id_t, execution_demand_t &) |
Demand handler prototype.
| using so_5::disp_binder_ref_t = typedef std::shared_ptr< disp_binder_t > |
Typedef for the disp_binder smart pointer.
| using so_5::disp_binder_unique_ptr_t = typedef std::unique_ptr< disp_binder_t > |
Typedef for the disp_binder autopointer.
| using so_5::disp_binding_activator_t = typedef std::function< void() > |
Type of activator for agent to dispatcher binding.
| using so_5::dispatcher_ref_t = typedef std::shared_ptr< dispatcher_t > |
Typedef of the dispatcher smart pointer.
| using so_5::dispatcher_unique_ptr_t = typedef std::unique_ptr< dispatcher_t > |
Typedef of the dispatcher autopointer.
| using so_5::environment_infrastructure_deleter_fnptr_t = typedef void (*)(environment_infrastructure_t *) |
A type for deleter for environment_infrastructure objects.
| using so_5::environment_infrastructure_factory_t = typedef std::function< environment_infrastructure_unique_ptr_t( environment_t &, environment_params_t &, mbox_t) > |
Type of factory for environment infrastructure.
A factory must be a function with the following format:
| using so_5::environment_infrastructure_unique_ptr_t = typedef std::unique_ptr< environment_infrastructure_t, environment_infrastructure_deleter_fnptr_t > |
A type of unique pointer for environment_infrastructure entity.
| using so_5::error_logger_shptr_t = typedef std::shared_ptr< error_logger_t > |
An alias for shared_ptr to error_logger.
| using so_5::event_data_t = typedef mhood_t< Msg > |
An alias for compatibility with previous versions.
| using so_5::event_exception_logger_unique_ptr_t = typedef std::unique_ptr< event_exception_logger_t > |
Typedef for the event_exception_logger autopointer.
| typedef std::function< void(invocation_type_t, message_ref_t &) > so_5::event_handler_method_t |
Type of event handler method.
| using so_5::event_queue_hook_deleter_fnptr_t = typedef void (*)(event_queue_hook_t *) |
A type for deleter of event_queue_hook object.
| using so_5::event_queue_hook_unique_ptr_t = typedef std::unique_ptr< event_queue_hook_t, event_queue_hook_deleter_fnptr_t > |
Alias for unique pointer to event_queue_hook.
| using so_5::layer_map_t = typedef std::map< std::type_index, layer_ref_t > |
Typedef for the map from a layer typeid to the layer.
| using so_5::layer_ref_t = typedef std::shared_ptr< layer_t > |
Typedef for the layer's smart pointer.
| using so_5::layer_unique_ptr_t = typedef std::unique_ptr< layer_t > |
Typedef for the layer's autopointer.
| typedef unsigned long long so_5::mbox_id_t |
A type for mbox indentifier.
| typedef intrusive_ptr_t< abstract_message_box_t > so_5::mbox_t |
Smart reference for the abstract_message_box.
| using so_5::mchain_t = typedef intrusive_ptr_t< abstract_message_chain_t > |
Short name for smart pointer to message chain.
| typedef intrusive_ptr_t< message_t > so_5::message_ref_t |
A smart reference to the message.
| using so_5::mtag = typedef std::integral_constant< int, N > |
A helper template for simplification of defining unique message tags for tuple_as_message.
This is a short equivalent of:
| using so_5::mutable_mhood_t = typedef mhood_t< mutable_msg<M> > |
A short name for message hood for mutable message.
| using so_5::named_dispatcher_map_t = typedef std::map< std::string, dispatcher_ref_t > |
Typedef of the map from dispatcher name to a dispather.
| using so_5::queue_locks_defaults_manager_unique_ptr_t = typedef std::unique_ptr< queue_locks_defaults_manager_t > |
An alias of unique_ptr for queue_locks_defaults_manager.
| using so_5::stop_guard_shptr_t = typedef std::shared_ptr< stop_guard_t > |
An alias of shared_ptr for stop_guard.
| using so_5::subscription_storage_factory_t = typedef std::function< impl::subscription_storage_unique_ptr_t( agent_t * ) > |
Type of subscription_storage factory.
| using so_5::timer_manager_factory_t = typedef std::function< timer_manager_unique_ptr_t( error_logger_shptr_t, outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > ) > |
Type of factory for creating timer_manager objects.
| using so_5::timer_manager_unique_ptr_t = typedef std::unique_ptr< timer_manager_t > |
Auxiliary typedef for timer_manager autopointer.
| using so_5::timer_thread_factory_t = typedef std::function< timer_thread_unique_ptr_t( error_logger_shptr_t ) > |
Type of factory for creating timer_thread objects.
| typedef std::unique_ptr< timer_thread_t > so_5::timer_thread_unique_ptr_t |
Auxiliary typedef for timer_thread autopointer.
|
strong |
A reaction of SObjectizer to an exception from agent event.
|
strong |
|
strong |
Type of agent method invocation (event handling, service request).
|
strong |
Type of the message box.
|
strong |
A enum with variants of message kinds.
| Enumerator | |
|---|---|
| signal | Message is a signal. It means there is no data associated with the message instance. |
| classical_message | Message is a classical message. It means that message is an instance of class derived from message_t. |
| user_type_message | Message is an user type message. |
| service_request | Message is a service request. |
| enveloped_msg | Message is an envelope with some other message inside. |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| SO_5_FUNC subscription_storage_factory_t so_5::adaptive_subscription_storage_factory | ( | std::size_t | threshold | ) |
Factory for adaptive subscription storage.
| threshold | Threshold for switching from small storage to the large one (and back from the large to the small in the case of subscription deletion). |
| SO_5_FUNC subscription_storage_factory_t so_5::adaptive_subscription_storage_factory | ( | std::size_t | threshold, |
| const subscription_storage_factory_t & | small_storage_factory, | ||
| const subscription_storage_factory_t & | large_storage_factory | ||
| ) |
Factory for adaptive subscription storage.
| threshold | Threshold for switching from small storage to the large one (and back from the large to the small in the case of subscription deletion). |
| small_storage_factory | A factory for creating small storage. |
| large_storage_factory | A factory for creating large storage. |
| mchain_auto_close_details::auto_closer_t< sizeof...(Tail) > so_5::auto_close_drop_content | ( | Tail &&... | tail | ) |
Helper function for automatic closing of mchains with dropping their content.
Usage example:
| Tail | List of mchains. |
| mchain_auto_close_details::auto_closer_t< sizeof...(Tail) > so_5::auto_close_mchains | ( | mchain_props::close_mode_t | close_mode, |
| Tail &&... | tail | ||
| ) |
Helper function for creation of automatic closer of mchains.
Usage examples:
| close_mode | Close mode for all mchains. This value will be passed to all close() calls. |
| tail | Chains to be closed. |
| mchain_auto_close_details::auto_closer_t< sizeof...(Tail) > so_5::auto_close_retain_content | ( | Tail &&... | tail | ) |
Helper function for automatic closing of mchains with retaining their content.
Usage example:
| Tail | List of mchains. |
| thread_auto_join_details::auto_joiner_t< 1 + sizeof...(Tail) > so_5::auto_join | ( | std::thread & | first_thread, |
| Tail &&... | tail | ||
| ) |
Helper function for creation of automatic joiner of std::threads.
Usage examples:
| first_thread | The first thread to be closed. |
| tail | Other threads to be closed. |
|
inline |
Special marker for indication of automatic name generation.
| mchain_props::select_case_unique_ptr_t so_5::case_ | ( | mchain_t | chain, |
| Handlers &&... | handlers | ||
| ) |
A helper for creation of select_case object for one multi chain select.
| chain | Message chain to be used in select. |
| handlers | Message handlers for messages extracted from that chain. |
|
inline |
Helper function for closing a message chain with dropping all its content.
|
inline |
Helper function for closing a message chain with retaining all its content.
| coop_unique_ptr_t so_5::create_child_coop | ( | agent_t & | owner, |
| Args &&... | args | ||
| ) |
A simple way for creating child cooperation.
| owner | Owner of the cooperation. |
| args | Arguments for the environment_t::create_coop() method. |
| coop_unique_ptr_t so_5::create_child_coop | ( | const coop_t & | parent, |
| Args &&... | args | ||
| ) |
A simple way for creating child cooperation when there is a reference to the parent cooperation object.
| parent | Parent cooperation. |
| args | Arguments for the environment_t::create_coop() method. |
| SO_5_FUNC disp_binder_unique_ptr_t so_5::create_default_disp_binder | ( | ) |
Create an instance of the default dispatcher binding.
Create an instance of the default dispatcher binder.
|
inline |
Create size-unlimited chain.
|
inline |
Create size-unlimited chain.
|
inline |
Create size-limited chain without waiting on overflow.
| env | Environment for mchain. |
| max_size | Max capacity of mchain. |
| memory_usage | Type of chain storage. |
| overflow_reaction | Reaction on chain overflow. |
|
inline |
Create size-limited chain without waiting on overflow.
| sobj | Environment for mchain. |
| max_size | Max capacity of mchain. |
| memory_usage | Type of chain storage. |
| overflow_reaction | Reaction on chain overflow. |
|
inline |
Create size-limited chain with waiting on overflow.
| env | Environment for mchain. |
| waiting_time | Max waiting time in case of overflow. |
| max_size | Max capacity of mchain. |
| memory_usage | Type of chain storage. |
| overflow_reaction | Reaction on chain overflow. |
|
inline |
Create size-limited chain without waiting on overflow.
| sobj | Environment for mchain. |
| waiting_time | Max waiting time in case of overflow. |
| max_size | Max capacity of mchain. |
| memory_usage | Type of chain storage. |
| overflow_reaction | Reaction on chain overflow. |
| SO_5_FUNC event_exception_logger_unique_ptr_t so_5::create_std_event_exception_logger | ( | ) |
Create the default exception logger.
| SO_5_FUNC error_logger_shptr_t so_5::create_stderr_logger | ( | ) |
A factory for creating error_logger implemenation which uses std::stderr as log stream.
| SO_5_FUNC timer_manager_unique_ptr_t so_5::create_timer_heap_manager | ( | error_logger_shptr_t | logger, |
| outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > | collector | ||
| ) |
Create timer manager based on timer_heap mechanism.
| logger | A logger for handling error messages inside timer_manager. |
| collector | A collector for elapsed timers. |
| SO_5_FUNC timer_manager_unique_ptr_t so_5::create_timer_heap_manager | ( | error_logger_shptr_t | logger, |
| outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > | collector, | ||
| std::size_t | initial_heap_capacity | ||
| ) |
Create timer manager based on timer_heap mechanism.
| logger | A logger for handling error messages inside timer_manager. |
| collector | A collector for elapsed timers. |
| initial_heap_capacity | Initical capacity of heap array. |
| SO_5_FUNC timer_thread_unique_ptr_t so_5::create_timer_heap_thread | ( | error_logger_shptr_t | logger | ) |
Create timer thread based on timer_heap mechanism.
| logger | A logger for handling error messages inside timer_thread. |
| SO_5_FUNC timer_thread_unique_ptr_t so_5::create_timer_heap_thread | ( | error_logger_shptr_t | logger, |
| std::size_t | initial_heap_capacity | ||
| ) |
Create timer thread based on timer_heap mechanism.
| logger | A logger for handling error messages inside timer_thread. |
| initial_heap_capacity | Initical capacity of heap array. |
| SO_5_FUNC timer_manager_unique_ptr_t so_5::create_timer_list_manager | ( | error_logger_shptr_t | logger, |
| outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > | collector | ||
| ) |
Create timer thread based on timer_list mechanism.
| logger | A logger for handling error messages inside timer_manager. |
| collector | A collector for elapsed timers. |
| SO_5_FUNC timer_thread_unique_ptr_t so_5::create_timer_list_thread | ( | error_logger_shptr_t | logger | ) |
Create timer thread based on timer_list mechanism.
| logger | A logger for handling error messages inside timer_thread. |
| SO_5_FUNC timer_manager_unique_ptr_t so_5::create_timer_wheel_manager | ( | error_logger_shptr_t | logger, |
| outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > | collector | ||
| ) |
Create timer manager based on timer_wheel mechanism.
| logger | A logger for handling error messages inside timer_manager. |
| collector | A collector for elapsed timers. |
| SO_5_FUNC timer_manager_unique_ptr_t so_5::create_timer_wheel_manager | ( | error_logger_shptr_t | logger, |
| outliving_reference_t< timer_manager_t::elapsed_timers_collector_t > | collector, | ||
| unsigned int | wheel_size, | ||
| std::chrono::steady_clock::duration | granuality | ||
| ) |
Create timer manager based on timer_wheel mechanism.
| logger | A logger for handling error messages inside timer_manager. |
| collector | A collector for elapsed timers. |
| wheel_size | Size of the wheel. |
| granuality | A size of one time step for the wheel. |
| SO_5_FUNC timer_thread_unique_ptr_t so_5::create_timer_wheel_thread | ( | error_logger_shptr_t | logger | ) |
Create timer thread based on timer_wheel mechanism.
| logger | A logger for handling error messages inside timer_thread. |
| SO_5_FUNC timer_thread_unique_ptr_t so_5::create_timer_wheel_thread | ( | error_logger_shptr_t | logger, |
| unsigned int | wheel_size, | ||
| std::chrono::steady_clock::duration | granuality | ||
| ) |
Create timer thread based on timer_wheel mechanism.
| logger | A logger for handling error messages inside timer_thread. |
| wheel_size | Size of the wheel. |
| granuality | A size of one time step for the wheel. |
| SO_5_FUNC subscription_storage_factory_t so_5::default_subscription_storage_factory | ( | ) |
Factory for default subscription storage object.
|
inline |
Detect invocation_type for a message.
|
inline |
Detect invocation_type for a message.
|
inline |
Detect invocation type by analyzing message_kind value.
| void so_5::ensure_classical_message | ( | ) |
A special compile-time checker to guarantee that Msg is derived from message_t.
| Msg | type to be checked. |
| void so_5::ensure_message_with_actual_data | ( | const Msg * | m | ) |
| void so_5::ensure_not_mutable_signal | ( | ) |
A special compile-time checker to guarantee that S is not a mutable signal.
This check is intended to prevent usage of mutable_msg<S> where S is a signal type.
| void so_5::ensure_not_signal | ( | ) |
A special compile-time checker to guarantee that the message class is not a signal class.
| void so_5::ensure_signal | ( | ) |
A special compile-time checker to guarantee that the Msg is derived from the signal_t.
| Msg | signal type to be checked. |
|
inline |
A helper function for simplification of creation of mchain_receive_params instance.
|
inline |
Helper function for creation of mchain_select_params instance with default values.
Usage example:
| details::msg_type_and_handler_pair_t so_5::handler | ( | Lambda && | lambda | ) |
A function for creation event handler.
| details::msg_type_and_handler_pair_t so_5::handler | ( | Lambda && | lambda | ) |
A function for creation event handler.
| SO_5_FUNC subscription_storage_factory_t so_5::hash_table_based_subscription_storage_factory | ( | ) |
Factory for default subscription storage based on std::unordered_map.
| void so_5::introduce_child_coop | ( | agent_t & | owner, |
| Args &&... | args | ||
| ) |
A simple way for creating and registering child cooperation.
| owner | Owner of the cooperation. |
| args | Arguments for the environment_t::introduce_coop() method. |
| void so_5::introduce_child_coop | ( | const coop_t & | parent, |
| Args &&... | args | ||
| ) |
A simple way for creating and registering child cooperation when there is a reference to parent coop.
| parent | Parent cooperation. |
| args | Arguments for the environment_t::introduce_coop() method. |
|
inline |
Launch a SObjectizer Environment with default parameters.
Example with free function as initializer:
Example with lambda-function as initializer:
Example with object method as initializer:
| init_routine | Initialization routine. |
|
inline |
Launch a SObjectizer Environment with explicitely specified parameters.
Example with free functions as initializers:
Example with lambda-functions as initializers:
| init_routine | Initialization routine. |
| params_tuner | Parameters setting routine. |
| SO_5_FUNC coop_dereg_notificator_t so_5::make_coop_dereg_notificator | ( | const mbox_t & | mbox | ) |
Create notificator about cooperation deregistration completion.
| mbox | A mbox to which msg_coop_deregistered will be sent. |
| SO_5_FUNC coop_reg_notificator_t so_5::make_coop_reg_notificator | ( | const mbox_t & | mbox | ) |
Create notificator about cooperation registration completion.
| mbox | A mbox to which msg_coop_registered will be sent. |
| SO_5_FUNC disp_binder_unique_ptr_t so_5::make_default_disp_binder | ( | environment_t & | env | ) |
Create an instance of the default dispatcher binder.
Usage example:
| SO_5_FUNC queue_locks_defaults_manager_unique_ptr_t so_5::make_defaults_manager_for_combined_locks | ( | ) |
A factory for queue_locks_defaults_manager with generators for combined locks.
| SO_5_FUNC queue_locks_defaults_manager_unique_ptr_t so_5::make_defaults_manager_for_simple_locks | ( | ) |
A factory for queue_locks_defaults_manager with generators for simple locks.
|
inline |
Helper function for creation of empty unique_ptr for event_queue_hook.
This function allows to write:
instead of
| event_queue_hook_unique_ptr_t so_5::make_event_queue_hook | ( | event_queue_hook_deleter_fnptr_t | deleter, |
| Args &&... | args | ||
| ) |
Helper function for simplify creation of event_queue_hook object.
This helper function allows to write:
instead of:
|
inline |
Create parameters for size-limited mchain with waiting on overflow.
send is used for message pushing then there will be waiting for free space if the message chain is full. But if message push is performed from timer thread (it means that message is a delayed or a periodic message) then there will not be any waiting. It is because the context of timer thread is very special: there is no possibility to spend some time on waiting for some free space in message chain. All operations on the context of timer thread must be done as fast as possible. | max_size | Max size of the chain. |
| memory_usage | Type of chain storage. |
| overflow_reaction | Reaction on chain overflow. |
| wait_timeout | Waiting time on full message chain. |
|
inline |
Create parameters for size-limited mchain without waiting on overflow.
| max_size | Max capacity of mchain. |
| memory_usage | Type of chain storage. |
| overflow_reaction | Reaction on chain overflow. |
|
inline |
Create parameters for size-unlimited mchain.
| SO_5_FUNC subscription_storage_factory_t so_5::map_based_subscription_storage_factory | ( | ) |
Factory for subscription storage based on std::map.
|
inline |
Get NULL thread id.
|
inline |
Default value for null mbox_id.
| agent_context_t so_5::operator+ | ( | environment_t & | env, |
| Option | arg | ||
| ) |
A plus operator for creating agent_context object from a reference to Environment and single agent tuning option.
|
inline |
| agent_context_t so_5::operator+ | ( | agent_context_t | ctx, |
| message_limit::drop_indicator_t< M > | limit | ||
| ) |
| agent_context_t so_5::operator+ | ( | agent_context_t | ctx, |
| message_limit::abort_app_indicator_t< M > | limit | ||
| ) |
| agent_context_t so_5::operator+ | ( | agent_context_t | ctx, |
| message_limit::log_then_abort_app_indicator_t< M, L > | limit | ||
| ) |
| agent_context_t so_5::operator+ | ( | agent_context_t | ctx, |
| message_limit::redirect_indicator_t< M, L > | limit | ||
| ) |
| agent_context_t so_5::operator+ | ( | agent_context_t | ctx, |
| message_limit::transform_indicator_t< M > | limit | ||
| ) |
|
inline |
A shortcat for switching the agent state.
| outliving_reference_t< const T > so_5::outliving_const | ( | T const & | r | ) |
| outliving_reference_t< const T > so_5::outliving_const | ( | outliving_reference_t< T > | r | ) |
| outliving_reference_t< T > so_5::outliving_mutable | ( | T & | r | ) |
| prepared_receive_t< sizeof...(Handlers) > so_5::prepare_receive | ( | const mchain_receive_params_t & | params, |
| Handlers &&... | handlers | ||
| ) |
Create parameters for receive function to be used later.
Accepts all parameters as advanced receive() version. For example:
| params | Parameters for advanced receive. |
| handlers | Handlers |
| prepared_select_t< sizeof...(Cases) > so_5::prepare_select | ( | const mchain_select_params_t & | params, |
| Cases &&... | cases | ||
| ) |
Create prepared select statement to be used later.
Accepts all parameters as advanced select() version. For example:
| params | Parameters for advanced select. |
| cases | Select cases. |
| std::enable_if< details::is_agent_method_pointer<Method_Pointer>::value, details::msg_type_and_handler_pair_t >::type so_5::preprocess_agent_event_handler | ( | const mbox_t & | mbox, |
| agent_t & | agent, | ||
| Method_Pointer | pfn | ||
| ) |
Do preprocessing and some verification of event handler and return msg_type_and_handler_pair for it.
This overload is intended to be used for pointers to members.
| std::enable_if< details::lambda_traits::is_lambda<Lambda>::value, details::msg_type_and_handler_pair_t >::type so_5::preprocess_agent_event_handler | ( | const mbox_t & | mbox, |
| agent_t & | , | ||
| Lambda && | lambda | ||
| ) |
Do preprocessing and some verification of event handler and return msg_type_and_handler_pair for it.
This overload is intended to be used for lambdas or functional objects.
|
inline |
Get the ID of the current thread.
|
inline |
Get the raw thread id from current_thread_id.
|
inline |
Receive and handle one message from message chain.
| chain | Message chain from which a message must be extracted. |
| waiting_timeout | Maximum timeout for waiting for message on empty bag. |
| handlers | Handlers for message processing. |
|
inline |
Advanced version of receive from mchain.
| params | Parameters for receive. |
| handlers | Handlers for message processing. |
| mchain_receive_result_t so_5::receive | ( | const prepared_receive_t< Handlers_Count > & | prepared | ) |
A receive operation to be done on previously prepared receive params.
Usage of ordinary forms of receive() functions inside loops could be inefficient because of wasting resources on constructions of internal objects with descriptions of handlers on each receive() call. More efficient way is preparation of all receive params and reusing them later. A combination of so_5::prepare_receive() and so_5::receive(prepared_receive_t) allows to do that.
Usage example:
| std::future< Result > so_5::request_future | ( | Target && | who, |
| Args &&... | args | ||
| ) |
Make a synchronous request and receive result in form of a future object. Intended to use with messages.
| Result | type of expected result. The std::future<Result> will be returned. |
| Msg | type of message to be sent to request processor. |
| Target | identification of request processor. Could be reference to so_5::mbox_t, to so_5::agent_t or so_5::adhoc_agent_definition_proxy_t (in two later cases agent's direct mbox will be used). |
| Args | arguments for Msg's constructors. |
| who | Target for sending a synchronous request to. |
| args | Arguments for Msg's constructor params. |
| std::enable_if< !is_signal<Msg>::value, std::future<Result> >::type so_5::request_future | ( | Target && | who, |
| mhood_t< Msg > | mhood | ||
| ) |
A version of request_future function for initiating of a synchonous request from exising message hood.
| Result | type of an expected result. |
| Target | type of a destination (it can be agent, adhoc-agent, mbox or mchain). |
| Msg | type of a message to be used as request (it can be in form of Msg, so_5::immutable_msg<Msg> or so_5::mutable_msg<Msg>). |
Usage example:
| who | Target for sending a synchronous request to. |
| mhood | Already existing message. |
| std::enable_if< is_signal<Msg>::value, std::future<Result> >::type so_5::request_future | ( | Target && | who, |
| mhood_t< Msg > | |||
| ) |
A version of request_future function for initiating of a synchonous request from exising message hood.
| Result | type of an expected result. |
| Target | type of a destination (it can be agent, adhoc-agent, mbox or mchain). |
| Msg | type of a signal to be used as request (it can be in form of Msg or so_5::immutable_msg<Msg>). |
Usage example:
| who | Target for sending a synchronous request to. |
| Future_Type so_5::request_future | ( | Target && | who | ) |
Make a synchronous request and receive result in form of a future object. Intended to use with signals.
| Result | type of expected result. The std::future<Result> will be returned. |
| Signal | type of signal to be sent to request processor. This type must be derived from so_5::signal_t. |
| Target | identification of request processor. Could be reference to so_5::mbox_t, to so_5::agent_t or so_5::adhoc_agent_definition_proxy_t (in two later cases agent's direct mbox will be used). |
| Future_Type | type of funtion return value (detected automatically). |
| who | Target for sending a synchronous request to. |
| Result so_5::request_value | ( | Target && | who, |
| Duration | timeout, | ||
| Args &&... | args | ||
| ) |
Make a synchronous request and receive result in form of a value with waiting for some time. Intended to use with messages.
| Result | type of expected result. |
| Msg | type of message to be sent to request processor. |
| Target | identification of request processor. Could be reference to so_5::mbox_t, to so_5::agent_t or so_5::adhoc_agent_definition_proxy_t (in two later cases agent's direct mbox will be used). |
| Duration | type of waiting indicator. Can be so_5::service_request_infinite_waiting_t or some of std::chrono type. |
| Args | arguments for Msg's constructors. |
| who | Target for sending a synchronous request to. |
| timeout | Time to wait. |
| args | Arguments for Msg's constructor params. |
| std::enable_if< !so_5::is_signal<Msg>::value, Result >::type so_5::request_value | ( | Target && | who, |
| Duration | timeout, | ||
| mhood_t< Msg > | mhood | ||
| ) |
A version of request_value function for initiating of a synchonous request from exising message hood.
| Result | type of an expected result. |
| Target | type of a destination (it can be agent, adhoc-agent, mbox or mchain). |
| Duration | type of waiting indicator. Can be so_5::service_request_infinite_waiting_t or some of std::chrono type. |
| Msg | type of a message to be used as request (it can be in form of Msg, so_5::immutable_msg<Msg> or so_5::mutable_msg<Msg>). |
Usage example:
| who | Target for sending a synchronous request to. |
| timeout | Time to wait. |
| mhood | Message hood with existed message instance. |
| Result_Type so_5::request_value | ( | Target && | who, |
| Duration | timeout | ||
| ) |
Make a synchronous request and receive result in form of a value with waiting for some time. Intended to use with signals.
| Result | type of expected result. returned. |
| Signal | type of signal to be sent to request processor. This type must be derived from so_5::signal_t. |
| Target | identification of request processor. Could be reference to so_5::mbox_t, to so_5::agent_t or so_5::adhoc_agent_definition_proxy_t (in two later cases agent's direct mbox will be used). |
| Duration | type of waiting indicator. Can be so_5::service_request_infinite_waiting_t or some of std::chrono type. |
| Result_Type | type of funtion return value (detected automatically). |
| who | Target for sending a synchronous request to. |
| timeout | Time for waiting for a result. |
| std::enable_if< so_5::is_signal<Msg>::value, Result >::type so_5::request_value | ( | Target && | who, |
| Duration | timeout, | ||
| mhood_t< Msg > | |||
| ) |
A version of request_value function for initiating of a synchonous request from exising message hood.
Intended to be used with signals.
| Result | type of an expected result. |
| Target | type of a destination (it can be agent, adhoc-agent, mbox or mchain). |
| Duration | type of waiting indicator. Can be so_5::service_request_infinite_waiting_t or some of std::chrono type. |
| Msg | type of a signal to be used as request (it can be in form of Msg or so_5::immutable_msg<Msg>). |
Usage example:
| who | Target for sending a synchronous request to. |
| timeout | Time to wait. |
| mchain_receive_result_t so_5::select | ( | const mchain_select_params_t & | params, |
| Cases &&... | cases | ||
| ) |
An advanced form of multi chain select.
| params | Parameters for advanced select. |
| cases | Select cases. |
| mchain_receive_result_t so_5::select | ( | Duration | wait_time, |
| Cases &&... | cases | ||
| ) |
A simple form of multi chain select.
This is just a shortcat for more advanced version of select(). A call:
Can be rewritten as:
| mchain_receive_result_t so_5::select | ( | const prepared_select_t< Cases_Count > & | prepared | ) |
A select operation to be done on previously prepared select params.
Usage of ordinary forms of select() functions inside loops could be inefficient because of wasting resources on constructions of internal objects with descriptions of select cases on each select() call. More efficient way is preparation of all select params and reusing them later. A combination of so_5::prepare_select() and so_5::select(prepared_select_t) allows to do that.
Usage example:
| void so_5::send | ( | Target && | to, |
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a message or a signal.
| Message | type of message to be sent. |
| Target | identification of request processor. Could be reference to so_5::mbox_t, to so_5::agent_t or so_5::adhoc_agent_definition_proxy_t (in two later cases agent's direct mbox will be used). |
| Args | arguments for Message's constructor. |
| std::enable_if< !is_signal< Message >::value >::type so_5::send | ( | Target && | to, |
| mhood_t< Message > | what | ||
| ) |
A version of send function for redirection of a message from exising message hood.
| Message | a type of message to be redirected (it can be in form of Msg, so_5::immutable_msg<Msg> or so_5::mutable_msg<Msg>). |
Usage example:
| std::enable_if< is_signal< Message >::value >::type so_5::send | ( | Target && | to, |
| mhood_t< Message > | |||
| ) |
A version of send function for redirection of a signal from exising message hood.
| Message | a type of signal to be redirected (it can be in form of Sig or so_5::immutable_msg<Sig>). |
Usage example:
| void so_5::send_delayed | ( | so_5::environment_t & | env, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a delayed message.
| env | An environment to be used for timer. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| args | Message constructor parameters. |
| void so_5::send_delayed | ( | Target && | target, |
| std::chrono::steady_clock::duration | pause, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a delayed message to the specified destination.
Agent, ad-hoc agent or mchain can be used as target.
| Message | type of message or signal to be sent. |
| Target | can be so_5::agent_t, so_5::adhoc_agent_definition_proxy_t or so_5::mchain_t. |
| Args | list of arguments for Message's constructor. |
| target | A target for delayed message. |
| pause | Pause for message delaying. |
| args | Message constructor parameters. |
| void so_5::send_delayed | ( | so_5::agent_t & | agent, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a delayed message.
Gets the Environment from the agent specified.
| agent | An agent whos environment must be used. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| args | Message constructor parameters. |
| std::enable_if< !message_payload_type<Message>::is_signal >::type so_5::send_delayed | ( | so_5::environment_t & | env, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| mhood_t< Message > | msg | ||
| ) |
A utility function for delayed redirection of a message from existing message hood.
| Message | a type of message to be redirected (it can be in form of Msg, so_5::immutable_msg<Msg> or so_5::mutable_msg<Msg>). |
Usage example:
| env | An environment to be used for timer. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| msg | Message instance owner. |
| std::enable_if< message_payload_type<Message>::is_signal >::type so_5::send_delayed | ( | so_5::environment_t & | env, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| mhood_t< Message > | |||
| ) |
A utility function for delayed redirection of a signal from existing message hood.
| Message | a type of signal to be redirected (it can be in form of Sig or so_5::immutable_msg<Sig>). |
Usage example:
| env | An environment to be used for timer. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| void so_5::send_delayed | ( | Target && | target, |
| std::chrono::steady_clock::duration | pause, | ||
| mhood_t< Message > | mhood | ||
| ) |
A helper function for redirection of a message/signal as a delayed message/signal.
This function can be used if target is a reference to agent or if target is a mchain. In such cases instead of writing:
it is possible to write:
Example usage:
| target | A target for delayed message/signal. It can be a reference to a target agent or a mchain_t. |
| pause | Pause for the next occurence of the message/signal. |
| mhood | Existing message hood for message/signal to be sent. |
| void so_5::send_delayed_to_agent | ( | so_5::agent_t & | agent, |
| std::chrono::steady_clock::duration | pause, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a delayed message to the agent's direct mbox.
Gets the Environment from the agent specified.
| agent | An agent whos environment must be used. |
| pause | Pause for message delaying. |
| args | Message constructor parameters. |
| void so_5::send_delayed_to_agent | ( | const so_5::adhoc_agent_definition_proxy_t & | agent, |
| std::chrono::steady_clock::duration | pause, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a delayed message to the ad-hoc agent's direct mbox.
Gets the Environment from the agent specified.
| agent | An agent whos environment must be used. |
| pause | Pause for message delaying. |
| args | Message constructor parameters. |
| SO_5_NODISCARD timer_id_t so_5::send_periodic | ( | so_5::environment_t & | env, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a periodic message.
| env | An environment to be used for timer. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| args | Message constructor parameters. |
| SO_5_NODISCARD timer_id_t so_5::send_periodic | ( | so_5::agent_t & | agent, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a periodic message.
Gets the Environment from the agent specified.
| agent | An agent whos environment must be used. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| args | Message constructor parameters. |
| SO_5_NODISCARD timer_id_t so_5::send_periodic | ( | Target && | target, |
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a periodic message to the specified destination.
Agent, ad-hoc agent or mchain can be used as target.
| Message | type of message or signal to be sent. |
| Target | can be so_5::agent_t, so_5::adhoc_agent_definition_proxy_t or so_5::mchain_t. |
| Args | list of arguments for Message's constructor. |
| target | A destination for the periodic message. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| args | Message constructor parameters. |
| SO_5_NODISCARD std::enable_if< !is_signal< Message >::value, timer_id_t >::type so_5::send_periodic | ( | so_5::environment_t & | env, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| mhood_t< Message > | mhood | ||
| ) |
A utility function for delivering a periodic from an existing message hood.
| Message | a type of message to be redirected (it can be in form of Msg, so_5::immutable_msg<Msg> or so_5::mutable_msg<Msg>). |
Usage example:
| env | An environment to be used for timer. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| mhood | Existing message hood for message to be sent. |
| SO_5_NODISCARD std::enable_if< is_signal< Message >::value, timer_id_t >::type so_5::send_periodic | ( | so_5::environment_t & | env, |
| const so_5::mbox_t & | to, | ||
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| mhood_t< Message > | |||
| ) |
A utility function for periodic redirection of a signal from existing message hood.
| Message | a type of signal to be redirected (it can be in form of Sig or so_5::immutable_msg<Sig>). |
Usage example:
| env | An environment to be used for timer. |
| to | Mbox for the message to be sent to. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| SO_5_NODISCARD timer_id_t so_5::send_periodic | ( | Target && | target, |
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| mhood_t< Message > | mhood | ||
| ) |
A helper function for redirection of a message/signal as a periodic message/signal.
This function can be used if target is a reference to agent or if target is a mchain. In such cases instead of writing:
it is possible to write:
Example usage:
| target | A target for periodic message/signal. It can be a reference to a target agent or a mchain_t. |
| pause | Pause for the first occurence of the message/signal. |
| period | Period of message repetitions. |
| mhood | Existing message hood for message/signal to be sent. |
| SO_5_NODISCARD timer_id_t so_5::send_periodic_to_agent | ( | so_5::agent_t & | agent, |
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a periodic message to the agent's direct mbox.
Gets the Environment from the agent specified.
| agent | An agent whos environment must be used. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| args | Message constructor parameters. |
| SO_5_NODISCARD timer_id_t so_5::send_periodic_to_agent | ( | const so_5::adhoc_agent_definition_proxy_t & | agent, |
| std::chrono::steady_clock::duration | pause, | ||
| std::chrono::steady_clock::duration | period, | ||
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a periodic message to the agent's direct mbox.
Gets the Environment from the agent specified.
| agent | An agent whos environment must be used. |
| pause | Pause for message delaying. |
| period | Period of message repetitions. |
| args | Message constructor parameters. |
| void so_5::send_to_agent | ( | const so_5::agent_t & | receiver, |
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a message to the agent's direct mbox.
| void so_5::send_to_agent | ( | const so_5::adhoc_agent_definition_proxy_t & | receiver, |
| Args &&... | args | ||
| ) |
A utility function for creating and delivering a message to the ad-hoc agent's direct mbox.
| signal_indicator_t< S > so_5::signal | ( | ) |
A special signal-indicator.
Must be used as signal-indicator in subscription_bind_t::event() methods:
| S | type of signal. |
|
inline |
Factory for timer_heap thread with default parameters.
|
inline |
Factory for timer_heap thread with explicitely specified parameters.
| initial_heap_capacity | Initial capacity of heap array. |
|
inline |
Factory for timer_heap manager with default parameters.
|
inline |
Factory for timer_heap manager with explicitely specified parameters.
| initial_heap_capacity | Initial capacity of heap array. |
|
inline |
Factory for timer_list thread with default parameters.
|
inline |
Factory for timer_list manager with default parameters.
|
inline |
Factory for timer_wheel thread with default parameters.
|
inline |
Factory for timer_wheel thread with explicitely specified parameters.
| wheel_size | Size of the wheel. |
| granularity | A size of one time step for the wheel. |
|
inline |
Factory for timer_wheel manager with default parameters.
|
inline |
Factory for timer_wheel manager with explicitely specified parameters.
| wheel_size | Size of the wheel. |
| granularity | A size of one time step for the wheel. |
| std::enable_if< !is_signal<M>::value, mhood_t< immutable_msg< M > > >::type so_5::to_immutable | ( | mhood_t< mutable_msg< M > > | msg | ) |
Transform mutable message instance into immutable.
Usage example:
| std::enable_if< is_signal<M>::value, mhood_t< immutable_msg< M > > >::type so_5::to_immutable | ( | mhood_t< mutable_msg< M > > | ) |
|
inline |
Helper function for conversion from size_t to priority.
| std::invalid_argument | if v is out of range. |
|
inline |
Helper function for conversion from priority to size_t.
| SO_5_FUNC subscription_storage_factory_t so_5::vector_based_subscription_storage_factory | ( | std::size_t | initial_capacity | ) |
Factory for subscription storage based on std::vector.
| initial_capacity | Initial storage capacity. |
| const infinite_wait_indication so_5::infinite_wait |
A special indicator for infinite waiting on service request or on receive from mchain.
| const no_wait_indication so_5::no_wait = no_wait_indication::no_wait |
A special indicator for no waiting on service request or on receive from mchain.
| const thread_safety_t so_5::not_thread_safe = thread_safety_t::unsafe |
Shorthand for thread unsafety indicator.
| const int so_5::rc_agent_has_no_cooperation = 14 |
Agent is not bound to a cooperation.
| const int so_5::rc_agent_incompatible_type_conversion = 15 |
It is impossible to make a cast to that type.
| const int so_5::rc_agent_is_already_bind_to_disp = 12 |
Agent is already bound to the dispatcher.
| const int so_5::rc_agent_is_already_bind_to_env = 11 |
Agent is already bound to the SObjectizer Environment.
| const int so_5::rc_agent_is_not_the_state_owner = 43 |
Agent doesn't own this state.
| const int so_5::rc_agent_to_disp_binding_failed = 27 |
Binding of agent to dispatcher failed.
| const int so_5::rc_agent_unknown_state = 10 |
Trying to switch to the unknown state.
| const int so_5::rc_another_state_switch_in_progress = 170 |
An attempt to switch agent state when another switch operation is in progress.
| const int so_5::rc_attempt_to_cast_to_envelope_on_nullptr = 180 |
An attempt to cast message to message envelope when a pointer to message is NULL.
Envelopes were introduced in v.5.5.23. Envelopes are sent and delivered as ordinary messages (it means that pointer to envelope will be sent as pointer to message_t). For processing of an envelope it is necessary to cast a pointer from message_t to envelope_t. But it is impossible if a pointer to message_t is null.
| const int so_5::rc_autoshutdown_must_be_enabled = 171 |
An attempt to launch environment with autoshutdown disabled in conditions where autoshutdown must be enabled.
For example so_5::env_infrastructures::simple_not_mtsafe requires autoshutdown feature.
| const int so_5::rc_cannot_set_stop_guard_when_stop_is_started = 175 |
An attempt to set up a new stop_guard when the stop operation is already in progress.
| const int so_5::rc_coop_define_agent_failed = 24 |
Cooperation couldn't be registered.
| const int so_5::rc_coop_has_no_parent = 25 |
Cooperation has no the parent cooperation.
| const int so_5::rc_coop_has_not_found_among_registered_coop = 23 |
There is no registered cooperation with that name.
| const int so_5::rc_coop_has_references_to_null_agents_or_binders = 22 |
Cooperation has the null reference to an agent or dispatcher binding.
| const int so_5::rc_coop_with_specified_name_is_already_registered = 21 |
Cooperation name is not unique.
| const int so_5::rc_delivery_filter_cannot_be_used_on_mpsc_mbox = 89 |
Delivery filter is not applicable to MPSC-mboxes.
| const int so_5::rc_disp_cannot_be_added = 34 |
New dispatcher cannot be added because of illegal state of SObjectizer Environment.
| const int so_5::rc_disp_create_failed = 31 |
Unable to create a dispatcher.
| const int so_5::rc_disp_start_failed = 30 |
Unable to start a dispatcher.
| const int so_5::rc_disp_type_mismatch = 32 |
The expected type of dispatcher and the actual type of the agent dispatcher are not the same.
| const int so_5::rc_empty_name = 500 |
The empty name doesn't allowed.
| const int so_5::rc_environment_error = 1 |
so_environment launch is failed.
| const int so_5::rc_event_handler_match_error = 42 |
Unable to deregister that handler.
There is a handler for the event/mbox/state, but it is another handler. Not the one is specified for the deregistration.
| const int so_5::rc_evt_handler_already_provided = 40 |
A handler for that event/mbox/state is already registered.
| const int so_5::rc_illegal_subscriber_for_mpsc_mbox = 47 |
An attempt to create illegal subscription to mpsc_mbox.
| const int so_5::rc_initial_substate_already_defined = 19 |
Initial substate for a composite state is already defined.
| const int so_5::rc_intercept_handler_already_provided = 44 |
An interceptor for the event/mbox/state is already registered.
| const int so_5::rc_interception_handler_match_error = 46 |
Unable to deregister this interceptor.
There is an interceptor for the event/mbox/state, but it is another handler. Not the one is specified for the deregistration.
| const int so_5::rc_invalid_time_limit_for_state = 501 |
Invalid value of time limit for an agent's state.
| const int so_5::rc_layer_does_not_exist = 105 |
A layer with the specified type doesn't exist.
| const int so_5::rc_layer_not_binded_to_so_env = 100 |
The layer is not bound to the SObjectizer Environment.
| const int so_5::rc_mbox_duplicating_name = 80 |
The mbox name is not unique.
| const int so_5::rc_mbox_unable_to_find_mbox = 81 |
The name of mbox is unknown.
| const int so_5::rc_message_has_no_limit_defined = 48 |
An attempt to create subscription to message without predefined limit for that message type.
| const int so_5::rc_more_than_one_svc_handler = 84 |
There are more then one handler for service request.
| const int so_5::rc_msg_chain_doesnt_support_delivery_filters = 163 |
Attempt to set delivery_filter for message chain.
| const int so_5::rc_msg_chain_doesnt_support_subscriptions = 162 |
Attempt to make subscription for message chain.
| const int so_5::rc_msg_chain_is_empty = 160 |
Attempt to get message from empty message queue.
| const int so_5::rc_msg_chain_is_full = 161 |
Attempt to push a message to full message queue.
| const int so_5::rc_msg_chain_overflow = 164 |
Attempt to added a message to full message chain when throw_exception overflow reaction is used.
| const int so_5::rc_msg_service_request_bad_cast = 87 |
Unable to cast service call description object to the appropriate type.
This error is possible when type of service request doesn't match actual type of request handler. For example:
| const int so_5::rc_msg_tracing_disabled = 140 |
Message delivery tracing is disabled and cannot be used.
| const int so_5::rc_mutable_msg_cannot_be_delivered_via_mpmc_mbox = 172 |
An attempt to deliver mutable message via MPMC mbox.
| const int so_5::rc_mutable_msg_cannot_be_periodic = 173 |
An attempt to send mutable message as a periodic message.
| const int so_5::rc_named_disp_not_found = 13 |
Dispatcher with that name is not found.
| const int so_5::rc_negative_value_for_pause = 176 |
An attempt to use negative value for pause argument for delayed or periodic message/signal.
A value of pause argument for so_5::send_delayed() and so_5::send_periodic() (also for so_5::environment_t::schedule_timer() and so_5::environment_t::single_timer()) must be non-negative.
| const int so_5::rc_negative_value_for_period = 177 |
An attempt to use negative value for period argument for periodic message/signal.
A value of pause argument for so_5::send_periodic() (also for so_5::environment_t::schedule_timer()) must be non-negative.
| const int so_5::rc_no_event_handler_provided = 41 |
A handler for that event/mbox/state is not registered and cannot be deregistered.
| const int so_5::rc_no_initial_substate = 17 |
An attempt to change agent state to a new composite state which have no initial state defined.
| const int so_5::rc_no_interception_handler_provided = 45 |
An interceptor for the event/mbox/state is not registered and cannot be deregistered.
| const int so_5::rc_no_svc_handlers = 83 |
No handlers for service request found.
| const int so_5::rc_not_implemented = 502 |
Feature or method has no implementation yet.
| const int so_5::rc_null_message_data = 82 |
Null message data.
An attempt to deliver message_t by nullptr pointer to it is an error. A signal should be used for this.
| const int so_5::rc_operation_enabled_only_on_agent_working_thread = 16 |
An attempt to perform an operation which is enabled only on agent's working thread.
| const int so_5::rc_parent_coop_not_found = 26 |
Parent cooperation not found.
| const int so_5::rc_priority_quote_illegal_value = 120 |
Illegal value of quote for a priority.
| const int so_5::rc_scenario_must_be_completed = 182 |
Testing scenario must be completed before an attempt to do the current operation.
| const int so_5::rc_several_handlers_for_one_message_type = 165 |
Attempt to define several handlers for one msg_type.
| const int so_5::rc_several_limits_for_one_message_type = 49 |
An attempt to define several limits for one message type.
| const int so_5::rc_state_nesting_is_too_deep = 18 |
Nesting of agent states is too deep.
| const int so_5::rc_stored_state_name_not_found = 183 |
There is no stored state name in the testing scenario.
| const int so_5::rc_subscription_to_mutable_msg_from_mpmc_mbox = 174 |
An attempt to make subscription on mutable message from MPMC mbox.
Delivery of mutable messages via MPMC mboxes is prohibited.
| const int so_5::rc_svc_not_handled = 85 |
Service request has not been handled. Service handler is disabled in the current agent state.
| const int so_5::rc_svc_request_cannot_be_transfomred_on_overlimit = 88 |
Unable to transform service request as part of overlimit reaction.
| const int so_5::rc_svc_result_not_received_yet = 86 |
Service request result has not beed received yet.
| const int so_5::rc_transfer_to_state_loop = 178 |
A loop in transfer_to_state detected.
There could be a case when usage of transfer_to_state leads to a loop. For a very simple example:
Since v.5.5.22.1 an attempt to handle message in the example above will lead to an exception with this error code.
Note that there could be more tricky examples when hierarchical states are used:
| const int so_5::rc_trying_to_add_extra_layer_that_already_exists_in_default_list = 102 |
The layer is already bound to the SObjectizer Environment as a default layer.
| const int so_5::rc_trying_to_add_extra_layer_that_already_exists_in_extra_list = 103 |
The layer is already bound to the SObjectizer Environment as an extra layer.
| const int so_5::rc_trying_to_add_nullptr_extra_layer = 101 |
Unable to bind a layer by the null pointer to it.
| const int so_5::rc_unable_to_define_new_step = 181 |
New step can't be defined if testing scenario is already started or finished.
| const int so_5::rc_unable_to_register_coop_during_shutdown = 28 |
It is impossible to register cooperation during SObjectizer Environment shutdown.
| const int so_5::rc_unable_to_schedule_timer_act = 90 |
Unable to schedule a timer event.
| const int so_5::rc_unable_to_start_extra_layer = 104 |
Layer initialization is failed.
| const int so_5::rc_unexpected_error = 0xFFFFFF |
Unclassified error.
| const int so_5::rc_unknown_exception_type = 503 |
An exception of unknown type is caught.
SObjectizer expects that all exceptions are derived from std::exception class.
| const int so_5::rc_zero_ptr_to_coop = 20 |
A zero pointer is detected.
| const thread_safety_t so_5::thread_safe = thread_safety_t::safe |
Shorthand for thread safety indicator.
1.8.14