public final class KnxNetworkDriverImp extends Object implements org.osgi.service.cm.ManagedService, IKnxNetwork
Modifier and Type | Field and Description |
---|---|
org.osgi.framework.ServiceRegistration |
regServiceKnx |
COMMAND_NAME, COMMAND_VALUE, DAFAULT_READ_CHAR, DAFAULT_STATUS_CHAR, GROUP_ADDRESS, MANUFACTURER, TIME
Constructor and Description |
---|
KnxNetworkDriverImp(org.osgi.framework.BundleContext context,
org.osgi.service.log.LogService log)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addGroupDevice(String deviceId,
KnxGroupDevice device)
Devices can register here to get events from the knx bus
|
String |
getKnxGatewayIp() |
int |
getKnxGatewayPort() |
org.osgi.service.log.LogService |
getLogger() |
String |
getMulticastIp() |
int |
getMulticastUdpPort() |
String |
getMyIp() |
int |
getMyPort() |
boolean |
isMulticast() |
void |
networkConnected() |
void |
networkDisconnected() |
void |
newMessageFromHouse(String groupAddress,
byte[] event)
Forward the message from the house to the groupDevice; mapping on
groupAddress
|
void |
removeGroupDevice(String deviceId,
KnxGroupDevice device)
Devices can unregister here to stop getting events from the knx bus
|
void |
requestState(String deviceId) |
void |
sendCommand(String deviceId,
boolean command) |
void |
sendCommand(String device,
boolean command,
KnxCommand commandType) |
void |
sendMessageToKnxBus(String groupDeviceId,
byte[] event)
Sending KNX message to KNX bus.
|
void |
setKnxGatewayIp(String knxGatewayIp) |
void |
setKnxGatewayPort(int knxGatewayPort) |
void |
setMulticast(boolean multicast) |
void |
setMulticastIp(String multicastIp) |
void |
setMulticastUdpPort(int multicastUdpPort) |
void |
setMyIp(String myIp) |
void |
setMyPort(int myPort) |
void |
unRegister() |
void |
updated(Dictionary settings)
Update from OSGi Configuration Manager
|
public KnxNetworkDriverImp(org.osgi.framework.BundleContext context, org.osgi.service.log.LogService log)
context
- OSGi frameworklog
- public void updated(Dictionary settings) throws org.osgi.service.cm.ConfigurationException
updated
in interface org.osgi.service.cm.ManagedService
org.osgi.service.cm.ConfigurationException
public void networkConnected()
public void networkDisconnected()
public org.osgi.service.log.LogService getLogger()
public void unRegister()
public void addGroupDevice(String deviceId, KnxGroupDevice device)
addGroupDevice
in interface IKnxNetwork
public void removeGroupDevice(String deviceId, KnxGroupDevice device)
removeGroupDevice
in interface IKnxNetwork
public void newMessageFromHouse(String groupAddress, byte[] event)
groupAddress
- the knx groupAddressb
- knx command/status bytes (representing e.g. on, off)public void sendMessageToKnxBus(String groupDeviceId, byte[] event)
sendMessageToKnxBus
in interface IKnxNetwork
groupDeviceId
- KNX group address (e.g. 1/2/3)event
- payload starting with apci/data byte!public void sendCommand(String deviceId, boolean command)
sendCommand
in interface IKnxNetwork
public void sendCommand(String device, boolean command, KnxCommand commandType)
sendCommand
in interface IKnxNetwork
public void requestState(String deviceId)
requestState
in interface IKnxNetwork
public boolean isMulticast()
public void setMulticast(boolean multicast)
multicast
- the multicast to setpublic void setKnxGatewayIp(String knxGatewayIp)
knxGatewayIp
- the knxGatewayIp to setpublic String getKnxGatewayIp()
public void setKnxGatewayPort(int knxGatewayPort)
knxGatewayPort
- the knxGatewayPort to setpublic int getKnxGatewayPort()
public void setMyIp(String myIp)
myIp
- the myIp to setpublic String getMyIp()
public int getMyPort()
public void setMyPort(int myPort)
myPort
- the myPort to setpublic String getMulticastIp()
public void setMulticastIp(String multicastIp)
multicastIp
- the multicastIp to setpublic int getMulticastUdpPort()
public void setMulticastUdpPort(int multicastUdpPort)
multicastUdpPort
- the multicastUdpPort to setCopyright © 2018 universAAL Consortium. All rights reserved.