Example #1
0
  /**
   * Returns the set of all SCADA field descriptors describing the data acquisition channels
   * connected to this object. Since this is an active data structure these channels are used
   * internally to populate the data fields, which is profile data taken from the hardware.
   *
   * <h4>NOTE</h4>
   *
   * &middot; This method calls <code>{@link #getScadaRecords()}</code>. Do not call this method
   * during construction!
   *
   * @return set of all channel field descriptors maintained by this data structure
   * @author Christopher K. Allen
   * @since Apr 15, 2014
   */
  public List<ScadaFieldDescriptor> getFieldDescriptors() {

    // Create the container to be returned
    final List<ScadaFieldDescriptor> lstFdsAll = new LinkedList<ScadaFieldDescriptor>();

    // Fill the container with the field descriptors of each SCADA record
    for (ScadaRecord rec : this.getScadaRecords()) {
      List<ScadaFieldDescriptor> lstFdsRec = rec.getFieldDescriptors();

      lstFdsAll.addAll(lstFdsRec);
    }

    return lstFdsAll;
  }
Example #2
0
 /**
  * Sets the configuration of the given device to that represented in this data structure. Note
  * that the configuration is applied to the device regardless of whether is the same device this
  * configuration was taken from (the device IDs not not necessary match).
  *
  * <h4>NOTE</h4>
  *
  * &middot; This method calls <code>{@link #getScadaRecords()}</code>. Do not call this method
  * during construction!
  *
  * @param smfDev device to be configured
  * @throws BadStructException SCADA data structure fields are ill-defined/incompatible
  * @throws ConnectionException unable to connect to PV channel
  * @throws PutException general put exception (unable to set all parameter values)
  * @author Christopher K. Allen
  * @since May 1, 2012
  */
 public void applyConfiguration(ProfileDevice smfDev)
     throws BadStructException, ConnectionException, PutException {
   for (ScadaRecord rec : this.getScadaRecords()) {
     rec.setHardwareValues(smfDev);
   }
 }
Example #3
0
 /**
  * Load the hardware configuration parameters of the given device into this data structure. The
  * device type <code>T</code> should be appropriate for the derived class.
  *
  * <h4>NOTE</h4>
  *
  * &middot; This method calls <code>{@link #getScadaRecords()}</code>. Do not call this method
  * during construction!
  *
  * @param devSmf hardware from which configuration information is acquired
  * @throws BadStructException SCADA data structure fields are ill-defined/incompatible
  * @throws ConnectionException unable to connect to PV channel
  * @throws GetException general get exception (unable to get all parameter values)
  * @author Christopher K. Allen
  * @since Apr 16, 2014
  */
 public void acquireConfiguration(ProfileDevice smfDev)
     throws ConnectionException, GetException, BadStructException {
   for (ScadaRecord rec : this.getScadaRecords()) {
     rec.loadHardwareValues(smfDev);
   }
 }