net.sf.bt747.gps.mtk
Class MtkBinTransportMessageModel

java.lang.Object
  extended by net.sf.bt747.gps.mtk.MtkBinTransportMessageModel

public class MtkBinTransportMessageModel
extends java.lang.Object

Model for MTK binary data package.

Author:
Mario De Weerd

Constructor Summary
MtkBinTransportMessageModel(int type, byte[] payload)
           
 
Method Summary
 byte[] getMessage()
          Provide the transport message.
 byte[] getPayLoad()
          Get the transport message payload.
 int getType()
          Get the type of the message.
 boolean setMessage(byte[] message)
          Sets the message.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MtkBinTransportMessageModel

public MtkBinTransportMessageModel(int type,
                                   byte[] payload)
Parameters:
type -
payload - The Payload - warning the pointer is taken !
Method Detail

getPayLoad

public byte[] getPayLoad()
Get the transport message payload.

Returns:
Transport message payload.

getType

public int getType()
Get the type of the message.

Returns:
Message type

getMessage

public byte[] getMessage()
Provide the transport message.

Returns:
The transport message.

setMessage

public boolean setMessage(byte[] message)
Sets the message. Extracts the payload internally and checks validity of message.

Parameters:
message -
Returns:
true if the message is valid.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object