Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::Conversation Class Reference

A wrapper around the communication between a diagnostic client and a diagnostic server. More...

#include <conversation.h>

Public Member Functions

ara::core::Result< ActivityStatusTypeGetActivityStatus ()
 Activity status property getter. More...
 
void Deactivate ()
 Set the conversation activity status to 'inactive'.
 
ara::core::Result< void > SetActivityNotifier (std::function< void(ActivityStatusType)> notifier)
 Register an activity status change callback. More...
 
ara::core::Result< ConversationIdentifierTypeGetConversationIdentifier ()
 Conversation ID property getter. More...
 
ara::core::Result< SessionControlTypeGetDiagnosticSession ()
 Diagnostic session property getter. More...
 
void SetDiagnosticSession (SessionControlType diagnosticSession)
 Diagnostic session property setter. More...
 
ara::core::Result< void > SetDiagnosticSessionNotifier (std::function< void(SessionControlType)> notifier)
 Register a diagnostic session change callback. More...
 
ara::core::Result< std::string > GetDiagnosticSessionShortName (SessionControlType session)
 Convert a given session to a short name. More...
 
ara::core::Result< SecurityLevelTypeGetDiagnosticSecurityLevel ()
 Security level property getter. More...
 
ara::core::Result< void > SetSecurityLevelNotifier (std::function< void(SecurityLevelType)> notifier)
 Register a security level change callback. More...
 
ara::core::Result< std::string > GetDiagnosticSecurityLevelShortName (SecurityLevelType securityLevel)
 Convert a given security level to a short name. More...
 
ara::core::Result< void > ResetToDefaultSession ()
 Reset the ongoing session to default. More...
 

Static Public Member Functions

static ara::core::Result< std::reference_wrapper< Conversation > > GetConversation (MetaInfo &metaInfo)
 Conversation factory. More...
 
static std::vector< std::reference_wrapper< Conversation > > GetAllConversations ()
 Get all the existing conversations. More...
 
static std::vector< std::reference_wrapper< Conversation > > GetCurrentActiveConversations ()
 Get all the active conversations. More...
 

Detailed Description

A wrapper around the communication between a diagnostic client and a diagnostic server.

Note
The class is not fully aligned with the ARA standard.

Member Function Documentation

◆ GetActivityStatus()

ara::core::Result< ActivityStatusType > ara::diag::Conversation::GetActivityStatus ( )

Activity status property getter.

Returns
Active or inactive status

◆ GetAllConversations()

std::vector< std::reference_wrapper< Conversation > > ara::diag::Conversation::GetAllConversations ( )
static

Get all the existing conversations.

Returns
Active and inactive conversations collection

◆ GetConversation()

ara::core::Result< std::reference_wrapper< Conversation > > ara::diag::Conversation::GetConversation ( MetaInfo metaInfo)
static

Conversation factory.

Parameters
metaInfoAdditional information to create a conversation
Returns
Reference to the created conversation in case of a valid meta information
Note
Return type signature is not compatible with ARA standard.

◆ GetConversationIdentifier()

ara::core::Result< ConversationIdentifierType > ara::diag::Conversation::GetConversationIdentifier ( )

Conversation ID property getter.

Returns
Conversation ID

◆ GetCurrentActiveConversations()

std::vector< std::reference_wrapper< Conversation > > ara::diag::Conversation::GetCurrentActiveConversations ( )
static

Get all the active conversations.

Returns
Active conversations collection

◆ GetDiagnosticSecurityLevel()

ara::core::Result< SecurityLevelType > ara::diag::Conversation::GetDiagnosticSecurityLevel ( )

Security level property getter.

Returns
Status of the active security level

◆ GetDiagnosticSecurityLevelShortName()

ara::core::Result< std::string > ara::diag::Conversation::GetDiagnosticSecurityLevelShortName ( SecurityLevelType  securityLevel)

Convert a given security level to a short name.

Parameters
securityLevelSecurity level to be converted
Returns
Given security level short name

◆ GetDiagnosticSession()

ara::core::Result< SessionControlType > ara::diag::Conversation::GetDiagnosticSession ( )

Diagnostic session property getter.

Returns
Coversation active session

◆ GetDiagnosticSessionShortName()

ara::core::Result< std::string > ara::diag::Conversation::GetDiagnosticSessionShortName ( SessionControlType  session)

Convert a given session to a short name.

Parameters
sessionSession to be converted
Returns
Given session short name

◆ ResetToDefaultSession()

ara::core::Result< void > ara::diag::Conversation::ResetToDefaultSession ( )

Reset the ongoing session to default.

Returns
No error in case of a successful reset

◆ SetActivityNotifier()

ara::core::Result< void > ara::diag::Conversation::SetActivityNotifier ( std::function< void(ActivityStatusType)>  notifier)

Register an activity status change callback.

Parameters
notifierCallback to be invoked when the activity status changed
Returns
No error will be returned

◆ SetDiagnosticSession()

void ara::diag::Conversation::SetDiagnosticSession ( SessionControlType  diagnosticSession)

Diagnostic session property setter.

Parameters
diagnosticSessionNew diagnostic session
Note
The method is not ARA specific.

◆ SetDiagnosticSessionNotifier()

ara::core::Result< void > ara::diag::Conversation::SetDiagnosticSessionNotifier ( std::function< void(SessionControlType)>  notifier)

Register a diagnostic session change callback.

Parameters
notifierCallback to be invoked when the diagnostic session changed
Returns
No error will be returned

◆ SetSecurityLevelNotifier()

ara::core::Result< void > ara::diag::Conversation::SetSecurityLevelNotifier ( std::function< void(SecurityLevelType)>  notifier)

Register a security level change callback.

Parameters
notifierCallback to be invoked when the security level status changed
Returns
No error will be returned