public void switchPin(Pin pin, Object value) throws IOException { sendMessage( new Message( this.topic + typeMap.get(pin.getType()) + pin.pinNum() + "/value/set", String.valueOf(value))); }
private String getType(Pin pin) { return typeMap.get(pin.getType()); }
private void switchPin(String type, Pin pin, Object value) throws IOException { publish(topic + type + pin.pinNum() + "/value/set", value); }
private String controlTopic(Pin pin) { return topic + "system/listening/" + getType(pin) + pin.pinNum() + "/value/set"; }