This class is used for storing the information for any blocks that are created and provides methods for logging and checking run-control limits. More...
Public Member Functions | |
BlockInfo () | |
Standard Constructor - necessary for XML serialization. More... | |
object | Clone () |
Clone method (only a shallow copy). More... | |
void | LogValue (DateTime time, String shortName, String runNumber) |
Method for logging the current value of the block. The block is only logged to file if the value satisfies the logging conditions of the block More... | |
bool | OutOfRange () |
Check whether the block has exceeded the run-control settings. More... | |
void | SetRunControl (Boolean enabled) |
Method for enabling and disabling run-control. More... | |
void | SetRunControlLimits (Boolean enabled, Double low, Double high) |
Method for setting the numeric run-control limits. More... | |
void | SetRunControlLimits (Boolean enabled, String value) |
Method for setting the run-control limit for a single non-numeric value Note: data collection will pause when the value is not matched. More... | |
Static Public Member Functions | |
static Boolean | ExceedsTolerance (String currValue, String prevValue, Double tolerance) |
Check whether the current value has changed by an amount greater than the set tolerance. Note: is public for testing purposes More... | |
static Boolean | OkayToLog (DateTime timeNow, DateTime lastLogged, Double loggingRate, String currVal, String prevVal, Double tolerance, Boolean onAnyChange, Boolean onToleranceExceeded) |
Checks whether to log the block value. Note: public for the purposes of testing More... | |
Static Public Attributes | |
static readonly String | ErrorString = "Error" |
Only log the error if it is the first time. More... | |
Properties | |
String | Alias [get, set] |
Boolean | ApplyFixedFormatting [get, set] |
Boolean | ApplyFormatting [get, set] |
Boolean | BlockEnabled [get, set] |
String | BlockName [get, set] |
String | BlockUnits [get, set] |
String | CurrentValue [get, set] |
Property for getting and setting the current value of the block. If the block is set to log changes only, then the set method has to check whether the value has changed. More... | |
String | FormattedCurrentValue [get] |
Property for getting the current value of the block in a formatted state. More... | |
String | FormattedSetPointValue [get] |
Property for getting the current value of the block in a formatted state. More... | |
String | GoButton [get, set] |
String | Group [get, set] |
Boolean | InRange [get] |
Boolean | LogChangesOnly [get, set] |
Boolean | LogChangesTolerance [get, set] |
Single | LoggingRate [get, set] |
Boolean | LogToSharedFile [get, set] |
Boolean | LogValueToFile [get, set] |
Double | LowerLimit [get, set] |
String | NexusGroup [get, set] |
String | NexusName [get, set] |
int | NumberDecimalPlaces [get, set] |
String | OwningComponent [get, set] |
String | ParentVI [get, set] |
Boolean | PrevReadError [get, set] |
String | ReadControl [get, set] |
ControlType | ReadType [get, set] |
String | RunControlValue [get, set] |
Boolean | SaveSettings [get, set] |
String | SetPointValue [get, set] |
Property for getting the current setpoint value for the block. If the "write control" is not defined it returns null. More... | |
Double | Tolerance [get, set] |
Boolean | UnderRunControl [get, set] |
Double | UpperLimit [get, set] |
String | ValueFormatting [get, set] |
Boolean | Visible [get, set] |
String | WaitForControl [get, set] |
String | WriteControl [get, set] |
Private Member Functions | |
String | formatValue (Double value) |
void | logValue (DateTime time, String shortName, String runNumber) |
Method for calling the appropriate method for logging the value. More... | |
void | writeToFile (DateTime time, String shortName, String runNumber) |
Method for actually writing to file. The filename is of the form "ShortNameRunNumber_BlockName.txt". More... | |
Static Private Member Functions | |
static String | convertTimeToString (ref DateTime time) |
Method for converting a DateTime to the format need for log files More... | |
Private Attributes | |
String | _alias |
Units. More... | |
Boolean | _applyFixedFormatting = false |
Whether to apply formatting. More... | |
Boolean | _applyScientificFormatting = true |
Is it in range? More... | |
Boolean | _blockEnabled |
How many decimal points to show (deprecated) More... | |
String | _blockName |
String | _blockUnits |
Name of block. More... | |
String | _currentValue |
Log the data to a files that contains data from other blocks. More... | |
String | _goButton |
Control that is written to. More... | |
String | _group = "None" |
The component to which this block belongs. More... | |
Boolean | _inRange |
Whether the run-control settings should be saved. More... | |
DateTime | _lastLogged |
The current requested value. More... | |
Boolean | _logChangesNow |
Rate at which block value is logged to file. More... | |
Boolean | _logChangesTolerance |
Just log changes when they occur. More... | |
Single | _loggingRate |
Log to file? More... | |
Boolean | _logToSharedFile |
Log changes, but only if the value exceeds the tolerance. More... | |
Boolean | _logValueToFile |
Is the block visible? More... | |
Double | _lowerLimit |
Upper limit for run-control. More... | |
String | _nexusGroup |
NeXus name. More... | |
String | _nexusName |
The group this block belongs to. More... | |
int | _numDecimalPoints = 3 |
Whether to apply formatting. More... | |
String | _owningComponent |
Alias. More... | |
String | _parentVi |
NeXus group. More... | |
String | _previousLogValue |
Last value - used to check whether value changed. More... | |
String | _previousValue |
The latest value of the block. More... | |
Boolean | _prevReadError = false |
Marks the last time the block was logged. More... | |
String | _readControl |
VI on which it appears. More... | |
ControlType | _readType |
Control for reading current value. More... | |
String | _runcontrolValue = "" |
Lower limit for run-control. More... | |
Boolean | _saveSettings |
Non-numeric run-control value. More... | |
String | _setPointValue |
This value represents how much a value has to change for it to be logged. More... | |
Double | _tolerance |
The last value LOGGED to file. Needed for log on change. More... | |
Boolean | _underRunControl |
Control to wait for before returning (i.e. motion light). More... | |
Double | _upperLimit |
Under run-control? More... | |
String | _valueFormatting |
Boolean | _visible = true |
Is the block enabled? More... | |
String | _waitForControl |
Button to push after setting. More... | |
String | _writeControl |
The type of the read control. More... | |
This class is used for storing the information for any blocks that are created and provides methods for logging and checking run-control limits.
Definition at line 18 of file BlockInfo.cs.
|
inline |
Standard Constructor - necessary for XML serialization.
Definition at line 298 of file BlockInfo.cs.
|
inline |
Clone method (only a shallow copy).
Definition at line 690 of file BlockInfo.cs.
|
inlinestaticprivate |
Method for converting a DateTime to the format need for log files
time | The current date and time |
Definition at line 460 of file BlockInfo.cs.
|
inlinestatic |
Check whether the current value has changed by an amount greater than the set tolerance. Note: is public for testing purposes
currValue | The current value |
prevValue | The previous value |
tolerance | The tolerance |
Definition at line 476 of file BlockInfo.cs.
|
inlineprivate |
Definition at line 239 of file BlockInfo.cs.
|
inline |
Method for logging the current value of the block. The block is only logged to file if the value satisfies the logging conditions of the block
time | The current date and time |
shortName | The shortened name for the instrument |
runNumber | The current run number |
Definition at line 358 of file BlockInfo.cs.
|
inlineprivate |
Method for calling the appropriate method for logging the value.
time | The current date and time |
shortName | The shortened name for the instrument |
runNumber | The current run number |
Definition at line 401 of file BlockInfo.cs.
|
inlinestatic |
Checks whether to log the block value. Note: public for the purposes of testing
timeNow | The current time |
lastLogged | Last time logged |
currVal | The current value |
prevVal | The previous value |
tolerance | The tolerance |
onAnyChange | Log on any changes |
onToleranceExceeded | Only log if change exceeds tolerance |
Definition at line 315 of file BlockInfo.cs.
|
inline |
Check whether the block has exceeded the run-control settings.
Definition at line 553 of file BlockInfo.cs.
|
inline |
Method for enabling and disabling run-control.
enabled | Enable run-control? |
Definition at line 681 of file BlockInfo.cs.
|
inline |
Method for setting the numeric run-control limits.
enabled | Enabled run-control |
low | The lower limit for run-control |
high | The upper limit for run-control |
Definition at line 648 of file BlockInfo.cs.
|
inline |
Method for setting the run-control limit for a single non-numeric value Note: data collection will pause when the value is not matched.
enabled | Enabled run-control |
value | The run-control value |
Definition at line 671 of file BlockInfo.cs.
|
inlineprivate |
Method for actually writing to file. The filename is of the form "ShortNameRunNumber_BlockName.txt".
time | The current date and time |
shortName | The shortened name for the instrument |
runNumber | The current run number |
Definition at line 419 of file BlockInfo.cs.
References Seci.Definitions.Status.LogAllBlocksToSingleFile, and Seci.Definitions.Status.StatusBlockName.
|
private |
Units.
Definition at line 23 of file BlockInfo.cs.
|
private |
Whether to apply formatting.
Definition at line 44 of file BlockInfo.cs.
|
private |
Is it in range?
Definition at line 43 of file BlockInfo.cs.
|
private |
How many decimal points to show (deprecated)
Definition at line 48 of file BlockInfo.cs.
|
private |
Definition at line 21 of file BlockInfo.cs.
|
private |
Name of block.
Definition at line 22 of file BlockInfo.cs.
|
private |
Log the data to a files that contains data from other blocks.
Definition at line 56 of file BlockInfo.cs.
|
private |
Control that is written to.
Definition at line 34 of file BlockInfo.cs.
|
private |
The component to which this block belongs.
Definition at line 25 of file BlockInfo.cs.
|
private |
Whether the run-control settings should be saved.
Definition at line 42 of file BlockInfo.cs.
|
private |
The current requested value.
Definition at line 61 of file BlockInfo.cs.
|
private |
Rate at which block value is logged to file.
Definition at line 53 of file BlockInfo.cs.
|
private |
Just log changes when they occur.
Definition at line 54 of file BlockInfo.cs.
|
private |
Log to file?
Definition at line 52 of file BlockInfo.cs.
|
private |
Log changes, but only if the value exceeds the tolerance.
Definition at line 55 of file BlockInfo.cs.
|
private |
Is the block visible?
Definition at line 51 of file BlockInfo.cs.
|
private |
Upper limit for run-control.
Definition at line 39 of file BlockInfo.cs.
|
private |
NeXus name.
Definition at line 28 of file BlockInfo.cs.
|
private |
The group this block belongs to.
Definition at line 27 of file BlockInfo.cs.
|
private |
Whether to apply formatting.
Definition at line 45 of file BlockInfo.cs.
|
private |
Alias.
Definition at line 24 of file BlockInfo.cs.
|
private |
NeXus group.
Definition at line 30 of file BlockInfo.cs.
|
private |
Last value - used to check whether value changed.
Definition at line 58 of file BlockInfo.cs.
|
private |
The latest value of the block.
Definition at line 57 of file BlockInfo.cs.
|
private |
Marks the last time the block was logged.
Definition at line 62 of file BlockInfo.cs.
|
private |
VI on which it appears.
Definition at line 31 of file BlockInfo.cs.
|
private |
Control for reading current value.
Definition at line 32 of file BlockInfo.cs.
|
private |
Lower limit for run-control.
Definition at line 40 of file BlockInfo.cs.
|
private |
Non-numeric run-control value.
Definition at line 41 of file BlockInfo.cs.
|
private |
This value represents how much a value has to change for it to be logged.
Definition at line 60 of file BlockInfo.cs.
|
private |
The last value LOGGED to file. Needed for log on change.
Definition at line 59 of file BlockInfo.cs.
|
private |
Control to wait for before returning (i.e. motion light).
Definition at line 37 of file BlockInfo.cs.
|
private |
Under run-control?
Definition at line 38 of file BlockInfo.cs.
|
private |
Definition at line 46 of file BlockInfo.cs.
|
private |
Is the block enabled?
Definition at line 49 of file BlockInfo.cs.
|
private |
Button to push after setting.
Definition at line 35 of file BlockInfo.cs.
|
private |
The type of the read control.
Definition at line 33 of file BlockInfo.cs.
|
static |
Only log the error if it is the first time.
Definition at line 64 of file BlockInfo.cs.
|
getset |
Definition at line 69 of file BlockInfo.cs.
Referenced by Seci.BlockDictionary.Add(), Seci.BlockDictionary.Insert(), Seci.BlockDictionary.IsAliasUnique(), and Seci.BlockDictionary.Replace().
|
getset |
Definition at line 88 of file BlockInfo.cs.
|
getset |
Definition at line 87 of file BlockInfo.cs.
|
getset |
Definition at line 85 of file BlockInfo.cs.
Referenced by Seci.Remoting.Bridge.SetBlockValue().
|
getset |
Definition at line 67 of file BlockInfo.cs.
Referenced by Seci.BlockDictionary.Replace().
|
getset |
Definition at line 68 of file BlockInfo.cs.
Referenced by SeciUserInterface.Forms.RunControlViewer.updateValues().
|
getset |
Property for getting and setting the current value of the block. If the block is set to log changes only, then the set method has to check whether the value has changed.
Definition at line 126 of file BlockInfo.cs.
|
get |
Property for getting the current value of the block in a formatted state.
Definition at line 163 of file BlockInfo.cs.
|
get |
Property for getting the current value of the block in a formatted state.
Definition at line 213 of file BlockInfo.cs.
|
getset |
Definition at line 78 of file BlockInfo.cs.
Referenced by Seci.Standard.DaeMonitor.createEntry(), and Seci.Remoting.Bridge.SetBlockValue().
|
getset |
Definition at line 72 of file BlockInfo.cs.
|
get |
Definition at line 84 of file BlockInfo.cs.
|
getset |
Definition at line 91 of file BlockInfo.cs.
|
getset |
Definition at line 92 of file BlockInfo.cs.
|
getset |
Definition at line 101 of file BlockInfo.cs.
|
getset |
Definition at line 96 of file BlockInfo.cs.
|
getset |
Definition at line 94 of file BlockInfo.cs.
|
getset |
Definition at line 82 of file BlockInfo.cs.
|
getset |
Definition at line 74 of file BlockInfo.cs.
|
getset |
Definition at line 73 of file BlockInfo.cs.
|
getset |
Definition at line 90 of file BlockInfo.cs.
|
getset |
Definition at line 71 of file BlockInfo.cs.
|
getset |
Definition at line 75 of file BlockInfo.cs.
Referenced by Seci.Remoting.Bridge.GetRawBlockValue(), Seci.Remoting.Bridge.GetRawSetpoint(), Seci.Remoting.Bridge.SetBlockValue(), and Seci.Remoting.Bridge.SetRawBlockValue().
|
getset |
Definition at line 97 of file BlockInfo.cs.
|
getset |
Definition at line 76 of file BlockInfo.cs.
Referenced by Seci.Standard.DaeMonitor.createEntry(), and Seci.Remoting.Bridge.GetRawBlockValue().
|
getset |
Definition at line 99 of file BlockInfo.cs.
Referenced by Seci.Standard.DaeMonitor.createEntry().
|
getset |
Definition at line 83 of file BlockInfo.cs.
|
getset |
Definition at line 95 of file BlockInfo.cs.
|
getset |
Property for getting the current setpoint value for the block. If the "write control" is not defined it returns null.
Definition at line 190 of file BlockInfo.cs.
|
getset |
Definition at line 93 of file BlockInfo.cs.
|
getset |
Definition at line 80 of file BlockInfo.cs.
|
getset |
Definition at line 81 of file BlockInfo.cs.
|
getset |
Definition at line 89 of file BlockInfo.cs.
|
getset |
Definition at line 86 of file BlockInfo.cs.
|
getset |
Definition at line 79 of file BlockInfo.cs.
|
getset |
Definition at line 77 of file BlockInfo.cs.
Referenced by Seci.Standard.DaeMonitor.createEntry(), Seci.Remoting.Bridge.GetRawSetpoint(), Seci.Remoting.Bridge.SetBlockValue(), and Seci.Remoting.Bridge.SetRawBlockValue().