tuwien.auto.eicl.struct.eibnetip

Class EIBnetIPPacket


public class EIBnetIPPacket
extends java.lang.Object

This class is the implementation of the standard EIBnet/IP packet structure of version 1.0. This object is useful for creating and parsing EIBnet/IP messages. The message body is not processed, but can be accessed through the getData() method. This can be achieved through other classes in this package.
See Also:
Connect_Request, Connect_Response, Connectionstate_Request, Connectionstate_Response, Description_Request, Description_Response, Disconnect_Request, Disconnect_Response, Search_Request, Search_Response, CEMI_Connection_Ack, CEMI_Connection_Request

Constructor Summary

EIBnetIPPacket(byte[] _Packet, int _PacketSize)
The constructor parses a new packet object from a byte array.
EIBnetIPPacket(int _ServiceType, int _Totalsize)
This constructor initializes a new EIBNET/IP packet object with the relevant header information, service type and total packet size.

Method Summary

byte[]
getBody()
This message returns the message body as byte array which can be parsed using other classes in this package
int
getServiceType()
Returns the service type code as 2 byte value.
byte[]
toByteArray()
With this method you can get the byte array representation of this object

Constructor Details

EIBnetIPPacket

public EIBnetIPPacket(byte[] _Packet,
                      int _PacketSize)
            throws EICLException
The constructor parses a new packet object from a byte array. The package information can be accessed through get/set methods.
Parameters:
_Packet - the byte array
_PacketSize - the size
Throws:
EICLException - If something doesn't correspond with the frame format this exception is thrown.

EIBnetIPPacket

public EIBnetIPPacket(int _ServiceType,
                      int _Totalsize)
This constructor initializes a new EIBNET/IP packet object with the relevant header information, service type and total packet size.
Parameters:
_ServiceType - the service type.
_Totalsize - the total packet size.

Method Details

getBody

public byte[] getBody()
This message returns the message body as byte array which can be parsed using other classes in this package
Returns:
the body

getServiceType

public int getServiceType()
Returns the service type code as 2 byte value.
Returns:
The service type.

toByteArray

public byte[] toByteArray()
With this method you can get the byte array representation of this object
Returns:
the byte array