NetworkInfo-IPInfo

Overview | API | NetworkInfo | NetworkInfo-IPInfo


#include <alproxies/networkinfo.h>

A simple object for retrieving the IP addressing information.

std::string NetworkInfo::IPInfo::method()

Describes how the robot will get his addressing information, possible values are:

  • “dhcp” The service will request is addressing information from a dhcp server, if no server is available the Local-link method is used.
  • “manual” The service use the static parameter provided by the user.
Returns:The addressing method
std::string NetworkInfo::IPInfo::ipAddress()

If this service is connected this method returns the current address else it returns the manually configured address.

Returns:the network IP address
std::string NetworkInfo::IPInfo::netmask()

IPv4 only for IPv6 use the prefix() method.

If this service is connected this method returns the current netmask else it returns the manually configured netmask.

Returns:the network netmask
int NetworkInfo::IPInfo::prefix()

Experimental IPv6 only This values is only used for IPv6 for IPv4 use the netmask() method.

If this service is connected this method returns the current prefix else it returns the manually configured prefix.

std::string NetworkInfo::IPInfo::gateway()

If this service is connected this method returns the current gateway else it returns the manually configured gateway.

Returns:the network gateway
AL::ALValue NetworkInfo::IPInfo::toALValue()

Return an ALValue containing the IPInfo structure ALValue IPInfo.

Returns:the NetworkInfo::IPInfo as ALValue

ALValue IPInfo

The ALValue IPInfo is an array of n-pair (key, value).

To exchange this object with other module the IPInfo is contained in an ALValue with the following structure.

key value type
“Method” string
“Address” string
“Netmask” string
“Prefix” int
“Gateway” string

The empties values will not be present.