org.universAAL.lddi.knx.networkdriver
Class KnxWriter

Package class diagram package KnxWriter
java.lang.Object
  extended by org.universAAL.lddi.knx.networkdriver.KnxWriter

public class KnxWriter
extends Object

Envelopes KNX commands to UDP Packets and sends them on a UDP Multicast Channel. Uses KNXEncoder to operate translation from high-level commands to low-level KNX commands.

Author:
Thomas Fuxreiter (foex@gmx.at)

Field Summary
protected  KnxNetworkDriverImp core
           
 
Constructor Summary
KnxWriter(KnxNetworkDriverImp core)
           
 
Method Summary
 byte[] getLastPacketSent()
           
 void requestDeviceStatus(String deviceId)
          Send KNX command 00 to group Address.
 void write(String deviceAddress, byte[] dataByte, KnxCommand commandType)
          Send KNX command to UPD multicast channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

core

protected KnxNetworkDriverImp core
Constructor Detail

KnxWriter

public KnxWriter(KnxNetworkDriverImp core)
Method Detail

write

public void write(String deviceAddress,
                  byte[] dataByte,
                  KnxCommand commandType)
Send KNX command to UPD multicast channel. Store current sent telegram.

Parameters:
deviceAddress - knx group address (1/2/3)
dataByte - knx command
commandType -

requestDeviceStatus

public void requestDeviceStatus(String deviceId)
Send KNX command 00 to group Address. Is seems that all devices belonging to this group address answer with their status. So, multiple answer telegrams are possible.

Parameters:
knx - address; either group address (1/2/3) or groupDevice address (1.2.3)

getLastPacketSent

public byte[] getLastPacketSent()
Returns:
the lastPacketSent


Copyright © 2014 universAAL Consortium. All Rights Reserved.