ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
foresthub::platform::NetworkInterface Class Referenceabstract

Abstract interface for network connectivity. More...

#include <network.hpp>

Public Member Functions

virtual std::string Connect (unsigned long timeout_ms=30000)=0
 Activate the network connection.
virtual void Disconnect ()=0
 Disconnect from the network.
virtual NetworkStatus GetStatus () const =0
 Get the current connection status.
virtual std::string GetLocalIp () const =0
 Get the local IP address as string.
virtual int GetSignalStrength () const =0
 Get signal strength in dBm.

Detailed Description

Abstract interface for network connectivity.

Transport-specific configuration (credentials, etc.) belongs in the concrete class constructor via NetworkConfig. This interface only handles activation/deactivation and status.

Member Function Documentation

◆ Connect()

virtual std::string foresthub::platform::NetworkInterface::Connect ( unsigned long timeout_ms = 30000)
pure virtual

Activate the network connection.

Transport-specific parameters (SSID, APN, etc.) are set at construction time.

Parameters
timeout_msMaximum time to wait for connection in milliseconds.
Returns
Error message on failure, empty on success.

◆ GetLocalIp()

virtual std::string foresthub::platform::NetworkInterface::GetLocalIp ( ) const
pure virtual

Get the local IP address as string.

Returns
Dotted-decimal IP address, or empty string on error.

◆ GetSignalStrength()

virtual int foresthub::platform::NetworkInterface::GetSignalStrength ( ) const
pure virtual

Get signal strength in dBm.

Returns
RSSI in dBm, or 0 if not applicable.

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