
Chapter 4. Implementation 48
Currently, only the gateways MiniCtrl and WifiCtrl are supported, but more gateways can be
added because the software provides a template class. Figure 4.11 shows gateway driver with its
interfaces.
gateway driver
serial
tcp
connect refresh
protocol output
other output
raw output
raw input
protocol input
publisher
service
other
subscriber
Figure 4.11.: The gateway driver with its ROS interfaces.
The gateway driver can be either connected via serial or TCP interface to the gateway. They cannot
be used simultaneously, but the user can change and switch between them during runtime. The
serial interface is supported by MiniCtrl and WifiCtrl, while TCP is used for connecting to the WIFI
module on the WifiCtrl. There are three different ways to choose the connection parameters: per
default, by parameter server or starting the node with command line parameters. The command
line parameters have highest priority. If the node is started without passing arguments to it, it
is checked for compatible parameters on the parameter server and if these are present, they are
loaded into the node, which then tries to connect to the given interface. If these parameters do
not exist on the server, or if they are faulty, the module will connect over serial with 115 200 baud
by default. However, there are other methods that enable subsequent connecting, if the initial
connecting failed or the link is terminated during operation. The first one is the "connect"-service,
which allows reconnecting as well as a connection change. The second one is the "refresh"-service,
which reloads the parameters from the parameter server and applies them. The current connection
state can be referred to the parameter server.
In addition to those two services, the gateway driver offers various publishers and subscribers for
data exchange:
Protocol output: Every time the gateway receives a message from a HA device, it is sent to
the gateway driver, where it is processed, separated into protocol type and data and finally
published.
Protocol input: The protocol input is the opposite part of protocol output for the other direction.
When data is received via ROS, it is converted into a serial string and sent back to the
gateway. For example, a received message of "protocol type: IT; data: 000AA8" would be
delivered to the gateway as "send it 0x000AA8".
Other output: Outputs all serial data other than protocol messages. This data can, for example,
Comentarios a estos manuales