Search in sources :

Example 1 with Sapp74Command

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

the class SappCentralExecuter method executeSapp74Command.

/**
     * runs 74 command
     */
public int executeSapp74Command(String ip, int port, byte address) throws SappException {
    synchronized (this) {
        SappCommand sappCommand = new Sapp74Command(address);
        sappCommand.run(ip, port);
        if (!sappCommand.isResponseOk()) {
            throw new SappException("command execution failed");
        }
        return sappCommand.getResponse().getDataAsWord();
    }
}
Also used : SappCommand(com.github.paolodenti.jsapp.core.command.base.SappCommand) Sapp74Command(com.github.paolodenti.jsapp.core.command.Sapp74Command) SappException(com.github.paolodenti.jsapp.core.command.base.SappException)

Aggregations

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