mqtt.mustache 959 Bytes
Newer Older
René Schöne's avatar
René Schöne committed
1
aspect MQTT {
2
3
  private String {{rootNodeName}}.MqttName() { return "Ros2Rag"; }
  private MqttHandler {{rootNodeName}}.{{mqttHandlerField}} = new MqttHandler(MqttName());
René Schöne's avatar
René Schöne committed
4
  public void {{rootNodeName}}.{{mqttSetHostMethod}}(String host) throws java.io.IOException {
5
    {{mqttHandlerField}}.setHost(host);
René Schöne's avatar
René Schöne committed
6
7
  }
  public void {{rootNodeName}}.{{mqttSetHostMethod}}(String host, int port) throws java.io.IOException {
8
    {{mqttHandlerField}}.setHost(host, port);
René Schöne's avatar
René Schöne committed
9
10
11
  }

  public boolean {{rootNodeName}}.{{mqttWaitUntilReadyMethod}}(long time, java.util.concurrent.TimeUnit unit) {
12
    return {{mqttHandlerField}}.waitUntilReady(time, unit);
René Schöne's avatar
René Schöne committed
13
14
15
  }

  public void {{rootNodeName}}.{{mqttCloseMethod}}() {
16
    {{mqttHandlerField}}.close();
René Schöne's avatar
René Schöne committed
17
18
  }

René Schöne's avatar
René Schöne committed
19
  {{#getRootTypeComponents}}
20
  {{#first}}inh MqttHandler ASTNode.{{mqttHandlerAttribute}}();{{/first}}
21
  eq {{rootNodeName}}.get{{name}}().{{mqttHandlerAttribute}}() = {{mqttHandlerField}};
René Schöne's avatar
René Schöne committed
22
  {{/getRootTypeComponents}}
René Schöne's avatar
René Schöne committed
23
}