Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AICommsHandler Class Reference
Inheritance diagram for SCR_AICommsHandler:

Protected Member Functions

void SCR_AICommsHandler (notnull IEntity entity, notnull AIAgent agent)
void AddRequest (SCR_AITalkRequest request)
bool CanBypass (SCR_AITalkRequest request=null)
void SetMuted (bool mute)
bool GetMuted ()
void SetSuspended (bool suspended)
bool GetSuspended ()
void Update (float timeSlice)
void Reset ()
 Fails and clears all requests, resets to initial state.
SCR_AITalkRequest FindValidRequest ()
void TryTransmitAndSwitchState ()
 Tries to transmit, if succeedes, switches to ACTIVE state, otherwise to WAITING state.
bool CanTransmit (SCR_AITalkRequest request)
 Checks if we can transmit with relation to channel state.
bool IsChannelFree ()
void SwitchToState (SCR_EAICommunicationState newState)
void TransmitRequest (SCR_AITalkRequest rq)
void FailRequest (SCR_AITalkRequest rq)
void CompleteRequest (SCR_AITalkRequest rq)
void ClearAndFailAllRequests ()
 Clears and fails all requests.
void EOnDiag (float timeSlice)
void ~SCR_AICommsHandler ()

Protected Attributes

ref array< ref SCR_AITalkRequestm_aRequestQueue = {}
ref ref SCR_AITalkRequest m_CurrentRequest
float m_fActiveTimer_ms
bool m_bNeedUpdate = false
SCR_EAICommunicationState m_eState
bool m_bMuted
const float SAMPLE_LENGTH_MS = 2000.0
const float NEARBY_SPEAKER_CHECK_RANGE = 10.0

Detailed Description

Definition at line 19 of file SCR_AICommsHandler.c.

Constructor & Destructor Documentation

◆ SCR_AICommsHandler()

void SCR_AICommsHandler::SCR_AICommsHandler ( notnull IEntity entity,
notnull AIAgent agent )
inlineprotected

Definition at line 43 of file SCR_AICommsHandler.c.

◆ ~SCR_AICommsHandler()

void SCR_AICommsHandler::~SCR_AICommsHandler ( )
inlineprotected

Definition at line 559 of file SCR_AICommsHandler.c.

Member Function Documentation

◆ AddRequest()

void SCR_AICommsHandler::AddRequest ( SCR_AITalkRequest request)
inlineprotected

Definition at line 53 of file SCR_AICommsHandler.c.

◆ CanBypass()

bool SCR_AICommsHandler::CanBypass ( SCR_AITalkRequest request = null)
inlineprotected

Checks if we can optimize out transmitting this, which results in successful completion of request You should call this before creating a talk request and adding it to the queue request - optional, the request which we will check if we can bypass it. If it's not passed, oinly generic rules are checked.

Definition at line 120 of file SCR_AICommsHandler.c.

◆ CanTransmit()

bool SCR_AICommsHandler::CanTransmit ( SCR_AITalkRequest request)
inlineprotected

Checks if we can transmit with relation to channel state.

Definition at line 386 of file SCR_AICommsHandler.c.

◆ ClearAndFailAllRequests()

void SCR_AICommsHandler::ClearAndFailAllRequests ( )
inlineprotected

Clears and fails all requests.

Definition at line 512 of file SCR_AICommsHandler.c.

◆ CompleteRequest()

void SCR_AICommsHandler::CompleteRequest ( SCR_AITalkRequest rq)
inlineprotected

Definition at line 502 of file SCR_AICommsHandler.c.

◆ EOnDiag()

void SCR_AICommsHandler::EOnDiag ( float timeSlice)
inlineprotected

Definition at line 530 of file SCR_AICommsHandler.c.

◆ FailRequest()

void SCR_AICommsHandler::FailRequest ( SCR_AITalkRequest rq)
inlineprotected

Definition at line 493 of file SCR_AICommsHandler.c.

◆ FindValidRequest()

SCR_AITalkRequest SCR_AICommsHandler::FindValidRequest ( )
inlineprotected

Definition at line 331 of file SCR_AICommsHandler.c.

◆ GetMuted()

bool SCR_AICommsHandler::GetMuted ( )
inlineprotected

Definition at line 181 of file SCR_AICommsHandler.c.

◆ GetSuspended()

bool SCR_AICommsHandler::GetSuspended ( )
inlineprotected

Definition at line 217 of file SCR_AICommsHandler.c.

◆ IsChannelFree()

bool SCR_AICommsHandler::IsChannelFree ( )
inlineprotected

Checks if channel is free for transmission. Now it checks nearby characters.

Definition at line 402 of file SCR_AICommsHandler.c.

◆ Reset()

void SCR_AICommsHandler::Reset ( )
inlineprotected

Fails and clears all requests, resets to initial state.

Definition at line 316 of file SCR_AICommsHandler.c.

◆ SetMuted()

void SCR_AICommsHandler::SetMuted ( bool mute)
inlineprotected

Definition at line 158 of file SCR_AICommsHandler.c.

◆ SetSuspended()

void SCR_AICommsHandler::SetSuspended ( bool suspended)
inlineprotected

'Suspended' means a sleeping state When switching to suspended state, current request, if exists, is put back into queue. Requests are not served in suspended state.

Definition at line 190 of file SCR_AICommsHandler.c.

◆ SwitchToState()

void SCR_AICommsHandler::SwitchToState ( SCR_EAICommunicationState newState)
inlineprotected

Definition at line 457 of file SCR_AICommsHandler.c.

◆ TransmitRequest()

void SCR_AICommsHandler::TransmitRequest ( SCR_AITalkRequest rq)
inlineprotected

Definition at line 471 of file SCR_AICommsHandler.c.

◆ TryTransmitAndSwitchState()

void SCR_AICommsHandler::TryTransmitAndSwitchState ( )
inlineprotected

Tries to transmit, if succeedes, switches to ACTIVE state, otherwise to WAITING state.

Definition at line 356 of file SCR_AICommsHandler.c.

◆ Update()

void SCR_AICommsHandler::Update ( float timeSlice)
inlineprotected

Definition at line 226 of file SCR_AICommsHandler.c.

Member Data Documentation

◆ m_aRequestQueue

ref array<ref SCR_AITalkRequest> SCR_AICommsHandler::m_aRequestQueue = {}
protected

Definition at line 28 of file SCR_AICommsHandler.c.

◆ m_bMuted

bool SCR_AICommsHandler::m_bMuted
protected

Definition at line 33 of file SCR_AICommsHandler.c.

◆ m_bNeedUpdate

bool SCR_AICommsHandler::m_bNeedUpdate = false
protected

Definition at line 31 of file SCR_AICommsHandler.c.

◆ m_CurrentRequest

ref ref SCR_AITalkRequest SCR_AICommsHandler::m_CurrentRequest
protected

Definition at line 29 of file SCR_AICommsHandler.c.

◆ m_eState

SCR_EAICommunicationState SCR_AICommsHandler::m_eState
protected

Definition at line 32 of file SCR_AICommsHandler.c.

◆ m_fActiveTimer_ms

float SCR_AICommsHandler::m_fActiveTimer_ms
protected

Definition at line 30 of file SCR_AICommsHandler.c.

◆ NEARBY_SPEAKER_CHECK_RANGE

const float SCR_AICommsHandler::NEARBY_SPEAKER_CHECK_RANGE = 10.0
protected

Definition at line 36 of file SCR_AICommsHandler.c.

◆ SAMPLE_LENGTH_MS

const float SCR_AICommsHandler::SAMPLE_LENGTH_MS = 2000.0
protected

Definition at line 35 of file SCR_AICommsHandler.c.


The documentation for this class was generated from the following file: