
Chapter 4. Implementation 56
MainWindow: The MainWindow is the graphical framework in which the two previously men-
tioned classes are embedded. It contains a set of functions and minor classes for basic
functionality, such as graphical tools for manipulating the device database and logging.
These three parts are described later in more detail in separate sections.
visualization
protocol output
protocol input
switch
receiver/
sender
device changed
database changed
device changed ns
switch sender
get scene list
get
members
member names
all member names
scene changed
service publishersubscriber
get device
Figure 4.17.: The visualization node with its ROS interfaces.
The visualization node is connected via several topics to the device manager. The "device changed"
and "database changed" topics ensure that all displayed information is updated instantly. It also
ensures the internal copy of the database is synchronized. The "switch sender"-publisher allows the
control of HA devices through the device manager node. Besides those topics, the visualization
node also uses the "add/remove/change sender/receiver" and "get device list" services. The
"protocol input/output"-topics from the gateway driver are used by the MainWindow to add new
transmitters to the database. Although this violates the clear separations of the layer model (see
figure 3.2 on page 28), it would not be possible otherwise. The visualization node offers several
topics and services for subsequent nodes, which are all part of the namespace service and therefore
belong to the scene menu class. These services are:
Get scene list: Returns a list of all namespaces.
Get members: Returns a list of full device structures of all devices within a specific namespace.
Get member names: Same as "get members"-service, but will return only the names of the
devices, instead of their full structures. This service is suitable for nodes that do not need
the additional data to reduce the overall data traffic.
Get all member names: Returns a list of names with namespaces of all devices that are used in
the scene database. For example, if there are the two scenes "scene1" and "scene2", of which
each one contains two devices, the service will return: "scene1/device1", "scene1/device2",
"scene2/device3" and "scene2/device4".
Comentarios a estos manuales