Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Sep 21, 2021
1 parent c9dce80 commit e188bb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/app/util/basic-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@

#include <stdint.h>

// Pull in NodeId
#include <lib/core/NodeId.h>
// Pull in GroupId
#include <lib/core/GroupId.h>
#include <lib/core/NodeId.h>

// Pull in VendorId
#include <lib/core/CHIPVendorIdentifiers.hpp>
Expand Down
12 changes: 9 additions & 3 deletions src/lib/core/GroupId.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

namespace chip {

// TODO: Consider making this a class and the various utility methods static
// methods.
using GroupId = uint16_t;

constexpr GroupId kUndefinedGroupId = 0;
Expand All @@ -33,9 +31,17 @@ constexpr GroupId kMaxUniversalGroupId = 0xFFFF;
constexpr GroupId kMinFabricGroupId = 0x0001;
constexpr GroupId kMaxFabricGroupId = 0x7FFF;

constexpr GroupId kAllNodes = 0xFFFF;
constexpr GroupId kAllNonSleepy = 0xFFFE;
constexpr GroupId kAllProxies = 0xFFFD;

constexpr GroupId kMinUniversalGroupIdReserved = 0x8000;
constexpr GroupId kMaxUniversalGroupIdReserved = 0xFFFC;

constexpr bool IsOperationalGroupId(GroupId aGroupId)
{
return (aGroupId != kUndefinedGroupId);
return (aGroupId != kUndefinedGroupId) &&
((aGroupId < kMinUniversalGroupIdReserved) || (aGroupId > kMaxUniversalGroupIdReserved));
}

constexpr bool IsFabricGroupId(GroupId aGroupId)
Expand Down

0 comments on commit e188bb3

Please sign in to comment.