org.openiec61850.server.data
Class SampleDataSource

java.lang.Object
  extended by org.openiec61850.server.data.SampleDataSource
All Implemented Interfaces:
java.lang.Runnable, DataSource

public class SampleDataSource
extends java.lang.Object
implements DataSource, java.lang.Runnable

The IEC server AccessPoint reads and writes data from and to so called DataSources. These data sources are external to the openIEC61850 library stack and are accessed via this interface. For every AccessPoint there must be an implementation of this interface. These implementations are not part of the openIEC61850 stack but of the concrete applications that make use of the stack.


Constructor Summary
SampleDataSource()
           
 
Method Summary
 void initialize(AccessPoint ac, java.util.Set<java.lang.String> triggerDchg, java.util.Set<java.lang.String> triggerQchg, java.util.Set<java.lang.String> triggerDupd)
          Initiates the DataSource with a reference back to the Access point and all triggerable nodes
 void readValues(java.util.List<BasicDataAttribute> basicDataAttributes)
          Inserts the proper values in the given BasicDataAttributes using setValue().
 void run()
          Keeps track of events for reporting and logging.
 void writeValues(java.util.List<BasicDataAttribute> basicDataAttributes)
          Takes the values from the given list of BasicDataAttributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleDataSource

public SampleDataSource()
Method Detail

initialize

public void initialize(AccessPoint ac,
                       java.util.Set<java.lang.String> triggerDchg,
                       java.util.Set<java.lang.String> triggerQchg,
                       java.util.Set<java.lang.String> triggerDupd)
Description copied from interface: DataSource
Initiates the DataSource with a reference back to the Access point and all triggerable nodes

Specified by:
initialize in interface DataSource

readValues

public void readValues(java.util.List<BasicDataAttribute> basicDataAttributes)
                throws ServiceError
Inserts the proper values in the given BasicDataAttributes using setValue(). This function is called by the openIEC61850 server library whenever a GetDataValues or GetDataSetValues service request comes in.

Specified by:
readValues in interface DataSource
Throws:
ServiceError

writeValues

public void writeValues(java.util.List<BasicDataAttribute> basicDataAttributes)
                 throws ServiceError
Takes the values from the given list of BasicDataAttributes.

Specified by:
writeValues in interface DataSource
Throws:
ServiceError

run

public void run()
Keeps track of events for reporting and logging. Notifies the server via the access point when necessary

Specified by:
run in interface java.lang.Runnable