Namespace for the device scanning interface. More...
Namespaces | |
test | |
Classes | |
class | ConfigureClient |
this class sends HBM scan network configuration requests, and waits for the response. More... | |
class | DeviceMonitor |
this class is being used for processing received announcements It notifies new, changed and expired announcements. More... | |
class | Receiver |
The main class for HBM Scan Clients. It receives announcements interprets them and notifies about new, changed and expired announcements. More... | |
struct | cb_t |
A container/namespace for error codes passed with the error-callback. More... | |
interface | ReceiverIf |
The interface to use by HBM Scan Clients. More... | |
Typedefs | |
typedef std::function< void(const std::string uuid, const std::string &receivingInterfaceName, const std::string &sendingInterfaceAddress, const std::string &announcement) > | announceCb_t |
Typedef for the user provided callback function which is called once a new device is discovered. More... | |
typedef std::function< void(const std::string uuid, const std::string &receivingInterfaceName, const std::string &sendingInterfaceAddress) > | expireCb_t |
Typedef for the user provided callback function which is called once a previously discovered device disappears. More... | |
typedef std::function< void(uint64_t errorcode, const std::string &userMessage, const std::string &receivedData) > | errorCb_t |
Typedef for the user provided callback function which is called on any incorrect data received via the network. More... | |
Variables | |
const unsigned int | ANNOUNCE_UDP_PORT = 31416 |
announcements will be send to this port More... | |
const unsigned int | CONFIG_UDP_PORT = 31417 |
configuration requests and responses go to this port More... | |
const char | ANNOUNCE_IPV4_ADDRESS [] = "239.255.77.76" |
announcements will be send to this group More... | |
const char | CONFIG_IPV4_ADDRESS [] = "239.255.77.77" |
configuration requests and responses go to this group More... | |
static const unsigned int | ANNOUNCE_PERIOD_MS = 5000 |
static const char | TAG_Announce [] = "announce" |
static const char | TAG_Configure [] = "configure" |
static const char | TAG_Services [] = "services" |
static const char | TAG_Expiration [] = "expiration" |
static const char | TAG_NetSettings [] = "netSettings" |
static const char | TAG_Interface [] = "interface" |
static const char | TAG_Name [] = "name" |
static const char | TAG_Description [] = "description" |
static const char | TAG_HardwareId [] = "hardwareId" |
static const char | TAG_Type [] = "type" |
static const char | TAG_Label [] = "label" |
static const char | TAG_FamilyType [] = "familyType" |
static const char | CONFIGURATION_METHOD [] = "configurationMethod" |
static const char | SRV [] = "services" |
static const char | SRV_HBM_PROTOCOL [] = "hbmProtocol" |
static const char | SRV_STREAM_DATA [] = "daqStream" |
static const char | SRV_HTTP [] = "http" |
static const char | SRV_SSH [] = "ssh" |
static const char | SRV_JETD [] = "jetd" |
static const char | SRV_JETWS [] = "jetws" |
static const char | NET_PATH [] = "net" |
static const char | INTERFACES [] = "interfaces" |
static const char | RESULTS [] = "results" |
static const char | REACHABLEDEVICES_PATH [] = "reachableDevices" |
static const char | ROUTEDDEVICES_PATH [] = "routedDevices" |
static const char | TAG_eth [] = "eth" |
static const char | TAG_manualAddress [] = "manualAddress" |
static const char | TAG_manualNetmask [] = "manualNetmask" |
static const char | TAG_Port [] = "port" |
static const char | TAG_ipV4 [] = "ipv4" |
static const char | TAG_ipV6 [] = "ipv6" |
static const char | TAG_address [] = "address" |
static const char | TAG_netMask [] = "netmask" |
static const char | TAG_ipV4Address [] = "ipv4Address" |
static const char | TAG_ipV6Address [] = "ipv6Address" |
static const char | TAG_prefix [] = "prefix" |
static const char | TAG_DefaultGateway [] = "defaultGateway" |
static const char | PrepareDefaultGatewayMethod [] = "prepareDefaultGateway" |
static const char | TAG_Device [] = "device" |
static const char | TAG_IsRouter [] = "isRouter" |
static const char | TAG_Router [] = "router" |
static const char | TAG_Uuid [] = "uuid" |
static const char | TAG_Ttl [] = "ttl" |
static const char | TAG_FirmwareVersion [] = "firmwareVersion" |
static const char | CONFIG_METHOD_MANUAL [] = "manual" |
configure("interface"."configuration_method"="manual") More... | |
static const char | CONFIG_METHOD_DHCP [] = "dhcp" |
configure("interface"."configuration_method"="dhcp") More... | |
static const char | CONFIG [] = "config" |
static const char | PREPARE [] = "prepare" |
Namespace for the device scanning interface.
All identifiers in this project are using this namespace.
Typedef for the user provided callback function which is called once a new device is discovered.
This user-provided callback is called whenever a new device is detected on the network. When the callback is called, it is ensured that the announcement message is valid and contains all mandatory information (in other cases, the error callback is called).
uuid | the device's unique id, as transmitted in the network message |
receivingInterfaceName | the name of the host's network adapter receiving the announcement network message, on Linux for example: eth0 |
sendingInterfaceAddress | |
announcement | the received network message, as a string |
Typedef for the user provided callback function which is called on any incorrect data received via the network.
Any packet receiving on the network passes multiple parsing and interpretation steps. This callback function serves as the reporting interface for all the "internal" processing.
Making use if this callback is basically for debugging purpose. The registration is optional.
When the application receives the error callback it does not necessarily mean, that the same message is not sent via the announce callback as well. See hbm::devscan::cb_t::DATA_DROPPED.
errorcode | a bit-coded error code, synthesized from constants in hbm::devscan::cb_t |
userMessage | a (english) human readable message describing the cause of the error |
receivedData | the message as it was received from the network |
Typedef for the user provided callback function which is called once a previously discovered device disappears.
This user-provided callback is called whenever no announcement messages are received from a certain device on the network for period defined in the last device's announcement message.
uuid | the device's unique id, transmitted in the network message |
receivingInterfaceName | The name of the host's network adapter receiving the announcement network message, on Linux for example: eth0 |
sendingInterfaceAddress |
const char hbm::devscan::ANNOUNCE_IPV4_ADDRESS[] = "239.255.77.76" |
announcements will be send to this group
|
static |
const unsigned int hbm::devscan::ANNOUNCE_UDP_PORT = 31416 |
announcements will be send to this port
|
static |
const char hbm::devscan::CONFIG_IPV4_ADDRESS[] = "239.255.77.77" |
configuration requests and responses go to this group
|
static |
configure("interface"."configuration_method"="dhcp")
|
static |
configure("interface"."configuration_method"="manual")
const unsigned int hbm::devscan::CONFIG_UDP_PORT = 31417 |
configuration requests and responses go to this port
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |