JaiaBot 3.0.0
JaiaBot micro-AUV software
Loading...
Searching...
No Matches
jaiabot::ip Namespace Reference

Namespaces

namespace  detail

Classes

struct  HostCode

Enumerations

enum class  NodeType {
  bot , hub , desktop , gateway ,
  rpicam
}
enum class  Network {
  wlan , fleet_vpn , vfleet_vpn , cloudhub_vpn ,
  cloudhub_eth , vfleet_eth , vfleet_wlan , vpc
}
enum class  IPVersion { ipv4 , ipv6 }

Functions

std::string node_type_to_string (NodeType node)
NodeType node_type_from_string (const std::string &s)
std::string network_to_string (Network net)
Network network_from_string (const std::string &s)
std::pair< int, int > node_id_range (NodeType node)
void validate_fleet_id (int fleet_id)
void validate_node_id (NodeType node, int node_id)
bool is_ipv4_fleet (int fleet_id)
IPVersion ip_version (int fleet_id, Network net)
std::string ipv4_addr (int fleet_id, Network net, NodeType node, int node_id)
std::string ipv4_net (int fleet_id, Network net)
std::string ipv6_addr (int fleet_id, Network net, NodeType node, int node_id, const std::string &ipv6_base_str="")
std::string ipv6_net (int fleet_id, Network net, const std::string &ipv6_base_str="")
std::string addr (int fleet_id, Network net, NodeType node, int node_id)
HostCode parse_host_code (const std::string &host_code, int default_fleet_id=-1)
std::string host_code_addr (const HostCode &host, IPVersion version)
std::string host_code_addr (const HostCode &host)
std::string host_code_to_addr (const std::string &host_code, HostCode *parsed=nullptr)

Variables

constexpr int bot_id_min = 0
constexpr int bot_id_max = 150
constexpr int hub_id_min = 0
constexpr int hub_id_max = 30
constexpr int desktop_id_min = 1
constexpr int desktop_id_max = 9
constexpr int gateway_id_min = 0
constexpr int gateway_id_max = 0
constexpr int rpicam_id_min = 0
constexpr int rpicam_id_max = 49
constexpr int fleet_id_min = 0
constexpr int fleet_id_max = 4000
constexpr int fleet_id_ipv4_max = 250
constexpr int vfleet_wlan_ipv4_octet = 253
constexpr int cloudhub_id = 30
constexpr int iridium_id = 25
constexpr const char * host_code_format_msg

Enumeration Type Documentation

◆ IPVersion

enum class jaiabot::ip::IPVersion
strong
Enumerator
ipv4 
ipv6 

Definition at line 67 of file ip.h.

◆ Network

enum class jaiabot::ip::Network
strong
Enumerator
wlan 
fleet_vpn 
vfleet_vpn 
cloudhub_vpn 
cloudhub_eth 
vfleet_eth 
vfleet_wlan 
vpc 

Definition at line 54 of file ip.h.

◆ NodeType

enum class jaiabot::ip::NodeType
strong
Enumerator
bot 
hub 
desktop 
gateway 
rpicam 

Definition at line 44 of file ip.h.

Function Documentation

◆ addr()

std::string jaiabot::ip::addr ( int fleet_id,
Network net,
NodeType node,
int node_id )
inline

Definition at line 531 of file ip.h.

◆ host_code_addr() [1/2]

std::string jaiabot::ip::host_code_addr ( const HostCode & host)
inline

Definition at line 674 of file ip.h.

◆ host_code_addr() [2/2]

std::string jaiabot::ip::host_code_addr ( const HostCode & host,
IPVersion version )
inline

Definition at line 661 of file ip.h.

◆ host_code_to_addr()

std::string jaiabot::ip::host_code_to_addr ( const std::string & host_code,
HostCode * parsed = nullptr )
inline

Definition at line 683 of file ip.h.

◆ ip_version()

IPVersion jaiabot::ip::ip_version ( int fleet_id,
Network net )
inline

Definition at line 213 of file ip.h.

◆ ipv4_addr()

std::string jaiabot::ip::ipv4_addr ( int fleet_id,
Network net,
NodeType node,
int node_id )
inline

Definition at line 490 of file ip.h.

◆ ipv4_net()

std::string jaiabot::ip::ipv4_net ( int fleet_id,
Network net )
inline

Definition at line 501 of file ip.h.

◆ ipv6_addr()

std::string jaiabot::ip::ipv6_addr ( int fleet_id,
Network net,
NodeType node,
int node_id,
const std::string & ipv6_base_str = "" )
inline

Definition at line 511 of file ip.h.

◆ ipv6_net()

std::string jaiabot::ip::ipv6_net ( int fleet_id,
Network net,
const std::string & ipv6_base_str = "" )
inline

Definition at line 523 of file ip.h.

◆ is_ipv4_fleet()

bool jaiabot::ip::is_ipv4_fleet ( int fleet_id)
inline

Definition at line 204 of file ip.h.

◆ network_from_string()

Network jaiabot::ip::network_from_string ( const std::string & s)
inline

Definition at line 150 of file ip.h.

◆ network_to_string()

std::string jaiabot::ip::network_to_string ( Network net)
inline

Definition at line 134 of file ip.h.

◆ node_id_range()

std::pair< int, int > jaiabot::ip::node_id_range ( NodeType node)
inline

Definition at line 172 of file ip.h.

◆ node_type_from_string()

NodeType jaiabot::ip::node_type_from_string ( const std::string & s)
inline

Definition at line 119 of file ip.h.

◆ node_type_to_string()

std::string jaiabot::ip::node_type_to_string ( NodeType node)
inline

Definition at line 106 of file ip.h.

◆ parse_host_code()

HostCode jaiabot::ip::parse_host_code ( const std::string & host_code,
int default_fleet_id = -1 )
inline

Definition at line 559 of file ip.h.

◆ validate_fleet_id()

void jaiabot::ip::validate_fleet_id ( int fleet_id)
inline

Definition at line 185 of file ip.h.

◆ validate_node_id()

void jaiabot::ip::validate_node_id ( NodeType node,
int node_id )
inline

Definition at line 193 of file ip.h.

Variable Documentation

◆ bot_id_max

int jaiabot::ip::bot_id_max = 150

Definition at line 74 of file ip.h.

◆ bot_id_min

int jaiabot::ip::bot_id_min = 0
constexpr

Definition at line 74 of file ip.h.

◆ cloudhub_id

int jaiabot::ip::cloudhub_id = 30
constexpr

Definition at line 96 of file ip.h.

◆ desktop_id_max

int jaiabot::ip::desktop_id_max = 9

Definition at line 76 of file ip.h.

◆ desktop_id_min

int jaiabot::ip::desktop_id_min = 1
constexpr

Definition at line 76 of file ip.h.

◆ fleet_id_ipv4_max

int jaiabot::ip::fleet_id_ipv4_max = 250
constexpr

Definition at line 84 of file ip.h.

◆ fleet_id_max

int jaiabot::ip::fleet_id_max = 4000

Definition at line 79 of file ip.h.

◆ fleet_id_min

int jaiabot::ip::fleet_id_min = 0
constexpr

Definition at line 79 of file ip.h.

◆ gateway_id_max

int jaiabot::ip::gateway_id_max = 0

Definition at line 77 of file ip.h.

◆ gateway_id_min

int jaiabot::ip::gateway_id_min = 0
constexpr

Definition at line 77 of file ip.h.

◆ host_code_format_msg

const char* jaiabot::ip::host_code_format_msg
constexpr
Initial value:
=
"It must be b<bot_id>[svc]f<fleet_id> or h<hub_id>[svc]f<fleet_id> or chf<fleet_id> "
"(for cloudhub)"

Definition at line 539 of file ip.h.

◆ hub_id_max

int jaiabot::ip::hub_id_max = 30

Definition at line 75 of file ip.h.

◆ hub_id_min

int jaiabot::ip::hub_id_min = 0
constexpr

Definition at line 75 of file ip.h.

◆ iridium_id

int jaiabot::ip::iridium_id = 25
constexpr

Definition at line 102 of file ip.h.

◆ rpicam_id_max

int jaiabot::ip::rpicam_id_max = 49

Definition at line 78 of file ip.h.

◆ rpicam_id_min

int jaiabot::ip::rpicam_id_min = 0
constexpr

Definition at line 78 of file ip.h.

◆ vfleet_wlan_ipv4_octet

int jaiabot::ip::vfleet_wlan_ipv4_octet = 253
constexpr

Definition at line 91 of file ip.h.