Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol Class Referencefinal

#include <ApiEventLoggerCommunicationProtocol.hpp>

Inheritance diagram for iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol:
[legend]
Collaboration diagram for iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol:
[legend]

Classes

struct  EventsApi
 

Public Member Functions

 ApiEventLoggerCommunicationProtocol (const std::shared_ptr< iv::comms::ICommunicationDriver > &driver, const std::shared_ptr< iv::model::comms::NetworkData > &networkData, const std::weak_ptr< iv::channels::AbstractChannel > &heartbeatChannel, const std::weak_ptr< iv::diamar::AppFailuresLoggerManager > &appFailuresLoggerManager, bool sendToCloud)
 
 ~ApiEventLoggerCommunicationProtocol () override=default
 
bool sendValues () override
 Send all registered messages to the API.
 
bool isOnline () override
 
iv::comms::api::ApiResponse getValues (const IApiQueryParamsBuilder &queryParams) const override
 Get values from the API.
 
iv::comms::api::ApiDeleteResponse deleteValues (const IApiQueryParamsBuilder &queryParams) const override
 Delete values from the API.
 
void registerValue (const std::shared_ptr< iv::comms::api::ILoggerMessage > &message) override
 Registers an API message without blocking the thread.
 
iv::comms::api::ApiPingResponse ping () const
 
bool wipe () const
 
bool isEnabled () const
 

Protected Attributes

std::shared_ptr< iv::comms::ICommunicationDriverm_driver
 
bool m_sendToCloud {false}
 
bool m_isEnabled {true}
 
std::shared_ptr< iv::model::comms::NetworkDatam_networkData
 
std::weak_ptr< iv::comms::api::ApiCommunicationDriverm_apiDriver
 
std::weak_ptr< iv::channels::AbstractChannelm_heartbeatChannel
 
std::weak_ptr< iv::diamar::AppFailuresLoggerManagerm_appFailuresLoggerManager
 

Private Attributes

std::unique_ptr< iv::containers::CircularQueue< std::shared_ptr< iv::comms::api::eventLogger::EventLoggerMessage >, m_sendQueueSize > > m_sendQueue
 

Static Private Attributes

static constexpr std::size_t m_sendQueueSize {5000}
 

Constructor & Destructor Documentation

◆ ApiEventLoggerCommunicationProtocol()

iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::ApiEventLoggerCommunicationProtocol ( const std::shared_ptr< iv::comms::ICommunicationDriver > & driver,
const std::shared_ptr< iv::model::comms::NetworkData > & networkData,
const std::weak_ptr< iv::channels::AbstractChannel > & heartbeatChannel,
const std::weak_ptr< iv::diamar::AppFailuresLoggerManager > & appFailuresLoggerManager,
bool sendToCloud )

◆ ~ApiEventLoggerCommunicationProtocol()

iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::~ApiEventLoggerCommunicationProtocol ( )
overridedefault

Member Function Documentation

◆ deleteValues()

iv::comms::api::ApiDeleteResponse iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::deleteValues ( const IApiQueryParamsBuilder & queryParams) const
nodiscardoverridevirtual

Delete values from the API.

Parameters
queryParams
Returns

Implements iv::comms::api::IApiCommunicationProtocol.

◆ getValues()

iv::comms::api::ApiResponse iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::getValues ( const IApiQueryParamsBuilder & queryParams) const
nodiscardoverridevirtual

Get values from the API.

Parameters
queryParams
Returns

Implements iv::comms::api::IApiCommunicationProtocol.

◆ isEnabled()

bool iv::comms::api::IApiCommunicationProtocol::isEnabled ( ) const
nodiscardinherited

◆ isOnline()

bool iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::isOnline ( )
nodiscardoverridevirtual

◆ ping()

iv::comms::api::ApiPingResponse iv::comms::api::IApiCommunicationProtocol::ping ( ) const
nodiscardinherited

◆ registerValue()

void iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::registerValue ( const std::shared_ptr< iv::comms::api::ILoggerMessage > & message)
overridevirtual

Registers an API message without blocking the thread.

Parameters
message

Implements iv::comms::api::IApiCommunicationProtocol.

◆ sendValues()

bool iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::sendValues ( )
overridevirtual

Send all registered messages to the API.

Returns

Implements iv::comms::api::IApiCommunicationProtocol.

◆ wipe()

bool iv::comms::api::IApiCommunicationProtocol::wipe ( ) const
nodiscardinherited

Member Data Documentation

◆ m_apiDriver

std::weak_ptr<iv::comms::api::ApiCommunicationDriver> iv::comms::api::IApiCommunicationProtocol::m_apiDriver
protectedinherited

◆ m_appFailuresLoggerManager

std::weak_ptr<iv::diamar::AppFailuresLoggerManager> iv::comms::api::IApiCommunicationProtocol::m_appFailuresLoggerManager
protectedinherited

◆ m_driver

std::shared_ptr<iv::comms::ICommunicationDriver> iv::comms::ICommunicationProtocol::m_driver
protectedinherited

◆ m_heartbeatChannel

std::weak_ptr<iv::channels::AbstractChannel> iv::comms::api::IApiCommunicationProtocol::m_heartbeatChannel
protectedinherited

◆ m_isEnabled

bool iv::comms::api::IApiCommunicationProtocol::m_isEnabled {true}
protectedinherited

◆ m_networkData

std::shared_ptr<iv::model::comms::NetworkData> iv::comms::api::IApiCommunicationProtocol::m_networkData
protectedinherited

◆ m_sendQueue

std::unique_ptr<iv::containers::CircularQueue<std::shared_ptr<iv::comms::api::eventLogger::EventLoggerMessage>, m_sendQueueSize> > iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::m_sendQueue
private

◆ m_sendQueueSize

std::size_t iv::comms::api::eventLogger::ApiEventLoggerCommunicationProtocol::m_sendQueueSize {5000}
staticconstexprprivate

◆ m_sendToCloud

bool iv::comms::api::IApiCommunicationProtocol::m_sendToCloud {false}
protectedinherited

Boolean that determines if the API should send data to the cloud on request.


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