Esempio n. 1
0
  /**
   * Applies the configuration represented in this data structure to the device in the given
   * accelerator sequence with the same device ID. If there is no such device then the method
   * returns false.
   *
   * @param smfSeq this data structure instance should contain the configuration information for a
   *     device in this accelerator sequence, a device with the proper ID
   * @return <code>true</code> if the target device was found and its configuration updated, <code>
   *     false</code> otherwise
   * @throws BadStructException 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 boolean appyConfigurationById(AcceleratorSeq smfSeq)
      throws BadStructException, ConnectionException, PutException {
    AcceleratorNode smfDev = smfSeq.getNodeWithId(this.strDevId);

    if (smfDev == null) return false;

    if (!(smfDev instanceof ProfileDevice)) return false;

    ProfileDevice smfDevPrf = (ProfileDevice) smfDev;

    this.applyConfiguration(smfDevPrf);

    return true;
  }