Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2aaaa03
Updating lora modules.
Nov 25, 2025
345e556
Updating lora modules.
Nov 28, 2025
503a699
Removing OpenNetwork from Connect function.
Dec 2, 2025
999907f
Fixing cpplint.
Dec 2, 2025
6f44392
Fixing Ci/Cd build.
Dec 2, 2025
ab01e1d
Fixing Ci/Cd.
Dec 2, 2025
0a4fa9a
Fixing Ci/Cd.
Dec 2, 2025
39e2c80
Fixing cpp linter.
Dec 2, 2025
7909915
Fixing Ci/Cd.
Dec 3, 2025
c092a15
Fixing Ci/Cd build.
Dec 3, 2025
bbea8ee
Fixing cpp linter issues.
Dec 3, 2025
ce08018
Updating Lora modules.
Dec 3, 2025
b652835
Fixing cpp linter.
Dec 3, 2025
8e08257
Updating DX Smart LR02 module.
Dec 4, 2025
9810b41
Updating Lora modules.
Dec 4, 2025
1e65f54
Updating Lora modules.
Dec 5, 2025
30a44be
Updating Lora modules.
Dec 8, 2025
6ceab4c
Fixing SmallFunction issue.
Dec 8, 2025
574bf96
Merge branch 'main' into 346-update-a-loraadapter-that-contains-a-loa…
Dec 8, 2025
bc763f3
Fixing cpp linter issues.
Dec 8, 2025
ab678a9
Adding gateway Lora device.
Dec 10, 2025
0d37fe2
Merge branch 'main' into 346-update-a-loraadapter-that-contains-a-loa…
Dec 10, 2025
9f68cc6
Fixing build.
Dec 10, 2025
c24467b
Fixing cpp linter issues.
Dec 10, 2025
fb2da3e
Fixing build issue.
Dec 10, 2025
527701a
Adding Gateway lora device.
Dec 11, 2025
a875edd
Merge branch 'main' into 346-update-a-loraadapter-that-contains-a-loa…
Dec 11, 2025
b558f9e
Fixing Lora module access point.
Dec 11, 2025
17faa78
Merge branch 'main' into 346-update-a-loraadapter-that-contains-a-loa…
Dec 11, 2025
7a6f686
Fixing Lora module channel and transport.
Dec 11, 2025
5bdb155
Enabling support gateway.
Dec 11, 2025
1a05600
Updating gateway lora device.
Dec 11, 2025
2530912
Fixing cpp linter issues.
Dec 11, 2025
8487f9a
Updating Lora modules to work with gateway.
Dec 12, 2025
a5017b8
Fixing cpp linter issues.
Dec 15, 2025
f08af17
Updating Lora modules.
Dec 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 13 additions & 24 deletions aether/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ list(APPEND common_dependencies
"../third_party/libsodium"
"../third_party/gcem"
"../third_party/etl"
"../third_party/aethernet-numeric"
)
"../third_party/aethernet-numeric")

# for etl
set(GIT_DIR_LOOKUP_POLICY ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)
Expand All @@ -56,8 +55,7 @@ list(APPEND aether_srcs

list(APPEND aether_c_api_srcs
"aether_c/c_uid.cpp"
"aether_c/aether_capi.cpp"
)
"aether_c/aether_capi.cpp")

list(APPEND types_srcs
"types/address.cpp")
Expand Down Expand Up @@ -85,14 +83,12 @@ list(APPEND obj_srcs
"obj/domain.cpp"
"obj/obj_id.cpp"
"obj/registry.cpp"
"obj/obj_ptr.cpp"
)
"obj/obj_ptr.cpp")

list(APPEND ptr_srcs
"ptr/ptr.cpp"
"ptr/ptr_view.cpp"
"ptr/ref_tree.cpp"
)
"ptr/ref_tree.cpp")

list(APPEND actions_srcs
"ae_actions/get_client_cloud.cpp"
Expand All @@ -106,8 +102,7 @@ list(APPEND actions_srcs
"actions/action_processor.cpp"
"actions/timer_action.cpp"
"actions/task_queue.cpp"
"actions/repeatable_task.cpp"
)
"actions/repeatable_task.cpp")

list(APPEND registration_srcs
"registration/api/client_reg_api_safe.cpp"
Expand All @@ -131,8 +126,7 @@ list(APPEND adapters_srcs
"adapters/modem_adapter.cpp"
"adapters/parent_lora_module.cpp"
"adapters/parent_modem.cpp"
"adapters/parent_wifi.cpp"
)
"adapters/parent_wifi.cpp")

list(APPEND access_points_srcs
"access_points/access_point.cpp"
Expand All @@ -150,15 +144,15 @@ list(APPEND modems_srcs
list(APPEND lora_modules_srcs
"lora_modules/dx_smart_lr02_lm.cpp"
"lora_modules/ebyte_e22_lm.cpp"
"lora_modules/gw_lora_device.cpp"
"lora_modules/lora_module_factory.cpp")

list(APPEND gateway_api_srcs
"gateway_api/gateway_api.cpp")

list(APPEND wifi_srcs
"wifi/wifi_driver_factory.cpp"
"wifi/esp_wifi_driver.cpp"
)
"wifi/esp_wifi_driver.cpp")

list(APPEND serial_ports_srcs
"serial_ports/at_support/at_buffer.cpp"
Expand All @@ -169,8 +163,7 @@ list(APPEND serial_ports_srcs
"serial_ports/serial_port_factory.cpp"
"serial_ports/esp32_serial_port.cpp"
"serial_ports/win_serial_port.cpp"
"serial_ports/unix_serial_port.cpp"
)
"serial_ports/unix_serial_port.cpp")

list(APPEND transport_srcs
"transport/system_sockets/sockets/unix_socket.cpp"
Expand All @@ -189,8 +182,7 @@ list(APPEND transport_srcs
"transport/system_sockets/tcp/tcp.cpp"
"transport/system_sockets/udp/udp.cpp"
"transport/modems/modem_transport.cpp"
"transport/gateway/gateway_transport.cpp"
)
"transport/gateway/gateway_transport.cpp")

list(APPEND stream_api_src
"stream_api/stream_write_action.cpp"
Expand All @@ -206,15 +198,13 @@ list(APPEND stream_api_src
"stream_api/safe_stream/sending_chunk_list.cpp"
"stream_api/safe_stream/receiving_chunk_list.cpp"
"stream_api/safe_stream/safe_stream_send_action.cpp"
"stream_api/safe_stream/safe_stream_recv_action.cpp"
)
"stream_api/safe_stream/safe_stream_recv_action.cpp")

list(APPEND api_protocol_srcs
"api_protocol/protocol_context.cpp"
"api_protocol/api_pack_parser.cpp"
"api_protocol/child_data.cpp"
"api_protocol/return_result_api.cpp"
)
"api_protocol/return_result_api.cpp")

list(APPEND crypto_srcs
"crypto/crypto_nonce.cpp"
Expand All @@ -225,8 +215,7 @@ list(APPEND crypto_srcs
"crypto/sodium/sodium_async_crypto_provider.cpp"
"crypto/sodium/sodium_sync_crypto_provider.cpp"
"crypto/hydrogen/hydro_async_crypto_provider.cpp"
"crypto/hydrogen/hydro_sync_crypto_provider.cpp"
)
"crypto/hydrogen/hydro_sync_crypto_provider.cpp")

list(APPEND work_cloud_api_srcs
"work_cloud_api/work_server_api/login_api.cpp"
Expand Down
43 changes: 28 additions & 15 deletions aether/access_points/lora_module_access_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
*/

#include "aether/access_points/lora_module_access_point.h"
#if AE_SUPPORT_LORA

#if AE_SUPPORT_LORA && AE_SUPPORT_GATEWAY

# include "aether/aether.h"
# include "aether/server.h"
# include "aether/lora_modules/ilora_module_driver.h"

# include "aether/channels/lora_module_channel.h"
# include "aether/access_points/filter_protocols.h"

namespace ae {
LoraModuleConnectAction::LoraModuleConnectAction(
ActionContext action_context, [[maybe_unused]] ILoraModuleDriver& driver)
LoraModuleConnectAction::LoraModuleConnectAction(ActionContext action_context,
[[maybe_unused]] ILoraModuleDriver& driver)
: Action{action_context}, driver_{&driver}, state_{State::kStart} {
AE_TELED_DEBUG("LoraModuleConnectAction created");
}
Expand Down Expand Up @@ -67,6 +69,13 @@ void LoraModuleConnectAction::Start() {
});
}

LoraModuleAccessPoint::JoinAction::JoinAction(ActionContext action_context)
: Action{action_context} {}

UpdateStatus LoraModuleAccessPoint::JoinAction::Update() {
return UpdateStatus::Result();
}

LoraModuleAccessPoint::LoraModuleAccessPoint(
ObjPtr<Aether> aether, LoraModuleAdapter::ptr lora_module_adapter,
Domain* domain)
Expand All @@ -91,21 +100,25 @@ ILoraModuleDriver& LoraModuleAccessPoint::lora_module_driver() {
return lora_module_adapter_->lora_module_driver();
}

ActionPtr<LoraModuleAccessPoint::JoinAction> LoraModuleAccessPoint::Join() {
return ActionPtr<JoinAction>{*aether_};
}

std::vector<ObjPtr<Channel>> LoraModuleAccessPoint::GenerateChannels(
std::vector<Endpoint> const& endpoints) {
ObjPtr<Server> const& server) {
AE_TELED_DEBUG("Generate lora module channels");
std::vector<ObjPtr<Channel>> channels;
channels.reserve(endpoints.size());
Aether::ptr aether = aether_;
LoraModuleAccessPoint::ptr self = MakePtrFromThis(this);
for (auto const& endpoint : endpoints) {
if (!FilterProtocol<Protocol::kTcp, Protocol::kUdp>(endpoint)) {
continue;
}
channels.emplace_back(
domain_->CreateObj<LoraModuleChannel>(aether, self, endpoint));
auto self_ptr = MakePtrFromThis(this);
return {domain_->CreateObj<LoraModuleChannel>(self_ptr, server)};
}

Aether::ptr const& LoraModuleAccessPoint::aether() const { return aether_; }

GwLoraDevice& LoraModuleAccessPoint::gw_lora_device() {
if (!gw_lora_device_) {
gw_lora_device_ = std::make_unique<GwLoraDevice>(
*aether_);
}
return channels;
return *gw_lora_device_;
}

} // namespace ae
Expand Down
28 changes: 19 additions & 9 deletions aether/access_points/lora_module_access_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@

#include "aether/config.h"

#if AE_SUPPORT_LORA
#if AE_SUPPORT_LORA && AE_SUPPORT_GATEWAY

# include "aether/obj/obj.h"
# include "aether/actions/action.h"
# include "aether/actions/action_ptr.h"
# include "aether/types/state_machine.h"
# include "aether/lora_modules/ilora_module_driver.h"
# include "aether/adapters/lora_module_adapter.h"
# include "aether/events/event_subscription.h"
# include "aether/access_points/access_point.h"
# include "aether/lora_modules/gw_lora_device.h"

namespace ae {
class Aether;
Expand All @@ -40,8 +39,7 @@ class LoraModuleConnectAction final : public Action<LoraModuleConnectAction> {
kFailed,
};

LoraModuleConnectAction(ActionContext action_context,
ILoraModuleDriver& driver);
LoraModuleConnectAction(ActionContext action_context, ILoraModuleDriver& driver);

UpdateStatus Update();

Expand All @@ -58,23 +56,35 @@ class LoraModuleAccessPoint final : public AccessPoint {
LoraModuleAccessPoint() = default;

public:
class JoinAction : public Action<JoinAction> {
public:
explicit JoinAction(ActionContext action_context);
UpdateStatus Update();
};

LoraModuleAccessPoint(ObjPtr<Aether> aether,
LoraModuleAdapter::ptr lora_module_adapter,
Domain* domain);

AE_OBJECT_REFLECT(AE_MMBRS(aether_, lora_module_adapter_));
AE_OBJECT_REFLECT(AE_MMBRS(lora_module_adapter_));

ActionPtr<LoraModuleConnectAction> Connect();
ILoraModuleDriver& lora_module_driver();

ActionPtr<JoinAction> Join();

std::vector<ObjPtr<Channel>> GenerateChannels(
std::vector<Endpoint> const& endpoints) override;
Server::ptr const& server) override;

Aether::ptr const& aether() const;
GwLoraDevice& gw_lora_device();

private:
Obj::ptr aether_;
Aether::ptr aether_;
LoraModuleAdapter::ptr lora_module_adapter_;
ActionPtr<LoraModuleConnectAction> connect_action_;
Subscription connect_sub_;
std::unique_ptr<GwLoraDevice> gw_lora_device_;
};
} // namespace ae
#endif
Expand Down
3 changes: 2 additions & 1 deletion aether/adapters/lora_module_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
*/

#include "aether/adapters/lora_module_adapter.h"
#if AE_SUPPORT_LORA

#if AE_SUPPORT_LORA && AE_SUPPORT_GATEWAY

# include "aether/aether.h"
# include "aether/lora_modules/lora_module_factory.h"
Expand Down
10 changes: 4 additions & 6 deletions aether/adapters/lora_module_adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@
#ifndef AETHER_ADAPTERS_LORA_MODULE_ADAPTER_H_
#define AETHER_ADAPTERS_LORA_MODULE_ADAPTER_H_

#include "aether/config.h"
#include <cstdint>

#if AE_SUPPORT_LORA
# include <cstdint>
#include "aether/config.h"

#if AE_SUPPORT_LORA && AE_SUPPORT_GATEWAY
# include "aether/events/events.h"

# include "aether/lora_modules/ilora_module_driver.h"
# include "aether/adapters/parent_lora_module.h"
# include "aether/access_points/access_point.h"

# define LORA_MODULE_TCP_TRANSPORT_ENABLED 1

namespace ae {
class LoraModuleAdapter : public ParentLoraModuleAdapter {
class LoraModuleAdapter final : public ParentLoraModuleAdapter {
AE_OBJECT(LoraModuleAdapter, ParentLoraModuleAdapter, 0)

LoraModuleAdapter() = default;
Expand Down
4 changes: 3 additions & 1 deletion aether/adapters/parent_lora_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

#include "aether/config.h"

#if AE_SUPPORT_LORA
#if AE_SUPPORT_LORA && AE_SUPPORT_GATEWAY

# include "aether/aether.h"
# include "aether/adapters/adapter.h"
# include "aether/lora_modules/lora_module_driver_types.h"
Expand Down Expand Up @@ -47,5 +48,6 @@ class ParentLoraModuleAdapter : public Adapter {
LoraModuleInit lora_module_init_;
};
} // namespace ae

#endif
#endif // AETHER_ADAPTERS_PARENT_LORA_MODULE_H_
Loading
Loading