org.mbari.siam.core
Class PuckHeader

java.lang.Object
  extended by org.mbari.siam.core.PuckHeader

public class PuckHeader
extends java.lang.Object

Definition of puck header @author Mike Risi


Field Summary
static int _ORG_ID
          header organization ID
static int _SIZE
          header size in bytes
static int _TYPE_ID
          header type/version ID
 
Constructor Summary
PuckHeader()
          create an empty puck header
PuckHeader(byte[] headerBytes)
          create a puck header using a byte array
 
Method Summary
 byte[] getBytes()
          get the puck header bytes
 long getChecksum()
          get the checksum for the puck payload
 int getCurrentLimit()
          get the current limit of device attached to the puck
 long getIsiId()
          get the device ISI ID
 int getOrgId()
          get the organization ID
 int getPayloadEnd()
          get the end address of the puck payload in bytes
 int getPayloadSize()
          get the size of the of the payload in bytes
 int getPayloadStart()
          get the start address of the puck payload in bytes
 java.lang.String getServiceName()
          get the driver name for the device
 int getTypeId()
          get the header type/version ID
 UUID getUUID()
          get the UUID for the puck
 void setChecksum(long checkSum)
          set the checksum for the puck payload
 void setCurrentLimit(int limit)
          set the devices curretn limit
 void setIsiId(long id)
          set the ISI ID for the device
 void setPayloadSize(int size)
          set payload size for the device service code
 void setServiceName(java.lang.String name)
          set the driver name for the device
 void setServiceProperties(java.util.Properties properties)
          Attempts to set the puck header isiId, serviceName, and currentLimit from a ServiceProperties object.
 void setUUID(UUID uuid)
          set the UUID for this puck wite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ORG_ID

public static final int _ORG_ID
header organization ID

See Also:
Constant Field Values

_TYPE_ID

public static final int _TYPE_ID
header type/version ID

See Also:
Constant Field Values

_SIZE

public static final int _SIZE
header size in bytes

See Also:
Constant Field Values
Constructor Detail

PuckHeader

public PuckHeader(byte[] headerBytes)
create a puck header using a byte array


PuckHeader

public PuckHeader()
create an empty puck header

Method Detail

getBytes

public byte[] getBytes()
get the puck header bytes


getOrgId

public int getOrgId()
get the organization ID


getTypeId

public int getTypeId()
get the header type/version ID


getUUID

public UUID getUUID()
get the UUID for the puck


getPayloadStart

public int getPayloadStart()
get the start address of the puck payload in bytes


getPayloadEnd

public int getPayloadEnd()
get the end address of the puck payload in bytes


getPayloadSize

public int getPayloadSize()
get the size of the of the payload in bytes


getChecksum

public long getChecksum()
get the checksum for the puck payload


getServiceName

public java.lang.String getServiceName()
get the driver name for the device


getIsiId

public long getIsiId()
get the device ISI ID


getCurrentLimit

public int getCurrentLimit()
get the current limit of device attached to the puck


setUUID

public void setUUID(UUID uuid)
set the UUID for this puck wite


setPayloadSize

public void setPayloadSize(int size)
set payload size for the device service code


setChecksum

public void setChecksum(long checkSum)
set the checksum for the puck payload


setServiceName

public void setServiceName(java.lang.String name)
set the driver name for the device


setIsiId

public void setIsiId(long id)
set the ISI ID for the device


setCurrentLimit

public void setCurrentLimit(int limit)
set the devices curretn limit


setServiceProperties

public void setServiceProperties(java.util.Properties properties)
Attempts to set the puck header isiId, serviceName, and currentLimit from a ServiceProperties object. If a property can not be found an error value is used. For the ISI ID and the current limit the error value is -1



Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.