Package org.openwebnet4j
Class BUSGateway
- java.lang.Object
-
- org.openwebnet4j.OpenGateway
-
- org.openwebnet4j.BUSGateway
-
- All Implemented Interfaces:
ConnectorListener
public class BUSGateway extends OpenGateway
BUSGatewayto connect to BUS OpenWebNet gateways usingBUSConnector- Author:
- M. Valla - Initial contribution, Andrea Conte - Energy manager contribution
-
-
Field Summary
-
Fields inherited from class org.openwebnet4j.OpenGateway
connector, isConnected, isDiscovering, listeners, macAddr
-
-
Constructor Summary
Constructors Constructor Description BUSGateway(String host, int port, String pwd)Creates a new BUSGateway instance with host, port and password.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddiscoverDevicesInternal()StringgetHost()Returns the gateway host (IP address or hostname).StringgetPassword()Returns the gateway password.intgetPort()Returns the gateway port.protected voidinitConnector()Init the connector for this OpenGateway.booleanisCmdConnectionReady()Returns true if CMD connection is ready to send messages (connector must be connected and in case of BUS connection checks if a CMD was sent recently < 120sec)StringtoString()-
Methods inherited from class org.openwebnet4j.OpenGateway
closeConnection, connect, discoverDevices, getFirmwareVersion, getMACAddr, isConnected, isDiscovering, notifyListeners, onMessage, onMonDisconnected, reconnect, send, sendHighPriority, sendInternal, subscribe, unsubscribe
-
-
-
-
Method Detail
-
getHost
public String getHost()
Returns the gateway host (IP address or hostname).- Returns:
- host
-
getPort
public int getPort()
Returns the gateway port.- Returns:
- port
-
getPassword
public String getPassword()
Returns the gateway password.- Returns:
- password
-
initConnector
protected void initConnector()
Description copied from class:OpenGatewayInit the connector for this OpenGateway.- Specified by:
initConnectorin classOpenGateway
-
discoverDevicesInternal
protected void discoverDevicesInternal() throws OWNException- Specified by:
discoverDevicesInternalin classOpenGateway- Throws:
OWNException
-
isCmdConnectionReady
public boolean isCmdConnectionReady()
Description copied from class:OpenGatewayReturns true if CMD connection is ready to send messages (connector must be connected and in case of BUS connection checks if a CMD was sent recently < 120sec)- Specified by:
isCmdConnectionReadyin classOpenGateway- Returns:
- boolean
-
-