2 using System.Collections.Generic;
4 using Seci.Definitions;
6 namespace Seci.Remoting
26 return LabView.LabViewApp.GetRawValue(vi, control);
45 return LabView.LabViewApp.SetRawValue(vi, control, value);
57 List<String> vis = LabView.LabViewApp.GetListOfAllVIs(
true);
80 return Managers.BlockMgr.GetBlockValue(blockName);
92 BlockInfo temp = Managers.BlockMgr.Blocks[blockName.ToLower()];
111 BlockInfo temp = Managers.BlockMgr.Blocks[blockName.ToLower()];
124 BlockInfo temp = Managers.BlockMgr.Blocks[blockName.ToLower()];
143 public static String[]
GetAllBlockValues(Boolean visibleOnly, Boolean includeSetpoint, Boolean includeGroup, Boolean includeWaitState)
147 return Managers.BlockMgr.GetAllBlockValues(visibleOnly, includeSetpoint, includeGroup, includeWaitState).ToArray();
162 return GetBlockNames(includeHidden,
false);
170 public static String[]
GetBlockNames(Boolean includeHidden, Boolean includeAliases)
174 String[] keys = Managers.BlockMgr.Blocks.GetKeys();
175 List<String> results =
new List<string>();
177 for (
int i = 0; i < keys.GetLength(0); ++i)
179 var temp = Managers.BlockMgr.Blocks[keys[i]];
180 if (!includeHidden && !temp.Visible)
185 results.Add(temp.BlockName);
187 if (!String.IsNullOrEmpty(temp.Alias))
189 results.Add(temp.Alias);
193 return results.ToArray();
209 String[] keys = Managers.BlockMgr.Blocks.GetKeys();
210 String[] aliases = Managers.BlockMgr.Blocks.GetAliases();
212 String[,] results =
new String[keys.GetLength(0), 2];
214 for (
int i = 0; i < keys.GetLength(0); ++i)
216 results[i, 0] = keys[i];
217 results[i, 1] = aliases[i];
237 return Managers.BlockMgr.Blocks.GetLabVIEWInfo();
259 if (!checkForWaitFor(blockName))
263 if (blocks.
Count != 0)
278 if (!String.IsNullOrEmpty(temp.
GoButton))
280 LabView.LabViewApp.SetValue(temp.ParentVI, temp.GoButton,
true);
284 System.Threading.Thread.Sleep(1000);
307 return Managers.BlockMgr.Blocks[blockName].UnderRunControl;
321 return checkForWaitFor(blockName);
337 if (Managers.BlockMgr.Blocks.Contains(blockName))
339 if (!String.IsNullOrEmpty(Managers.BlockMgr.Blocks[blockName].WaitForControl))
341 return Convert.ToBoolean(LabView.LabViewApp.GetValue(Managers.BlockMgr.Blocks[blockName].ParentVI, Managers.BlockMgr.Blocks[blockName].WaitForControl));
360 String[,] results =
new String[blocks.Count, 5];
364 for (
int i = 0; i < blocks.Count; ++i)
366 results[count, 0] = blocks[i].BlockName;
367 results[count, 1] = blocks[i].NexusName;
368 results[count, 2] = blocks[i].NexusGroup;
369 results[count, 3] = blocks[i].ParentVI;
370 results[count, 4] = blocks[i].ReadControl;
390 return !Managers.BlockMgr.Blocks[blockName].OutOfRange();
395 Managers.BlockMgr.LogValuesEnabled = enable;
400 return Managers.BlockMgr.LogValuesEnabled;
415 Standard.Dae.BeginRun();
435 Standard.Dae.EndRun();
456 Standard.Dae.PauseRun();
477 Standard.Dae.ResumeRun();
498 Standard.Dae.AbortRun();
519 Standard.Dae.SaveRun();
538 return Standard.Dae.RunStatus;
547 return Standard.Dae.GetFormattedValues(
true, Definitions.Status.IsMuonInstrument).ToArray();
552 #region Configurations
562 return Managers.ConfigurationMgr.ConfigName;
578 System.IO.DirectoryInfo di =
new System.IO.DirectoryInfo(Status.ConfigDir);
580 System.IO.FileInfo[] files = di.GetFiles(
"*.conf");
582 String[] configs =
new String[files.GetLength(0)];
584 for (
int i = 0; i < files.GetLength(0); ++i)
586 configs[i] = files[i].Name;
612 if (!String.IsNullOrEmpty(configName))
614 if (configName.EndsWith(
".conf") || configName.EndsWith(
".comp"))
616 return Managers.ConfigurationMgr.RemoteConfigurationChange(configName);
630 return Seci.Managers.SeciMgr.IsBusy;
642 Managers.SeciMgr.ClearGraphs();
static Object GetLabViewValue(String vi, String control)
Get value directly from LabVIEW with no checks or conversions.
Boolean Contains(String blockName)
Wrapper for standard Dictionary "Contains" All keys are lowercase.
static Boolean SaveRun()
Asks the DAE to save a run - does not check to see if the run actually saved.
static String[] GetBlockNames(Boolean includeHidden)
Get the names of all the blocks
static Boolean checkForWaitFor(String blockName)
Does the actual checking of the wait for indicator
static Boolean BlocksLoggingStatus()
static Object GetRawBlockValue(String blockName)
static void EnableBlocksLogging(Boolean enable)
static String[] GetListOfConfigs()
Get a list of the available configurations (does not currently include components).
This class is used for storing the information for any blocks that are created and provides methods f...
static String GetBlockValue(String blockName)
Get the current value of a block. The block can be in the configuration or any of the components...
static String GetRunStatus()
Get the current run status from the DAE.
static String[] GetBlockNames(Boolean includeHidden, Boolean includeAliases)
Get the names of all the blocks
static String[,] GetBlockAliases()
Get the aliases of all the blocks
This class is for accessing Seci from an external source. All the COM and Remoting calls go through t...
static Object GetRawSetpoint(String blockName)
Get the setpoint value for a block. The block can be in the configuration or any of the components...
static Boolean SetLabViewValue(String vi, String control, Object value)
Set value directly in LabVIEW with no checks or conversions.
static int ChangeConfig(String configName)
Request a change of configuration. May return true, but this does not mean the configuration will cha...
static String[,] GetBlocks()
Get all the block information necessary for a "GetBlocks" in Open GENIE Should not be used as CSET sh...
static Boolean SetBlockValue(String blockName, String value)
Set the setpoint value of a block. The block can be in the configuration or any of the components...
static Boolean UnderRunControl(String blockName)
static void ClearGraphs()
Requests that any graphs in the user interface are reset
static Boolean IsInRange(String blockName)
See if a block is currently within the run-control bounds. Note: returns true if it is not under run-...
static String GetCurrentConfig()
Get the name of the current configuration.
static Boolean EndRun()
Asks the DAE to end a run - does not check to see if the run actually ended.
static Boolean PauseRun()
Asks the DAE to pause a run - does not check to see if the run actually paused.
static String[] GetVIsFullpath()
static Boolean SetRawBlockValue(String blockName, object value)
static Boolean AbortRun()
Asks the DAE to abort a run - does not check to see if the run actually aborted.
static String[] GetRunInfo()
Get the current run information from the DAE.
Specialised version of the Dictionary class which can be converted to XML. Also has some additional s...
static Boolean ResumeRun()
Asks the DAE to resume a paused run - does not check to see if the run actually resumed.
static String[] GetAllBlockValues(Boolean visibleOnly, Boolean includeSetpoint, Boolean includeGroup, Boolean includeWaitState)
Get the current values of all the blocks, including any in the components.
static Boolean BeginRun()
Asks the DAE to begin a run - does not check to see if the run actually started.
static Boolean CheckForWaitingState(String blockName)
Check to see if a block 'wait for control' is true - if so it means the current block value may be un...
static String[,] GetNexusInfo()
Gets the NeXus information for all the blocks, including those in any components. Currently...