Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
application::platform::StateManagement Class Reference

State managment modelled process. More...

#include <state_management.h>

Inheritance diagram for application::platform::StateManagement:
ara::exec::helper::ModelledProcess

Public Member Functions

 StateManagement (AsyncBsdSocketLib::Poller *poller)
 Constructor. More...
 
- Public Member Functions inherited from ara::exec::helper::ModelledProcess
void Initialize (const std::map< std::string, std::string > &arguments)
 Initialize the process model to run the main block. More...
 
int Terminate ()
 Terminate the process model. More...
 

Protected Member Functions

int Main (const std::atomic_bool *cancellationToken, const std::map< std::string, std::string > &arguments) override
 Main running block of the process. More...
 
- Protected Member Functions inherited from ara::exec::helper::ModelledProcess
 ModelledProcess (std::string appId, AsyncBsdSocketLib::Poller *poller)
 Constructor. More...
 
void Log (log::LogLevel logLevel, const log::LogStream &logStream)
 Log a steam. More...
 
bool WaitForActivation ()
 Wait for the next main function activation cycle. More...
 

Additional Inherited Members

- Protected Attributes inherited from ara::exec::helper::ModelledProcess
const int cSuccessfulExitCode {0}
 Successful application exit code.
 
const int cUnsuccessfulExitCode {1}
 Unsuccessful application exit code.
 
AsyncBsdSocketLib::Poller *const Poller
 Global poller for TCP/IP network communication.
 
- Static Protected Attributes inherited from ara::exec::helper::ModelledProcess
static const log::LogLevel cLogLevel {log::LogLevel::kInfo}
 Information severity log level.
 
static const log::LogLevel cErrorLevel {log::LogLevel::kError}
 Error severity log level.
 

Detailed Description

State managment modelled process.

Constructor & Destructor Documentation

◆ StateManagement()

application::platform::StateManagement::StateManagement ( AsyncBsdSocketLib::Poller *  poller)
explicit

Constructor.

Parameters
pollerGlobal poller for network communication

Member Function Documentation

◆ Main()

int application::platform::StateManagement::Main ( const std::atomic_bool *  cancellationToken,
const std::map< std::string, std::string > &  arguments 
)
overrideprotectedvirtual

Main running block of the process.

Parameters
argumentsInitialization arguments keys and their corresponding values
cancellationTokenToken to be for cancelling the main cycle
Returns
Exit code
Note
Exit code zero means the graceful shutdown of the process.

Implements ara::exec::helper::ModelledProcess.