de.stz.bt.fnd.datapoints
Class FND_DataPoint

java.lang.Object
  extended byjava.util.Observable
      extended byde.stz.bt.framework.DataPoint
          extended byde.stz.bt.fnd.datapoints.FND_DataPoint
Direct Known Subclasses:
FND_CollectAddressPointImpl, FND_CountPointImpl, FND_MeasurePointImpl, FND_MessagePointImpl, FND_SetPointImpl, FND_SwitchPointImpl, FND_TransferPointImpl

public abstract class FND_DataPoint
extends DataPoint

Object Oriented representation of a FND-Datapoint. Represents a FND-DataPoint. Implemented as an abstraction layer making it easier to handle FND-Datapoints, compared to dealing with raw FND-Datagrams. Implements FND-DataPoint functionality found in all FND-Datapoints, regardless of datapoint type. When implementing new datapoint types, extend this class ! For each datapoint an instance of this class is created

Version:
$Id: FND_DataPoint.html,v 1.3 2004/11/08 08:10:43 jseitter Exp $
Author:
Lars Heineken, J.Seitter

Field Summary
(package private)  byte apr
           
(package private)  byte centralControl
           
(package private)  byte centralSubControl
           
static byte COLLECTADDRESSPOINT
           
private  DataPointContext context
           
static byte COUNTPOINT
           
(package private)  byte[] dataPointID
           
(package private)  boolean dp_busy
           
(package private)  byte emq
           
(package private)  byte islandControl
           
(package private)  byte islandSubControl
           
static byte MEASUREPOINT
           
static byte MESSAGEPOINT
           
(package private)  byte mis
           
(package private)  byte msk
           
(package private)  byte prd
           
(package private)  byte rpr
           
static byte SETPOINT
           
static byte SWITCHPOINT
           
static byte TRANSFERPOINT
           
(package private)  byte val
           
 
Fields inherited from class de.stz.bt.framework.DataPoint
logger
 
Fields inherited from class java.util.Observable
 
Constructor Summary
FND_DataPoint()
          Default constructor.
 
Method Summary
abstract  byte getDp_type()
           
abstract  void handleACKDatagram(FND_Datagram dgram)
           
abstract  FND_Datagram handleCMDDatagram(FND_Datagram dgram)
           
abstract  void handleRSPDatagram(FND_Datagram dgram)
           
abstract  FND_Datagram handleUSMDatagram(FND_Datagram dgram)
           
 void lockDP()
           
 java.lang.String printDatapointStatus()
           
 void registerDatapointObserver(FND_DataPointObserver observer)
           
 void setCentralControl(byte centralControlID, byte centralControlSubID)
          Connects the datapoint to its central control.
 void setDataPointID(byte[] dataPointId)
          Supplies the datapoint with its specific data point id.
 void setIslandControl(byte islandControlID, byte islandSubControlID)
          Connects the datapoint to its island control.
 void setPrivilegeDegree(byte prd)
          Set the privilage degree used by this data point.
 void setResidualPriority(byte rpr)
          The residual priority used by the data point
For more information about the privilage degree see the FND_Datagram documentation about the method setApplicationControl().
 void unlockDP()
           
 
Methods inherited from class de.stz.bt.framework.DataPoint
getCreationTime, getLastAccessTime, getLastChangeTime, setLastAccessTime, setLastChangeTime
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSFERPOINT

public static final byte TRANSFERPOINT
See Also:
Constant Field Values

MESSAGEPOINT

public static final byte MESSAGEPOINT
See Also:
Constant Field Values

SWITCHPOINT

public static final byte SWITCHPOINT
See Also:
Constant Field Values

MEASUREPOINT

public static final byte MEASUREPOINT
See Also:
Constant Field Values

SETPOINT

public static final byte SETPOINT
See Also:
Constant Field Values

COUNTPOINT

public static final byte COUNTPOINT
See Also:
Constant Field Values

COLLECTADDRESSPOINT

public static final byte COLLECTADDRESSPOINT
See Also:
Constant Field Values

context

private DataPointContext context

dataPointID

byte[] dataPointID

centralControl

byte centralControl

centralSubControl

byte centralSubControl

islandControl

byte islandControl

islandSubControl

byte islandSubControl

prd

byte prd

rpr

byte rpr

emq

byte emq

val

byte val

apr

byte apr

mis

byte mis

msk

byte msk

dp_busy

boolean dp_busy
Constructor Detail

FND_DataPoint

public FND_DataPoint()
Default constructor.

Method Detail

printDatapointStatus

public java.lang.String printDatapointStatus()

setCentralControl

public void setCentralControl(byte centralControlID,
                              byte centralControlSubID)
Connects the datapoint to its central control.

Parameters:
centralControlID - ID of the central control the datapoint is assigned to.
centralControlSubID - SubID of the central control the datapoint is assigned to.

setIslandControl

public void setIslandControl(byte islandControlID,
                             byte islandSubControlID)
Connects the datapoint to its island control.

Parameters:
islandControlID - ID of the island control the datapoint is assigned to.
islandSubControlID - SubID of the island control the datapoint is assigned to.

setDataPointID

public void setDataPointID(byte[] dataPointId)
Supplies the datapoint with its specific data point id.

Parameters:
dataPointId - The data point ID to be assigned to the data point.

setPrivilegeDegree

public void setPrivilegeDegree(byte prd)
Set the privilage degree used by this data point.
For more information about the privilage degree see the FND_Datagram documentation about the method setApplicationControl().

Parameters:
prd - The privilage degree used by this data point.

setResidualPriority

public void setResidualPriority(byte rpr)
The residual priority used by the data point
For more information about the privilage degree see the FND_Datagram documentation about the method setApplicationControl().

Parameters:
rpr - The residual priority used by the data point.

lockDP

public void lockDP()
Returns:
true if datapoint is free and false if datapoint is in use see FND 1.0 Spec Page. 93

unlockDP

public void unlockDP()

registerDatapointObserver

public void registerDatapointObserver(FND_DataPointObserver observer)

getDp_type

public abstract byte getDp_type()
Returns:
Each Datapoint has to implement the getDp_Type and return the correct constant from FND_DataPoint

handleCMDDatagram

public abstract FND_Datagram handleCMDDatagram(FND_Datagram dgram)
                                        throws java.lang.Exception
Parameters:
dgram -
Returns:
the result datagram
Throws:
java.lang.Exception

handleRSPDatagram

public abstract void handleRSPDatagram(FND_Datagram dgram)
                                throws java.lang.Exception
Parameters:
dgram -
Throws:
java.lang.Exception

handleUSMDatagram

public abstract FND_Datagram handleUSMDatagram(FND_Datagram dgram)
                                        throws java.lang.Exception
Parameters:
dgram -
Returns:
the result datagram
Throws:
java.lang.Exception

handleACKDatagram

public abstract void handleACKDatagram(FND_Datagram dgram)
                                throws java.lang.Exception
Parameters:
dgram -
Throws:
java.lang.Exception