Main Page | Packages | Class Hierarchy | Compound List | Compound Members

de.stz.bt.fnd.datapoints.FND_DataPoint Class Reference

Inheritance diagram for de.stz.bt.fnd.datapoints.FND_DataPoint:

de.stz.bt.framework.DataPoint de.stz.bt.fnd.datapoints.types.FND_CollectAddressPointImpl de.stz.bt.fnd.datapoints.types.FND_CountPointImpl de.stz.bt.fnd.datapoints.types.FND_MeasurePointImpl de.stz.bt.fnd.datapoints.types.FND_MessagePointImpl de.stz.bt.fnd.datapoints.types.FND_SetPointImpl de.stz.bt.fnd.datapoints.types.FND_SwitchPointImpl de.stz.bt.fnd.datapoints.types.FND_TransferPointImpl List of all members.

Public Member Functions

 FND_DataPoint ()
String printDatapointStatus ()
void setCentralControl (byte centralControlID, byte centralControlSubID)
void setIslandControl (byte islandControlID, byte islandSubControlID)
void setDataPointID (byte[] dataPointId)
void setPrivilegeDegree (byte prd)
void setResidualPriority (byte rpr)
synchronized void lockDP ()
synchronized void unlockDP ()
void registerDatapointObserver (FND_DataPointObserver observer)
abstract byte getDp_type ()
abstract FND_Datagram handleCMDDatagram (FND_Datagram dgram) throws Exception
abstract void handleRSPDatagram (FND_Datagram dgram) throws Exception
abstract FND_Datagram handleUSMDatagram (FND_Datagram dgram) throws Exception
abstract void handleACKDatagram (FND_Datagram dgram) throws Exception

Static Public Attributes

final byte TRANSFERPOINT = 0
final byte MESSAGEPOINT = 1
final byte SWITCHPOINT = 2
final byte MEASUREPOINT = 3
final byte SETPOINT = 4
final byte COUNTPOINT = 5
final byte COLLECTADDRESSPOINT = 6

Package Attributes

byte[] dataPointID = new byte[16]
byte centralControl = 1
byte centralSubControl = 0
byte islandControl = 1
byte islandSubControl = 1
byte prd = 0
byte rpr = 0
byte emq = 0
byte val = 0
byte apr = 0
byte mis = 0
byte msk = 0
boolean dp_busy = false

Detailed Description

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

Author:
Lars Heineken

J.Seitter

Version:
Id
FND_DataPoint.java,v 1.7 2004/11/12 09:08:18 jseitter Exp


Constructor & Destructor Documentation

de.stz.bt.fnd.datapoints.FND_DataPoint.FND_DataPoint  ) 
 

Default constructor.

00085                          {
00086     // Important!! Always call the super constructor for correct datapoint handling
00087     // mainly the creation time is set here
00088     super();
00089 
00090   }


Member Function Documentation

abstract byte de.stz.bt.fnd.datapoints.FND_DataPoint.getDp_type  )  [pure virtual]
 

Returns:
Each Datapoint has to implement the getDp_Type and return the correct constant from FND_DataPoint

Implemented in de.stz.bt.fnd.datapoints.types.FND_CollectAddressPointImpl, de.stz.bt.fnd.datapoints.types.FND_CountPointImpl, de.stz.bt.fnd.datapoints.types.FND_MeasurePointImpl, de.stz.bt.fnd.datapoints.types.FND_MessagePointImpl, de.stz.bt.fnd.datapoints.types.FND_SetPointImpl, de.stz.bt.fnd.datapoints.types.FND_SwitchPointImpl, and de.stz.bt.fnd.datapoints.types.FND_TransferPointImpl.

abstract void de.stz.bt.fnd.datapoints.FND_DataPoint.handleACKDatagram FND_Datagram  dgram  )  throws Exception [pure virtual]
 

Parameters:
dgram 
Exceptions:
Exception 

Implemented in de.stz.bt.fnd.datapoints.types.FND_CollectAddressPointImpl, de.stz.bt.fnd.datapoints.types.FND_CountPointImpl, de.stz.bt.fnd.datapoints.types.FND_MeasurePointImpl, de.stz.bt.fnd.datapoints.types.FND_MessagePointImpl, de.stz.bt.fnd.datapoints.types.FND_SetPointImpl, de.stz.bt.fnd.datapoints.types.FND_SwitchPointImpl, and de.stz.bt.fnd.datapoints.types.FND_TransferPointImpl.

abstract FND_Datagram de.stz.bt.fnd.datapoints.FND_DataPoint.handleCMDDatagram FND_Datagram  dgram  )  throws Exception [pure virtual]
 

Parameters:
dgram 
Returns:
the result datagram
Exceptions:
Exception 

Implemented in de.stz.bt.fnd.datapoints.types.FND_CollectAddressPointImpl, de.stz.bt.fnd.datapoints.types.FND_CountPointImpl, de.stz.bt.fnd.datapoints.types.FND_MeasurePointImpl, de.stz.bt.fnd.datapoints.types.FND_MessagePointImpl, de.stz.bt.fnd.datapoints.types.FND_SetPointImpl, de.stz.bt.fnd.datapoints.types.FND_SwitchPointImpl, and de.stz.bt.fnd.datapoints.types.FND_TransferPointImpl.

abstract void de.stz.bt.fnd.datapoints.FND_DataPoint.handleRSPDatagram FND_Datagram  dgram  )  throws Exception [pure virtual]
 

Parameters:
dgram 
Exceptions:
Exception 

Implemented in de.stz.bt.fnd.datapoints.types.FND_CollectAddressPointImpl, de.stz.bt.fnd.datapoints.types.FND_CountPointImpl, de.stz.bt.fnd.datapoints.types.FND_MeasurePointImpl, de.stz.bt.fnd.datapoints.types.FND_MessagePointImpl, de.stz.bt.fnd.datapoints.types.FND_SetPointImpl, de.stz.bt.fnd.datapoints.types.FND_SwitchPointImpl, and de.stz.bt.fnd.datapoints.types.FND_TransferPointImpl.

abstract FND_Datagram de.stz.bt.fnd.datapoints.FND_DataPoint.handleUSMDatagram FND_Datagram  dgram  )  throws Exception [pure virtual]
 

Parameters:
dgram 
Returns:
the result datagram
Exceptions:
Exception 

Implemented in de.stz.bt.fnd.datapoints.types.FND_CollectAddressPointImpl, de.stz.bt.fnd.datapoints.types.FND_CountPointImpl, de.stz.bt.fnd.datapoints.types.FND_MeasurePointImpl, de.stz.bt.fnd.datapoints.types.FND_MessagePointImpl, de.stz.bt.fnd.datapoints.types.FND_SetPointImpl, de.stz.bt.fnd.datapoints.types.FND_SwitchPointImpl, and de.stz.bt.fnd.datapoints.types.FND_TransferPointImpl.

synchronized void de.stz.bt.fnd.datapoints.FND_DataPoint.lockDP  ) 
 

Returns:
true if datapoint is free and false if datapoint is in use see FND 1.0 Spec Page. 93

00185                                     {
00186     logger.debug("setting DP lock flag to true (out of order at the moment)");
00187     //TODO check locking
00188     //while (this.dp_busy == true)
00189     //  try {
00190     //    wait();
00191     //  } catch (InterruptedException e) {
00192     //    // TODO Auto-generated catch block
00193     //    e.printStackTrace();
00194     //  }
00195 
00196     dp_busy = true;
00197     logger.debug(printDatapointStatus());
00198   }

void de.stz.bt.fnd.datapoints.FND_DataPoint.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.

00116                               {
00117     this.centralControl = centralControlID;
00118     this.centralSubControl = centralControlSubID;
00119   }

void de.stz.bt.fnd.datapoints.FND_DataPoint.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.

00141                                                  {
00142     this.dataPointID = dataPointId;
00143   }

void de.stz.bt.fnd.datapoints.FND_DataPoint.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.

00131                              {
00132     this.islandControl = islandControlID;
00133     this.islandSubControl = islandSubControlID;
00134   }

void de.stz.bt.fnd.datapoints.FND_DataPoint.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.

00152                                            {
00153     if (prd > 3) {
00154       throw (
00155         new IndexOutOfBoundsException(
00156           "FND_DataPoint.setPrivilegeDegree: prd parameter, above maximum, value="
00157             + prd
00158             + " maximum value=3"));
00159     }
00160     this.prd = prd;
00161   }

void de.stz.bt.fnd.datapoints.FND_DataPoint.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.

00170                                             {
00171     if (rpr > 3) {
00172       throw (
00173         new IndexOutOfBoundsException(
00174           "FND_DataPoint.setResidualPriority: rpr parameter, above maximum, value="
00175             + rpr
00176             + " maximum value=3"));
00177     }
00178     this.rpr = rpr;
00179   }

synchronized void de.stz.bt.fnd.datapoints.FND_DataPoint.unlockDP  ) 
 

Parameters:
b Sets the dp_busy flag to either true or false

00203                                       {
00204     logger.debug("setting DP lock flag to false");
00205     this.dp_busy = false;
00206     notifyAll();
00207     logger.debug(printDatapointStatus());
00208   }


The documentation for this class was generated from the following file:
Generated on Mon Nov 15 08:36:11 2004 for FND4J by doxygen 1.3.3