本文整理匯總了Java中de.quist.samy.remocon.RemoteSession類的典型用法代碼示例。如果您正苦於以下問題:Java RemoteSession類的具體用法?Java RemoteSession怎麽用?Java RemoteSession使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RemoteSession類屬於de.quist.samy.remocon包,在下文中一共展示了RemoteSession類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: send
import de.quist.samy.remocon.RemoteSession; //導入依賴的package包/類
/**
* Sends a command to Samsung device.
*
* @param cmd
* Command to send
*/
public void send(final String cmd) {
RemoteSession remoteController = null;
try {
remoteController = RemoteSession.create("openHAB", "openHAB", ip, port);
Key key = Key.valueOf(cmd);
logger.debug("Try to send command: {}", cmd);
remoteController.sendKey(key);
} catch (Exception e) {
logger.error("Could not send command to device on {}: {}", ip + ":" + port, e);
}
remoteController = null;
}
示例2: send
import de.quist.samy.remocon.RemoteSession; //導入依賴的package包/類
/**
* Sends a command to Samsung device.
*
* @param cmd
* Command to send
*/
public void send(final String cmd) {
RemoteSession remoteController = null;
try {
remoteController = RemoteSession.create("openHAB", "openHAB", ip, port);
Key key = Key.valueOf(cmd);
logger.debug("Try to send command: {}", cmd);
remoteController.sendKey(key);
} catch (Exception e) {
logger.error("Could not send command to device on {}: {}", ip + ":" + port, e);
}
remoteController = null;
}