Group of Arion instances that run together. This allows IPC as well as sandboxing between groups.
More...
#include <arion.hpp>
Group of Arion instances that run together. This allows IPC as well as sandboxing between groups.
◆ add_arion_instance()
| void arion::ArionGroup::add_arion_instance |
( |
std::shared_ptr< Arion > |
arion, |
|
|
std::optional< pid_t > |
pid = std::nullopt, |
|
|
std::optional< pid_t > |
pgid = std::nullopt |
|
) |
| |
Inserts an Arion instance in this group.
- Parameters
-
| [in] | arion | The Arion instance. |
| [in] | pid | The PID for this instance (optional, nullable). |
| [in] | pgid | The PGID for this instance (optional, nullable). Set to the PID value if not specified. |
◆ count_arion_instances()
| size_t arion::ArionGroup::count_arion_instances |
( |
| ) |
|
Returns the amount of Arion instances associated with this group.
- Returns
- The amount.
◆ get_arion_instance()
| std::shared_ptr< Arion > arion::ArionGroup::get_arion_instance |
( |
pid_t |
pid | ) |
|
Provides the Arion instance in this group associated with the given PID.
- Parameters
-
- Returns
- The Arion instance.
◆ get_arion_instances()
| std::map< pid_t, std::shared_ptr< Arion > > arion::ArionGroup::get_arion_instances |
( |
| ) |
|
Provides the map of all Arion instances associated with this group, with their respective PID being the keys.
- Returns
- The map.
◆ get_curr_pid()
| pid_t arion::ArionGroup::get_curr_pid |
( |
| ) |
|
Provides PID of running Arion instance in this group.
- Returns
- The PID.
◆ get_next_pid()
| pid_t arion::ArionGroup::get_next_pid |
( |
| ) |
|
Provides the next PID to be associated with an Arion instance, in case none is provided when inserting it in the group.
- Returns
- The PID.
◆ has_arion_instance()
| bool arion::ArionGroup::has_arion_instance |
( |
pid_t |
pid | ) |
|
Checks whether a given PID is associated with an Arion instance in this group or not.
- Parameters
-
| [in] | pid | The PID to check for. |
- Returns
- True if the PID was found, false otherwise.
◆ remove_arion_instance()
| void arion::ArionGroup::remove_arion_instance |
( |
pid_t |
pid | ) |
|
Removes an Arion instance from this group, given its PID.
- Parameters
-
| [in] | pid | The PID associated with the Arion instance to remove. |
◆ run()
| void arion::ArionGroup::run |
( |
| ) |
|
Starts emulation of the group. Each Arion instance is given some execution time before switching to the next one.
◆ set_curr_pid()
| void arion::ArionGroup::set_curr_pid |
( |
pid_t |
pid | ) |
|
Define which Arion instance should be currently run in the group, given its PID.
- Parameters
-
◆ set_next_pid()
| void arion::ArionGroup::set_next_pid |
( |
pid_t |
pid | ) |
|
Defines the next PID to be associated with an Arion instance, in case none is provided when inserting it in the group.
- Parameters
-
◆ stop()
| void arion::ArionGroup::stop |
( |
| ) |
|
Stops emulation of the whole group.
◆ stop_curr()
| void arion::ArionGroup::stop_curr |
( |
| ) |
|
Stops emulation of the running Arion instance in this group.
◆ curr_pid
PID of the Arion instance currently running in the group.
◆ instances
| std::map<pid_t, std::shared_ptr<Arion> > arion::ArionGroup::instances |
|
private |
List of Arion instances associated with this group.
◆ next_pid
Next PID to be associated with an Arion instance, in case none is provided when inserting it in the group.
◆ trigger_stop
| bool arion::ArionGroup::trigger_stop |
|
private |
True when emulation of the group should be stopped.
The documentation for this class was generated from the following file:
- /home/runner/work/Arion/Arion/include/arion/arion.hpp