Skip to content

Commit

Permalink
[telemetry] remove uploading epskc_state and border_agent_state
Browse files Browse the repository at this point in the history
  • Loading branch information
sunytt committed Aug 28, 2024
1 parent 9ec7d63 commit 1f3e9b8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
15 changes: 1 addition & 14 deletions src/proto/thread_telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,6 @@ message TelemetryData {
optional bool has_others_route_added = 3;
}

enum BorderAgentState {
BORDER_AGENT_STATE_UNSPECIFIED = 0;
BORDER_AGENT_STATE_STOPPED = 1;
BORDER_AGENT_STATE_STARTED = 2;
BORDER_AGENT_STATE_ACTIVE = 3;
}

message BorderAgentCounters {
// The number of ePSKc activations
optional uint32 epskc_activations = 1;
Expand Down Expand Up @@ -571,14 +564,8 @@ message TelemetryData {
}

message BorderAgentInfo {
// The border agent state
optional BorderAgentState border_agent_state = 1;

// The ePSKc active state
optional bool epskc_is_active = 2;

// The border agent counters
optional BorderAgentCounters border_agent_counters = 3;
optional BorderAgentCounters border_agent_counters = 1;
}

message WpanBorderRouter {
Expand Down
21 changes: 0 additions & 21 deletions src/utils/thread_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,24 +225,6 @@ void CopyMdnsResponseCounters(const MdnsResponseCounters &from, threadnetwork::T
to->set_aborted_count(from.mAborted);
to->set_invalid_state_count(from.mInvalidState);
}

#if OTBR_ENABLE_BORDER_AGENT
threadnetwork::TelemetryData_BorderAgentState BorderAgentStateFromOtBorderAgentState(
otBorderAgentState aBorderAgentState)
{
switch (aBorderAgentState)
{
case OT_BORDER_AGENT_STATE_STOPPED:
return threadnetwork::TelemetryData::BORDER_AGENT_STATE_STOPPED;
case OT_BORDER_AGENT_STATE_STARTED:
return threadnetwork::TelemetryData::BORDER_AGENT_STATE_STARTED;
case OT_BORDER_AGENT_STATE_ACTIVE:
return threadnetwork::TelemetryData::BORDER_AGENT_STATE_ACTIVE;
default:
return threadnetwork::TelemetryData::BORDER_AGENT_STATE_UNSPECIFIED;
}
}
#endif // OTBR_ENABLE_BORDER_AGENT
#endif // OTBR_ENABLE_TELEMETRY_DATA_API
} // namespace

Expand Down Expand Up @@ -1084,9 +1066,6 @@ void ThreadHelper::RetrieveBorderAgentInfo(threadnetwork::TelemetryData::BorderA
auto baCounters = aBorderAgentInfo->mutable_border_agent_counters();
auto otBorderAgentCounters = *otBorderAgentGetCounters(mInstance);

aBorderAgentInfo->set_border_agent_state(BorderAgentStateFromOtBorderAgentState(otBorderAgentGetState(mInstance)));
aBorderAgentInfo->set_epskc_is_active(otBorderAgentIsEphemeralKeyActive(mInstance));

baCounters->set_epskc_activations(otBorderAgentCounters.mEpskcActivations);
baCounters->set_epskc_deactivation_clears(otBorderAgentCounters.mEpskcDeactivationClears);
baCounters->set_epskc_deactivation_timeouts(otBorderAgentCounters.mEpskcDeactivationTimeouts);
Expand Down
2 changes: 0 additions & 2 deletions tests/dbus/test_dbus_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ void CheckEphemeralKey(ThreadApiDBus *aApi)

void CheckBorderAgentInfo(const threadnetwork::TelemetryData_BorderAgentInfo &aBorderAgentInfo)
{
TEST_ASSERT(aBorderAgentInfo.border_agent_state() == threadnetwork::TelemetryData::BORDER_AGENT_STATE_STARTED);
TEST_ASSERT(aBorderAgentInfo.epskc_is_active() == false);
TEST_ASSERT(aBorderAgentInfo.border_agent_counters().epskc_activations() == 0);
TEST_ASSERT(aBorderAgentInfo.border_agent_counters().epskc_deactivation_clears() == 0);
TEST_ASSERT(aBorderAgentInfo.border_agent_counters().epskc_deactivation_timeouts() == 0);
Expand Down

0 comments on commit 1f3e9b8

Please sign in to comment.