Skip to content

Commit 3726e3b

Browse files
committed
Network: Add networkUserBits and networkUserCount
1 parent b9daf8c commit 3726e3b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Firmware/RTK_Everywhere/Network.ino

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,6 +2461,26 @@ void networkUserAdd(NETCONSUMER_t consumer,
24612461
networkConsumerIndexLast[consumer] = index;
24622462
}
24632463

2464+
//----------------------------------------
2465+
// Get the network user bit mask
2466+
//----------------------------------------
2467+
NETCONSUMER_MASK_t networkUserBits(NetIndex_t index)
2468+
{
2469+
// Validate the index
2470+
networkValidateIndex(index);
2471+
2472+
// Return the consumer bits
2473+
return netIfUsers[index];
2474+
}
2475+
2476+
//----------------------------------------
2477+
// Count the number of network users
2478+
//----------------------------------------
2479+
int networkUserCount(NetIndex_t index)
2480+
{
2481+
return networkConsumerCountBits(networkUserBits(index));
2482+
}
2483+
24642484
//----------------------------------------
24652485
// Display the network interface users
24662486
//----------------------------------------

0 commit comments

Comments
 (0)