ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
network.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (c) 2026 ForestHub. All rights reserved.
3// For commercial licensing, visit https://github.com/ForestHubAI/fh-sdk
4
5#ifndef FORESTHUB_PLATFORM_NETWORK_HPP
6#define FORESTHUB_PLATFORM_NETWORK_HPP
7
10
11#include <cstdint>
12#include <string>
13
14namespace foresthub {
15namespace platform {
16
24
31 const char* ssid = nullptr;
32 const char* password = nullptr;
33};
34
41public:
42 virtual ~NetworkInterface() = default;
43
48 virtual std::string Connect(unsigned long timeout_ms = 30000) = 0;
49
51 virtual void Disconnect() = 0;
52
54 virtual NetworkStatus GetStatus() const = 0;
55
58 virtual std::string GetLocalIp() const = 0;
59
62 virtual int GetSignalStrength() const = 0;
63};
64
65} // namespace platform
66} // namespace foresthub
67
68#endif // FORESTHUB_PLATFORM_NETWORK_HPP
Abstract interface for network connectivity.
Definition network.hpp:40
virtual std::string Connect(unsigned long timeout_ms=30000)=0
Activate the network connection.
virtual NetworkStatus GetStatus() const =0
Get the current connection status.
virtual int GetSignalStrength() const =0
Get signal strength in dBm.
virtual std::string GetLocalIp() const =0
Get the local IP address as string.
virtual void Disconnect()=0
Disconnect from the network.
Hardware abstraction layer: network, console, time, crypto, and GPIO interfaces.
NetworkStatus
Connection state of the network subsystem.
Definition network.hpp:18
@ kConnected
Successfully connected and ready.
Definition network.hpp:21
@ kFailed
Connection attempt failed.
Definition network.hpp:22
@ kConnecting
Connection attempt in progress.
Definition network.hpp:20
@ kDisconnected
Not connected (clean state or after Disconnect()).
Definition network.hpp:19
Top-level namespace for the ForestHub SDK.
Construction-time configuration for the network subsystem.
Definition network.hpp:30
const char * password
Network password (nullptr for open networks).
Definition network.hpp:32
const char * ssid
Network identifier (nullptr to skip setup).
Definition network.hpp:31