Package org.openwebnet4j
Class BUSGateway
- java.lang.Object
-
- org.openwebnet4j.OpenGateway
-
- org.openwebnet4j.BUSGateway
-
- All Implemented Interfaces:
ConnectorListener
public class BUSGateway extends OpenGateway
BUSGateway
to 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 void
discoverDevicesInternal()
String
getHost()
Returns the gateway host (IP address or hostname).String
getPassword()
Returns the gateway password.int
getPort()
Returns the gateway port.protected void
initConnector()
Init the connector for this OpenGateway.boolean
isCmdConnectionReady()
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)String
toString()
-
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:OpenGateway
Init the connector for this OpenGateway.- Specified by:
initConnector
in classOpenGateway
-
discoverDevicesInternal
protected void discoverDevicesInternal() throws OWNException
- Specified by:
discoverDevicesInternal
in classOpenGateway
- Throws:
OWNException
-
isCmdConnectionReady
public boolean isCmdConnectionReady()
Description copied from class:OpenGateway
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)- Specified by:
isCmdConnectionReady
in classOpenGateway
- Returns:
- boolean
-
-