javaclient2.structures
Class PlayerMsgHdr

java.lang.Object
  extended by javaclient2.structures.PlayerMsgHdr

public class PlayerMsgHdr
extends java.lang.Object

Every message starts with this header. (see the player_msghdr structure from player.h)

Version:
Author:
Radu Bogdan Rusu

Field Summary
static int PLAYERXDR_MSGHDR_SIZE
           
 
Constructor Summary
PlayerMsgHdr()
           
 
Method Summary
 PlayerDevAddr getAddr()
           
 int getSeq()
           
 int getSize()
           
 byte getSubtype()
           
 double getTimestamp()
           
 byte getType()
           
 void setAddr(PlayerDevAddr newAddr)
           
 void setSeq(int newSeq)
           
 void setSize(int newSize)
           
 void setSubtype(int newSubtype)
           
 void setTimestamp(double newTimestamp)
           
 void setType(int newType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAYERXDR_MSGHDR_SIZE

public static final int PLAYERXDR_MSGHDR_SIZE
See Also:
Constant Field Values
Constructor Detail

PlayerMsgHdr

public PlayerMsgHdr()
Method Detail

getAddr

public PlayerDevAddr getAddr()
Returns:
Device to which this message pertains

setAddr

public void setAddr(PlayerDevAddr newAddr)
Parameters:
newAddr - Device to which this message pertains

getType

public byte getType()
Returns:
Message type; must be one of PLAYER_MSGTYPE_*

setType

public void setType(int newType)
Parameters:
newType - Message type; must be one of PLAYER_MSGTYPE_*

getSubtype

public byte getSubtype()
Returns:
Message subtype; interface specific

setSubtype

public void setSubtype(int newSubtype)
Parameters:
newSubtype - Message subtype; interface specific

getTimestamp

public double getTimestamp()
Returns:
Time associated with message contents (seconds since epoch)

setTimestamp

public void setTimestamp(double newTimestamp)
Parameters:
newTimestamp - Time associated with message contents (seconds since epoch)

getSeq

public int getSeq()
Returns:
For keeping track of associated messages

setSeq

public void setSeq(int newSeq)
Parameters:
newSeq - For keeping track of associated messages

getSize

public int getSize()
Returns:
Size in bytes of the payload to follow

setSize

public void setSize(int newSize)
Parameters:
newSize - Size in bytes of the payload to follow