Skip to content

Commit

Permalink
https://telecominfraproject.atlassian.net/browse/WIFI-12692
Browse files Browse the repository at this point in the history
Signed-off-by: stephb9959 <[email protected]>
  • Loading branch information
stephb9959 committed Oct 26, 2023
1 parent 06766d2 commit d7bad29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/AP_WS_Connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ namespace OpenWifi {
} break;

case uCentralProtocol::Events::ET_EVENT: {
ParamsObj->stringify(std::cout);
Process_event(ParamsObj);
} break;

Expand Down
10 changes: 8 additions & 2 deletions src/AP_WS_Process_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ namespace OpenWifi {
FullEvent.set("type", EventType);
FullEvent.set("timestamp", EventTimeStamp);
FullEvent.set("payload", EventPayload);
KafkaManager()->PostMessage(KafkaTopics::DEVICE_EVENT_QUEUE, SerialNumber_,
FullEvent);
if(strncmp(EventType.c_str(),"rrm.",4) == 0 ) {
std::cout << "Publishing " << EventType << " to RRM" << std::endl;
KafkaManager()->PostMessage(KafkaTopics::RRM, SerialNumber_,
FullEvent);
} else {
KafkaManager()->PostMessage(KafkaTopics::DEVICE_EVENT_QUEUE, SerialNumber_,
FullEvent);
}
}
}
} catch (const Poco::Exception &E) {
Expand Down
1 change: 1 addition & 0 deletions src/framework/KafkaTopics.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace OpenWifi::KafkaTopics {
inline const char * DEVICE_EVENT_QUEUE = "device_event_queue";
inline const char * DEVICE_TELEMETRY = "device_telemetry";
inline const char * PROVISIONING_CHANGE = "provisioning_change";
inline const char * RRM = "rrm";

namespace ServiceEvents {
inline const char * EVENT_JOIN = "join";
Expand Down

0 comments on commit d7bad29

Please sign in to comment.