Esempio n. 1
0
 /** Update the enablement state in case of change */
 private final void updateEnabledState(final boolean new_enabled_state) {
   // Any change?
   if (new_enabled_state == enabled) return;
   enabled = new_enabled_state;
   // In case this arrived after shutdown, don't log it.
   if (!is_running) return;
   if (enabled) { // If we have the 'current' value of the PV...
     VType value;
     synchronized (this) {
       value = most_recent_value;
     }
     if (value != null) { // Add to the buffer with timestamp 'now' to show
       // the re-enablement
       value = VTypeHelper.transformTimestampToNow(value);
       addValueToBuffer(value);
     }
   } else addInfoToBuffer(ValueButcher.createDisabled());
 }
Esempio n. 2
0
 /** @param value Value to log with 'now' as time stamp */
 private void logValueAsNow(final VType value) {
   if (value == null) logDisconnected();
   else
     // Transform value to have 'now' as time stamp
     samples.addLiveSample(VTypeHelper.transformTimestampToNow(value));
 }