Search in sources :

Example 1 with Sapp7DCommand

use of com.github.paolodenti.jsapp.core.command.Sapp7DCommand in project openhab1-addons by openhab.

the class SappCentralExecuter method executeSapp7DCommand.

/**
     * runs 7D command
     */
public void executeSapp7DCommand(String ip, int port, int address, int value) throws SappException {
    synchronized (this) {
        SappCommand sappCommand = new Sapp7DCommand(address, value);
        sappCommand.run(ip, port);
        if (!sappCommand.isResponseOk()) {
            throw new SappException("command execution failed");
        }
    }
}
Also used : SappCommand(com.github.paolodenti.jsapp.core.command.base.SappCommand) Sapp7DCommand(com.github.paolodenti.jsapp.core.command.Sapp7DCommand) SappException(com.github.paolodenti.jsapp.core.command.base.SappException)

Aggregations

Sapp7DCommand (com.github.paolodenti.jsapp.core.command.Sapp7DCommand)1 SappCommand (com.github.paolodenti.jsapp.core.command.base.SappCommand)1 SappException (com.github.paolodenti.jsapp.core.command.base.SappException)1