Skip to main content

AVxcelerate Simulation Framework 2026 R1 SP01

Class simulation_framework::core::StandaloneActivityService

Last update: 22.04.2026

Definition: core/service/standalone_activity_service/standalone_activity_service.h (line 50)

It provides a running process of desired activity returned by interface IStandaloneActivityCreator and keeps it communicating and being scheduled by simulation framework core process.

If you have implemented my_activity_creator.h of interface IStandaloneActivityCreator based on example in simfwk-core/service/standalone_activity_service/standalone_activity_creator/i_standalone_activity_creator.h, then you can create an executable using this class, which runs your desired activity as service, keep talking and being scheduled by simfwk_cli.

This example shows how to implement this process and join the simulation from standalone

#include "core/service/standalone_activity_service/standalone_activity_service.h"
#include "core/my_activity_creator.h"

int main()
{
    ;

    std::unique_ptr<IStandaloneActivityCreator> my_activity_creator =
        std::make_unique<MyActivityCreator>("my_activity_name");

    auto standalone_activity_service =
        std::make_unique<StandaloneActivityService>(std::move(my_activity_creator));

    return standalone_activity_service->Run();
}

Members

Public functions

Function StandaloneActivityService

simulation_framework::core::StandaloneActivityService::StandaloneActivityService(std::unique_ptr< IStandaloneActivityCreator > standalone_activity_creator)

Construct an Standalone Activity as Service to join simulation standalonely

Parameters:

  • standalone_activity_creator: An interface defines how the activity should be instanciated

Parameters:

Return type:

Function ~StandaloneActivityService

simulation_framework::core::StandaloneActivityService::~StandaloneActivityService()

Return type:

Function Run

int simulation_framework::core::StandaloneActivityService::Run()

Start the Standalone Activity service and keep it alive waiting for standalone request on this Activity from simfwk core process (simfwk_cli)

Returns:

Programm return code which indicates whether the Standalone Activity is healthy

Return type: int

Function RequestStop

void simulation_framework::core::StandaloneActivityService::RequestStop()

Request the runner to exit Run() on the next loop iteration (e.g. for test teardown so the thread can be joined before destroying the service).

Return type: void

Connect with Ansys