blob: 08103ed740519f0e1d8dca9165c01db241323039 [file] [log] [blame]
Brian Silverman431500a2013-10-28 19:50:15 -07001#ifndef AOS_COMMON_NETWORK_TEAM_NUMBER_H_
2#define AOS_COMMON_NETWORK_TEAM_NUMBER_H_
3
4#include <stdint.h>
5
6namespace aos {
7namespace network {
8
9// Retrieves the current team number based off of the network address.
10// This function will only do the complicated stuff once so it is cheap to call
11// repeatedly.
12uint16_t GetTeamNumber();
13
Brian Silvermande0a53a2014-02-10 22:27:44 -080014// Overrides the team number returned from GetTeamNumber(). Must be called
15// before GetTeamNumber() is ever called.
16// Overriding to team 0 won't work.
17// Intended only for tests.
18void OverrideTeamNumber(uint16_t team);
19
Brian Silverman431500a2013-10-28 19:50:15 -070020} // namespace network
21} // namespace aos
22
23#endif // AOS_COMMON_NETWORK_TEAM_NUMBER_H_