This class contains the reference to the LabVIEW VI and keeps a list of all the front panel controls. There are methods for getting and setting control values on the panel.
More...
|
String | GetControlType (String name) |
|
String[] | getControlValue (String controlName) |
| Method for retrieving a value from a control. Only returns values for controls inside the dictionary. If the control is in a cluster the name of the control is of the form: "clustername:controlname". More...
|
|
void | GetFrontPanelTitle (strongnameLabview.VirtualInstrument exporter, String fileName) |
| Gets the title of the front panel More...
|
|
List< String > | getListOfControls () |
| Method for requesting a list of the controls on the front panel of this VI. More...
|
|
Object | getRawControlValue (String controlName) |
| Method for return a control value straight from DCOM with no clean-up. The control does not have to be present inside the controls dictionary. More...
|
|
void | getVIControls (strongnameLabview.VirtualInstrument exporter, String fileName, Boolean includeClusters) |
| The method that initialises the finding of the controls on the front panel. The controls are read from an XML file which is outputted by a VI designed for this purpose. In versions of LabVIEW before 8.0 it was possible to produce this file via a DCOM call, but this functionality was removed. More...
|
|
Object[] | getWholeCluster (string clusterName) |
| Method for grabbing a whole cluster directly from LabVIEW. No formatting or checking applied. Cluster are not stored in the dictionary as they are not required for blocks. More...
|
|
| LabViewPanel (strongnameLabview.VirtualInstrument VI) |
| Constructor More...
|
|
void | setControlValue (String controlName, Object value) |
| Method for setting a control value. Only sets values for controls inside the dictionary. If the control is in a cluster the name of the control is of the form: "clustername:controlname". More...
|
|
void | setRawControlValue (String controlName, Object value) |
| Method for setting a control value via DCOM with no checks from SECI. The control does not have to be present inside the controls dictionary. More...
|
|
void | setWholeCluster (string clusterName, Object[] values) |
| Method for setting a whole cluster directly. No formatting or checking applied. Cluster are not stored in the dictionary as they are not required for blocks. More...
|
|
|
void | AddControlToDictionary (Controls.LvControl newControl) |
| Method for adding controls to the control dictionary More...
|
|
void | addListbox (StreamReader sr, String boxName, SerialisableList< int > clusterIndices) |
| Method for adding a Listbox control to the dictionary. A Listbox is like a enum; however the enum data is present in the XML, so it can be stored as a ring. This control is rarely used. More...
|
|
void | addRadioButton (StreamReader sr, String radioName, SerialisableList< int > clusterIndices) |
| Method for adding a Radio Button control to the dictionary. Radio buttons only return the index of the selected option, so it is necessary to keep a list of the possible options. More...
|
|
void | addRing (StreamReader sr, String ringName, SerialisableList< int > clusterIndices) |
| Method for adding a Ring control to the dictionary. A Ring is like an enum, but it does not have to return a number value. More...
|
|
void | addSimpleControl (StreamReader sr, String name, String type, SerialisableList< int > clusterIndices) |
| Method for adding simple controls to the controls dictionary. Used for Numerics, Booleans, Strings, Enums and Arrays. More...
|
|
void | extractVIControls (String fileName, Boolean includeClusters) |
| Main method for extracting the control information from the XML file that was produced by the exportVIControls method. The XML produced contains a lot of information that is not required by SECI and it is quite hard to read. It was felt that simplest way to extract the required information was to read the file in line by line. The controls start with CONTROL ID and it is possible for them to be nested. Warning: this code is quite hard to follow and it contains some nasty workrounds. More...
|
|
void | getClusterInfo (StreamReader sr, String clusterName, SerialisableList< int > clusterList, Boolean includeClusters) |
| Method for getting the information from a cluster. A cluster is a container for other types of control and can be nested inside another cluster. The controls inside a cluster are referred to by their index number, not their names. There is a recursive call to this function for clusters within clusters. More...
|
|
|
static void | exportVIControls (strongnameLabview.VirtualInstrument exporter, String fileName, String saveFile) |
| Method for extracting the control information from the VI. Uses an intermediate VI for saving the information as XML. More...
|
|
static String | findControlName (String line) |
| Method for extracting the control name. More...
|
|
static String | findControlType (String line) |
| Method for determining the control type and what it should be treated as. More...
|
|
This class contains the reference to the LabVIEW VI and keeps a list of all the front panel controls. There are methods for getting and setting control values on the panel.
Definition at line 13 of file LabViewPanel.cs.
Seci.LabView.LabViewPanel.LabViewPanel |
( |
strongnameLabview.VirtualInstrument |
VI | ) |
|
|
inline |
Method for adding controls to the control dictionary
- Parameters
-
newControl | The control to add |
Definition at line 559 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.addListbox |
( |
StreamReader |
sr, |
|
|
String |
boxName, |
|
|
SerialisableList< int > |
clusterIndices |
|
) |
| |
|
inlineprivate |
Method for adding a Listbox control to the dictionary. A Listbox is like a enum; however the enum data is present in the XML, so it can be stored as a ring. This control is rarely used.
- Parameters
-
sr | The stream reader used to read the xml file |
boxName | The name of the Listbox |
clusterIndices | The control may be part of a cluster or clusters, these indices indicate where in the cluster this control occurs |
Definition at line 512 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.addRadioButton |
( |
StreamReader |
sr, |
|
|
String |
radioName, |
|
|
SerialisableList< int > |
clusterIndices |
|
) |
| |
|
inlineprivate |
Method for adding a Radio Button control to the dictionary. Radio buttons only return the index of the selected option, so it is necessary to keep a list of the possible options.
- Parameters
-
sr | The stream reader used to read the xml file |
radioName | The name of the Radio Button control |
clusterIndices | The control may be part of a cluster or clusters, these indices indicate where in the cluster this control occurs. |
Definition at line 584 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.addRing |
( |
StreamReader |
sr, |
|
|
String |
ringName, |
|
|
SerialisableList< int > |
clusterIndices |
|
) |
| |
|
inlineprivate |
Method for adding a Ring control to the dictionary. A Ring is like an enum, but it does not have to return a number value.
- Parameters
-
sr | The stream reader used to read the xml file |
ringName | The name of the Ring |
clusterIndices | The control may be part of a cluster or clusters, these indices indicate where in the cluster this control occurs |
Definition at line 459 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.addSimpleControl |
( |
StreamReader |
sr, |
|
|
String |
name, |
|
|
String |
type, |
|
|
SerialisableList< int > |
clusterIndices |
|
) |
| |
|
inlineprivate |
Method for adding simple controls to the controls dictionary. Used for Numerics, Booleans, Strings, Enums and Arrays.
- Parameters
-
sr | The stream reader used to read the xml file |
name | The name of the control |
type | The type of the control |
clusterIndices | The control may be part of a cluster or clusters, these indices indicate where in the cluster this control occurs. |
Definition at line 375 of file LabViewPanel.cs.
static void Seci.LabView.LabViewPanel.exportVIControls |
( |
strongnameLabview.VirtualInstrument |
exporter, |
|
|
String |
fileName, |
|
|
String |
saveFile |
|
) |
| |
|
inlinestaticprivate |
Method for extracting the control information from the VI. Uses an intermediate VI for saving the information as XML.
- Parameters
-
exporter | The VI that is used to export the controls on a VI |
fileName | The full filepath of the VI |
saveFile | The file to save the XML to |
Definition at line 95 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.extractVIControls |
( |
String |
fileName, |
|
|
Boolean |
includeClusters |
|
) |
| |
|
inlineprivate |
Main method for extracting the control information from the XML file that was produced by the exportVIControls method. The XML produced contains a lot of information that is not required by SECI and it is quite hard to read. It was felt that simplest way to extract the required information was to read the file in line by line. The controls start with CONTROL ID and it is possible for them to be nested. Warning: this code is quite hard to follow and it contains some nasty workrounds.
- Parameters
-
fileName | The full filepath of the XML file |
includeClusters | Whether to include clusters |
Definition at line 122 of file LabViewPanel.cs.
static String Seci.LabView.LabViewPanel.findControlName |
( |
String |
line | ) |
|
|
inlinestaticprivate |
Method for extracting the control name.
- Parameters
-
line | The line of text extracted from the file |
- Returns
- String listing the control type - returns null if name not found
Definition at line 350 of file LabViewPanel.cs.
static String Seci.LabView.LabViewPanel.findControlType |
( |
String |
line | ) |
|
|
inlinestaticprivate |
Method for determining the control type and what it should be treated as.
- Parameters
-
line | The line of text extracted from the file |
- Returns
- String listing the control type - returns null if it does not recognise the type
Definition at line 264 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.getClusterInfo |
( |
StreamReader |
sr, |
|
|
String |
clusterName, |
|
|
SerialisableList< int > |
clusterList, |
|
|
Boolean |
includeClusters |
|
) |
| |
|
inlineprivate |
Method for getting the information from a cluster. A cluster is a container for other types of control and can be nested inside another cluster. The controls inside a cluster are referred to by their index number, not their names. There is a recursive call to this function for clusters within clusters.
- Parameters
-
sr | The stream reader used to read the xml file |
clusterName | The name of the cluster |
clusterList | The cluster may be part of another cluster or clusters, these indices - Parameters
-
includeClusters | Sets whether to include clusters |
indicate where in the cluster this cluster occurs. |
Definition at line 631 of file LabViewPanel.cs.
String Seci.LabView.LabViewPanel.GetControlType |
( |
String |
name | ) |
|
|
inline |
String [] Seci.LabView.LabViewPanel.getControlValue |
( |
String |
controlName | ) |
|
|
inline |
Method for retrieving a value from a control. Only returns values for controls inside the dictionary. If the control is in a cluster the name of the control is of the form: "clustername:controlname".
- Parameters
-
controlName | The name of the control |
- Returns
- String array because the control may be an array
Definition at line 786 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.GetFrontPanelTitle |
( |
strongnameLabview.VirtualInstrument |
exporter, |
|
|
String |
fileName |
|
) |
| |
|
inline |
Gets the title of the front panel
- Parameters
-
exporter | The VI used to get the title |
fileName | The filepath of the VI to get the title of |
Definition at line 49 of file LabViewPanel.cs.
List<String> Seci.LabView.LabViewPanel.getListOfControls |
( |
| ) |
|
|
inline |
Method for requesting a list of the controls on the front panel of this VI.
- Returns
- List of Strings.
Definition at line 743 of file LabViewPanel.cs.
Object Seci.LabView.LabViewPanel.getRawControlValue |
( |
String |
controlName | ) |
|
|
inline |
Method for return a control value straight from DCOM with no clean-up. The control does not have to be present inside the controls dictionary.
- Parameters
-
controlName | The name of the control |
- Returns
- An Object
Definition at line 808 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.getVIControls |
( |
strongnameLabview.VirtualInstrument |
exporter, |
|
|
String |
fileName, |
|
|
Boolean |
includeClusters |
|
) |
| |
|
inline |
The method that initialises the finding of the controls on the front panel. The controls are read from an XML file which is outputted by a VI designed for this purpose. In versions of LabVIEW before 8.0 it was possible to produce this file via a DCOM call, but this functionality was removed.
- Parameters
-
exporter | The VI that is used to export the controls on a VI |
fileName | The full filepath of the VI |
includeClusters | Whether to include clusters |
Definition at line 68 of file LabViewPanel.cs.
Object [] Seci.LabView.LabViewPanel.getWholeCluster |
( |
string |
clusterName | ) |
|
|
inline |
Method for grabbing a whole cluster directly from LabVIEW. No formatting or checking applied. Cluster are not stored in the dictionary as they are not required for blocks.
- Parameters
-
clusterName | The name of the cluster |
- Returns
- Object array
Definition at line 830 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.setControlValue |
( |
String |
controlName, |
|
|
Object |
value |
|
) |
| |
|
inline |
Method for setting a control value. Only sets values for controls inside the dictionary. If the control is in a cluster the name of the control is of the form: "clustername:controlname".
- Parameters
-
controlName | The name of the control |
value | The value to set |
Definition at line 857 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.setRawControlValue |
( |
String |
controlName, |
|
|
Object |
value |
|
) |
| |
|
inline |
Method for setting a control value via DCOM with no checks from SECI. The control does not have to be present inside the controls dictionary.
- Parameters
-
controlName | The name of the control |
value | The value to set |
Definition at line 871 of file LabViewPanel.cs.
void Seci.LabView.LabViewPanel.setWholeCluster |
( |
string |
clusterName, |
|
|
Object[] |
values |
|
) |
| |
|
inline |
Method for setting a whole cluster directly. No formatting or checking applied. Cluster are not stored in the dictionary as they are not required for blocks.
- Parameters
-
clusterName | The name of the cluster |
values | The cluster values |
Definition at line 884 of file LabViewPanel.cs.
Dictionary for containing the VI's control information. The control's name is the key.
Definition at line 23 of file LabViewPanel.cs.
String Seci.LabView.LabViewPanel._frontPanelTitle |
|
private |
strongnameLabview.VirtualInstrument Seci.LabView.LabViewPanel._VI |
|
private |
String Seci.LabView.LabViewPanel.FrontPanelTitle |
|
get |
strongnameLabview.VirtualInstrument Seci.LabView.LabViewPanel.VI |
|
get |
The documentation for this class was generated from the following file:
- /isis2/instcontrol_temp/NewSECI/Sample_Environment_Control_Interface/Seci/LabView/LabViewPanel.cs