tuwien.auto.eicl.struct.eibnetip

Class CEMI_Connection_Request


public class CEMI_Connection_Request
extends java.lang.Object

This class is the implementation of the EIBnet/IP Tunnelling Request message. This class can be used for parsing and creating messages. A Tunnelling Request is used to tunnel a cEMI message. A Tunnelling Response confirms the correct reception of the Tunnelling Request. Note that this does not ensure packet delivery on the medium.
See Also:
CEMI_Connection_Ack, CEMI

Constructor Summary

CEMI_Connection_Request(short _RequestType, byte[] _Tunneling_Request)
Initializes a new object by parsing a byte array.
CEMI_Connection_Request(short _RequestType, short _Channelid, short _Sequencecounter, CEMI _CemiFrame)
Initializes a new tunnelling request for sending.

Method Summary

CEMI
getCemi()
Returns the message body as cEMI object
short
getChannelid()
Returns the encapsulated channel ID
short
getReserved()
Returns the reserved byte of this message.
short
getSequenceNumber()
Returns the sequence number.
byte[]
toByteArray()
Returns the byte array representation of this message.

Constructor Details

CEMI_Connection_Request

public CEMI_Connection_Request(short _RequestType,
                               byte[] _Tunneling_Request)
            throws EICLException
Initializes a new object by parsing a byte array. Pass all bytes after the EIBnet/IP header to this constructor. If the conversion wasn't successful an Exception is thrown.
Parameters:
_RequestType - The request message code (Tunnelling Request vs. Management Request)
_Tunneling_Request - The EIBnet/IP message body (after EIBnet/IP header)
Throws:
EICLException - Forwards the cEMI L DATA constructor exception.

CEMI_Connection_Request

public CEMI_Connection_Request(short _RequestType,
                               short _Channelid,
                               short _Sequencecounter,
                               CEMI _CemiFrame)
Initializes a new tunnelling request for sending.
Parameters:
_RequestType - The request message code (Tunnelling Request vs. Management Request)
_Channelid - The current connection channel id.
_Sequencecounter - The current sending sequence counter.
_CemiFrame - The message to be processed on the medium.

Method Details

getCemi

public CEMI getCemi()
Returns the message body as cEMI object
Returns:
The cEMI message contained in this request.

getChannelid

public short getChannelid()
Returns the encapsulated channel ID
Returns:
The current channel ID.

getReserved

public short getReserved()
Returns the reserved byte of this message.
Returns:
The reserved byte.

getSequenceNumber

public short getSequenceNumber()
Returns the sequence number.
Returns:
the sequence number.

toByteArray

public byte[] toByteArray()
            throws EICLException
Returns the byte array representation of this message.
Returns:
The message as byte array.
Throws:
EICLException - Forwards the IOException.