tuwien.auto.eicl.struct.eibnetip

Class CEMI_Connection_Ack


public class CEMI_Connection_Ack
extends java.lang.Object

This class is the implementation of the EIBNET/IP Tunnelling Acknowledge message. It can be used for parsing as well as creating new Tunnelling Ack messages. A Tunnelling Ack is sent in answer to a Tunnelling Request, and acknowledges therefore the reception of the message over the IP channel, not the successful transmission on the EIB bus.
See Also:
CEMI_Connection_Request, CEMI_Connection

Constructor Summary

CEMI_Connection_Ack(byte[] _Tunnelling_Ack)
Initializes a new object by parsing a byte array.
CEMI_Connection_Ack(short _AckType, short _Channelid, short _Sequencecounter, short _Status)
Initializes a new object for sending.

Method Summary

short
getChannelid()
Returns the encapsulated connection channel ID.
short
getSequencecounter()
Returns the message sequence counter.
short
getStatus()
Returns the error status of this message
String
getStatusString()
Offers a human readable status string.
byte[]
toByteArray()
Returns a byte representation of the message.

Constructor Details

CEMI_Connection_Ack

public CEMI_Connection_Ack(byte[] _Tunnelling_Ack)
Initializes a new object by parsing a byte array. Pass all bytes after the EIBnet/IP header.
Parameters:
_Tunnelling_Ack - The message body byte array (after EIBnet/IP header)

CEMI_Connection_Ack

public CEMI_Connection_Ack(short _AckType,
                           short _Channelid,
                           short _Sequencecounter,
                           short _Status)
Initializes a new object for sending. All needed values are passed as parameters.
Parameters:
_AckType - The acknowledge message code. (Tunnelling Ack vs. Management Ack)
_Channelid - The current connection channelid.
_Sequencecounter - The sending sequence counter.
_Status - The error status.

Method Details

getChannelid

public short getChannelid()
Returns the encapsulated connection channel ID.
Returns:
channelid

getSequencecounter

public short getSequencecounter()
Returns the message sequence counter.
Returns:
the sequence counter

getStatus

public short getStatus()
Returns the error status of this message
Returns:
the error status.

getStatusString

public String getStatusString()
Offers a human readable status string.
Returns:
the status string

toByteArray

public byte[] toByteArray()
            throws EICLException
Returns a byte representation of the message. If something goes wrong an Exception is returned.
Returns:
Byte array representation of this message
Throws:
EICLException - Forwards the IOException.