#include <LOW_network.h>
Inheritance diagram for LOW_network:
Public Member Functions | |
LOW_network () | |
Constructor. | |
virtual | ~LOW_network () |
Destructor. | |
virtual void | addLink (LOW_link *inLink) |
Add a link to the network. | |
virtual void | removeLink (LOW_link *inLink) |
Remove a link from the network. | |
virtual LOW_netSegment::netSegPtrVec_t | getSegments () const |
Get list of all network segments on the network. | |
template<class devType> devType * | getDevice (const LOW_deviceID inDevID) const |
Get a specific device. | |
template<class devType> std::vector< devType * > | getDevices () const |
Get devices of a specific type. | |
template<class devType> std::vector< devType * > | searchDevices (const bool inOnlyAlarm=false) const |
Search for devices on the network. | |
virtual bool | verifyDevice (const LOW_deviceID inDevID, const bool inOnlyAlarm=false) const |
Verify existance of a specific device on the network. | |
Private Member Functions | |
virtual void | addSegments (LOW_link &inLink) |
Trigger discovery of network segments. | |
Private Attributes | |
LOW_netSegment::netSegPtrVec_t | segmentsList |
List of all segments on the network. | |
LOW_link::linkPtrVec_t | linkList |
List of links the network consts of. |
A network consists of multiple links (LOW_link). On a link there is at least one segment (LOW_netSegment).
This class is thread-safe.
Add multi-segment support.
Definition at line 42 of file LOW_network.h.
|
Constructor.
Definition at line 26 of file LOW_network.cpp. |
|
Destructor. Automatically disposes all segments. Definition at line 31 of file LOW_network.cpp. References segmentsList. |
|
Add a link to the network. Triggers discovery of network segments. Returns silently when link is already registered.
Definition at line 44 of file LOW_network.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE_WEAK__, addSegments(), and linkList. |
|
Trigger discovery of network segments. Found segments are added to the internal segment list.
Definition at line 116 of file LOW_network.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE_WEAK__, LOW_netSegment::netSegPtrVec_t, LOW_netSegment::newSegmentsFromLink(), and segmentsList. Referenced by addLink(). |
|
Get a specific device. Devices are searched in the internal lists of all segments only. No bus actions are performed. Note::The device type to look for is selected by the template parameter.
Definition at line 201 of file LOW_network.h. References __LOW_SYNCHRONIZE_METHOD_READ__, and segmentsList. |
|
Get devices of a specific type. Devices are searched in the internal lists of all segments only. No bus actions are performed. Selecting any device type will result in the complete list of devices known to be present on the network. Note:: The device type to look for is selected by the template parameter. To select any device type use LOW_device.
Definition at line 215 of file LOW_network.h. References __LOW_SYNCHRONIZE_METHOD_READ__, and segmentsList. |
|
Get list of all network segments on the network.
Definition at line 85 of file LOW_network.cpp. References __LOW_SYNCHRONIZE_METHOD_READ__, LOW_netSegment::netSegPtrVec_t, and segmentsList. |
|
Remove a link from the network. Destroys all segments on this link.
Definition at line 58 of file LOW_network.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE__, linkList, and segmentsList. |
|
Search for devices on the network. Selecting any device type will result in searching the whole network. Note:: The device type to look for is selected by the template parameter. To select any device type use LOW_device. Note:: The bus will be actively searched. Newly found devices will be added to the internal lists of the segments.
Definition at line 231 of file LOW_network.h. References __LOW_SYNCHRONIZE_METHOD_READ__, and segmentsList. |
|
Verify existance of a specific device on the network. Note:: In case you already own a reference to the device, use the corresponding method from LOW_device. Note:: The bus will be actively searched. Newly found devices will be added to the internal lists of the segments.
Definition at line 94 of file LOW_network.cpp. References __LOW_SYNCHRONIZE_METHOD_READ__. |
|
List of links the network consts of.
Definition at line 173 of file LOW_network.h. Referenced by addLink(), and removeLink(). |
|
List of all segments on the network.
Definition at line 172 of file LOW_network.h. Referenced by addSegments(), getDevice(), getDevices(), getSegments(), removeLink(), searchDevices(), and ~LOW_network(). |