|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.stz.bt.framework.DataPointContext de.stz.bt.fnd.FND_DataPointContext
Represents the container for datapoint opbjects and message infrastructure The FND_DatapointContext is the runtime environment for datapoints. Each datapoint running on an either an island control or on an central control needs a set of common parameters and services that are provided by an datapoint context. The context offer the following services:
- FND Connectivity This service provides means of receiving FND_Datagram Messages and to deliver messages to. It is configurable to act with other systems or processes. At the moment it runs a FND UDP Server to interact with datagram messages. extensions will be built for using the IBM MQTT Architecture. - FND DataPoint Factory The factory provides means of creating datapoints. The handling of the datapoints is done by the context. The reason why this is a factory is that the context (and also the factory as subcomponent) are configured, so that we do't need to care about this when we need a DataPoint Object - FND Datagram Factory This factory provides datagrams needed by the datapoints, or by an external entity that want's to access an datapoint. A datagram has a source and a drain. It is sourced either by API Interaction with a datapoint, or by a datagram received through an outside interface like the UDPServer. The Datagram Factory provides the source, and should in the future also be the sink and contain a datagram pool for deterministic memory consumption
Nested Class Summary | |
class |
FND_DataPointContext.FND_ContextThread
The Context thread monitors continously the INCOMING queue of UDPTransport and dispatches datagrams found to the corrosponding handler (NORMAL,ERROR,REJECT) dependend on the type of datagram. |
Field Summary | |
static int |
CENTRAL
|
private org.jdom.Element |
config
|
private int |
contextControlType
|
protected java.util.LinkedHashMap |
datapoints
|
protected FND_DatagramFactory |
dgramFactory
|
protected FND_DataPointFactory |
dpFactory
|
private FND_UDPTransport |
fndUDPServer
|
static int |
ISLAND
|
private java.net.InetAddress |
target
|
protected java.lang.String |
URL_PREFIX
|
Fields inherited from class de.stz.bt.framework.DataPointContext |
logger |
Constructor Summary | |
FND_DataPointContext(org.jdom.Element config)
Default Constructor. |
Method Summary | |
private void |
createDatapoints(java.util.List datapoints)
creates the datapoint objects |
java.util.List |
enumerateAllDatapoints()
|
FND_CollectAddressPoint |
getCollectAddresspoint(java.lang.String dpid)
|
int |
getContextControlType()
|
FND_DatagramFactory |
getDatagramFactory()
|
FND_DataPointFactory |
getDataPointFactory()
|
FND_MeasurePoint |
getMeasurePoint(java.lang.String dpid)
|
FND_MessagePoint |
getMessagePoint(java.lang.String dpid)
|
FND_SetPoint |
getSetPoint(java.lang.String dpid)
|
FND_SwitchPoint |
getSwitchPoint(java.lang.String dpid)
|
java.net.InetAddress |
getTarget()
|
FND_TransferPoint |
getTransferPoint(java.lang.String dpid)
|
protected void |
handleERRORDatagram(FND_Datagram dgram)
this method handles error datagrams Only ISLAND contexts can send error datagrams, son only CENTRAL contexts have to handle them |
protected void |
handleNORMALDatagram(FND_Datagram dgram)
handles a normal datagram. |
protected void |
handleREJECTDatagram(FND_Datagram dgram)
this method handles reject datagrams |
void |
init()
After creating the object it has to be initialized by calling this method. |
protected void |
sendDatagram(FND_Datagram out)
|
private void |
setContextControlType(int i)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CENTRAL
public static final int ISLAND
protected java.lang.String URL_PREFIX
private java.net.InetAddress target
protected FND_DatagramFactory dgramFactory
protected FND_DataPointFactory dpFactory
private int contextControlType
private FND_UDPTransport fndUDPServer
protected java.util.LinkedHashMap datapoints
private org.jdom.Element config
Constructor Detail |
public FND_DataPointContext(org.jdom.Element config)
Method Detail |
private void createDatapoints(java.util.List datapoints)
datapoints
- contains an XML JDOM Element describing the datapointspublic void init()
public FND_DatagramFactory getDatagramFactory()
public FND_DataPointFactory getDataPointFactory()
getDataPointFactory
in class DataPointContext
protected void handleNORMALDatagram(FND_Datagram dgram) throws java.lang.Exception
java.lang.Exception
protected void handleREJECTDatagram(FND_Datagram dgram)
dgram
- protected void handleERRORDatagram(FND_Datagram dgram)
public int getContextControlType()
private void setContextControlType(int i)
i
- Sets the Controltype to either CENTRAL or ISLANDprotected void sendDatagram(FND_Datagram out)
public java.net.InetAddress getTarget()
public java.util.List enumerateAllDatapoints()
enumerateAllDatapoints
in interface FND_DatapointService
public FND_MessagePoint getMessagePoint(java.lang.String dpid)
getMessagePoint
in interface FND_DatapointService
public FND_SwitchPoint getSwitchPoint(java.lang.String dpid)
getSwitchPoint
in interface FND_DatapointService
public FND_MeasurePoint getMeasurePoint(java.lang.String dpid)
getMeasurePoint
in interface FND_DatapointService
public FND_SetPoint getSetPoint(java.lang.String dpid)
getSetPoint
in interface FND_DatapointService
public FND_TransferPoint getTransferPoint(java.lang.String dpid)
getTransferPoint
in interface FND_DatapointService
public FND_CollectAddressPoint getCollectAddresspoint(java.lang.String dpid)
getCollectAddresspoint
in interface FND_DatapointService
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |