Examples of TAlarmDefinition


Examples of de.desy.tine.server.alarms.TAlarmDefinition

  private TStockProperties()
  {
    initPropertyList();
    initStructDescription();
    new TAlarmMessage();
    new TAlarmDefinition();
  }
View Full Code Here

Examples of de.desy.tine.server.alarms.TAlarmDefinition

          MsgLog.log("getAlarmFromList", "concurrent modification error "+nerr,TErrorList.semaphore_error,e,0);
          if (nerr > 3) return null;
          continue;
        }
        keepTimestamp = false;
        TAlarmDefinition ads = alm.getAlmDef();
        if (alm.isTerminated())
        { // is marked for termination
          boolean oscPinned = TAlarm.getAlmOscillationWindowPinned();
          int oscw = TAlarm.getAlmOscillationWindow();
          if (ads != null)
          {
            if (!oscPinned) oscPinned = ads.isOscillationWindowPinned();
            oscw = ads.getAlarmOscillationWindow();
          }
          if (!alm.isTransient() && !oscPinned)
          { // oscillation window too small ?
            int dt = (alm.getTimeStamp()+TAlarm.getTerminationWindow()) - (int)(System.currentTimeMillis()/1000);
            if (dt > 0 && dt < TAlarm.ALM_OSCILLATION_MAXIMUM-oscw)
            { // adjust the oscillation window
              oscw += dt;
              if (ads != null) ads.setAlarmOscillationWindow(oscw);
              else TAlarm.setAlmOscillationWindow(oscw,false);
              if (TEquipmentModuleFactory.getDebugLevel() > 0)
                DbgLog.log("getAlarmFromList","increase alarm oscillation windows to "+oscw+" clear counts");
            }
          }
          continue;
        }
        else
        { // not marked for termination
          if (alm.getCode() == code && alm.getWatchEntry() == awe)
          { // it's already in the list so remove NEW bit !
            byte dsc = alm.getDescriptor();
            byte[] adata = alm.getData();
            int dlen = ads == null ? 0 : ads.getAlarmDataArraySize();
            if (dlen > 0 && data != null && adata != null)
            { // check for alarm data changed
              for (int n=0; n<dlen && n<adata.length && n<data.length; n++)
              {
                if (data[n] != adata[n])
View Full Code Here

Examples of de.desy.tine.server.alarms.TAlarmDefinition

        }
        // apply termination flag if necessary ...
        if (!alm.isTerminated() && thisTimeStamp > alm.getTimeStamp())
        {
          int oscw = TAlarm.getAlmOscillationWindow();
          TAlarmDefinition ads = alm.getAlmDef();
          if (ads != null) oscw = ads.getAlarmOscillationWindow();
          if (alm.getClearCount() > (oscw-TAlarm.ALM_OSCILLATION_CUSHION))
          {
            byte dsc = alm.getDescriptor();
            dsc &= ~(byte)TAlarmDescriptor.NEW;
            dsc |= (byte)TAlarmDescriptor.TERMINATE;
View Full Code Here

Examples of de.desy.tine.server.alarms.TAlarmDefinition

  private TStockProperties()
  {
    initPropertyList();
    initStructDescription();
    new TAlarmMessage();
    new TAlarmDefinition();
  }
View Full Code Here

Examples of de.desy.tine.server.alarms.TAlarmDefinition

          MsgLog.log("getAlarmFromList", "concurrent modification error "+nerr,TErrorList.semaphore_error,e,0);
          if (nerr > 3) return null;
          continue;
        }
        keepTimestamp = false;
        TAlarmDefinition ads = alm.getAlmDef();
        if (alm.isTerminated())
        { // is marked for termination
          boolean oscPinned = TAlarm.getAlmOscillationWindowPinned();
          int oscw = TAlarm.getAlmOscillationWindow();
          if (ads != null)
          {
            if (!oscPinned) oscPinned = ads.isOscillationWindowPinned();
            oscw = ads.getAlarmOscillationWindow();
          }
          if (!alm.isTransient() && !oscPinned)
          { // oscillation window too small ?
            int dt = (alm.getTimeStamp()+TAlarm.getTerminationWindow()) - (int)(System.currentTimeMillis()/1000);
            if (dt > 0 && dt < TAlarm.ALM_OSCILLATION_MAXIMUM-oscw)
            { // adjust the oscillation window
              oscw += dt;
              if (ads != null) ads.setAlarmOscillationWindow(oscw);
              else TAlarm.setAlmOscillationWindow(oscw,false);
              if (TEquipmentModuleFactory.getDebugLevel() > 0)
                DbgLog.log("getAlarmFromList","increase alarm oscillation windows to "+oscw+" clear counts");
            }
          }
          continue;
        }
        else
        { // not marked for termination
          if (alm.getCode() == code && alm.getWatchEntry() == awe)
          { // it's already in the list so remove NEW bit !
            byte dsc = alm.getDescriptor();
            byte[] adata = alm.getData();
            int dlen = ads == null ? 0 : ads.getAlarmDataArraySize();
            if (dlen > 0 && data != null && adata != null)
            { // check for alarm data changed
              for (int n=0; n<dlen && n<adata.length && n<data.length; n++)
              {
                if (data[n] != adata[n])
View Full Code Here

Examples of de.desy.tine.server.alarms.TAlarmDefinition

        }
        // apply termination flag if necessary ...
        if (!alm.isTerminated() && thisTimeStamp > alm.getTimeStamp())
        {
          int oscw = TAlarm.getAlmOscillationWindow();
          TAlarmDefinition ads = alm.getAlmDef();
          if (ads != null) oscw = ads.getAlarmOscillationWindow();
          if (alm.getClearCount() > (oscw-TAlarm.ALM_OSCILLATION_CUSHION))
          {
            byte dsc = alm.getDescriptor();
            dsc &= ~(byte)TAlarmDescriptor.NEW;
            dsc |= (byte)TAlarmDescriptor.TERMINATE;
View Full Code Here

Examples of de.desy.tine.server.alarms.TAlarmDefinition

  private TStockProperties()
  {
    initPropertyList();
    initStructDescription();
    new TAlarmMessage();
    new TAlarmDefinition();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.