CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::RequestGatewayConnection Struct Reference

Client/executor-side record of one gateway it connects to. More...

#include <RequestClient.h>

Collaboration diagram for cmlabs::RequestGatewayConnection:
[legend]

Public Member Functions

void clear ()
 Reset to the unconfigured/disconnected state.

Public Attributes

uint32 id
 Gateway id (configuration key).
uint64 lastConTime
 Last successful connect time (ms epoch).
uint64 lastFailTime
 Last failed connect time (ms epoch; drives retry backoff).
std::string addr
 Gateway host name or IP.
uint16 port
 Gateway port.
uint64 conID
 NetworkManager connection id (0 when disconnected).
uint64 location
 Resolved endpoint packed as uint64.
uint8 encryption
 NOENC or SSLENC for this link.

Detailed Description

Client/executor-side record of one gateway it connects to.

A RequestClient or RequestExecutor can be configured with several gateways (addGateway()) for redundancy; each gets one of these records holding the address and current connection state.

Definition at line 329 of file RequestClient.h.

Member Function Documentation

◆ clear()

void cmlabs::RequestGatewayConnection::clear ( )
inline

Reset to the unconfigured/disconnected state.

Definition at line 339 of file RequestClient.h.

References addr, conID, encryption, lastConTime, lastFailTime, location, NOENC, and port.

Referenced by cmlabs::RequestClient::addGateway(), and cmlabs::RequestExecutor::addGateway().

Member Data Documentation

◆ addr

std::string cmlabs::RequestGatewayConnection::addr

◆ conID

uint64 cmlabs::RequestGatewayConnection::conID

◆ encryption

uint8 cmlabs::RequestGatewayConnection::encryption

NOENC or SSLENC for this link.

Definition at line 337 of file RequestClient.h.

Referenced by cmlabs::RequestClient::addGateway(), cmlabs::RequestExecutor::addGateway(), and clear().

◆ id

uint32 cmlabs::RequestGatewayConnection::id

◆ lastConTime

uint64 cmlabs::RequestGatewayConnection::lastConTime

Last successful connect time (ms epoch).

Definition at line 331 of file RequestClient.h.

Referenced by clear(), and cmlabs::RequestClient::sendMessageToGateway().

◆ lastFailTime

uint64 cmlabs::RequestGatewayConnection::lastFailTime

Last failed connect time (ms epoch; drives retry backoff).

Definition at line 332 of file RequestClient.h.

Referenced by clear(), cmlabs::RequestClient::sendMessageToGateway(), and cmlabs::RequestExecutor::sendMessageToGateway().

◆ location

uint64 cmlabs::RequestGatewayConnection::location

Resolved endpoint packed as uint64.

Definition at line 336 of file RequestClient.h.

Referenced by cmlabs::RequestClient::addGateway(), cmlabs::RequestExecutor::addGateway(), and clear().

◆ port


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