.Net API ziModule¶
All LabOne Modules have the same interface and are implemented through the ziModule
class.
For a detailed introduction into the LabOne Modules take a look at the
dedicated documentation section.
The following modules exist for the .Net API:
- Sweep Module
- Device Settings Module
- PLL Advisor Module, DEPRECATED (use PID Advisor instead)
- PID Advisor Module
- AWG Module
- Impedance Module
- Scope Module
- Multi-Device Sync Module
- Data Acquisition Module
- Precompensation Advisor Module
- SW Trigger Module DEPRECATED
- Spectrum Module DEPRECATED
An instance of a LabOne Module can be create through the ziDotNET
class.
Common LabOne Module interface¶
execute¶
void execute()
Start the recorder.
After that command any trigger will start the measurement. Subscription or unsubscription is not possible until the recording is finished.
trigger¶
void trigger()
Execute a manual trigger.
clear¶
void clear()
End the module thread.
finish¶
void finish()
Stop the execution.
The execution may be restarted by calling 'execute' again.
finished¶
bool finished()
Check if the recording has finished.
Returns Flag if the recording is finished.
progress¶
double progress()
Reports the progress of the execution.
Returns Progress with a number between 0 and 1.
read¶
Lookup read()
Read the module output data.
If the module execution is still ongoing only a subset of data is returned. If huge data sets are produced call this method to keep memory usage reasonable.
Returns A Lookup with the module output data.
get¶
Lookup get(String^ path)
Return a Lookup with all nodes from the specified sub-tree.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path string of the node. Use wild card to select all. |
Returns A Lookup with all nodes from the specified sub-tree.
getInt¶
int64_t getInt(String^ path)
Get a integer value from the specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
Returns Integer value.
getInt¶
int64_t getInt(String^ path)
Get a integer value from the specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
Returns Integer value.
getDouble¶
double getDouble(String^ path)
Get a double value from the specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
Returns Double value.
getDouble¶
double getDouble(String^ path)
Get a double value from the specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
Returns Double value.
getString¶
String getString(String^ path)
Get a string value from the specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
Returns String value.
getString¶
String getString(String^ path)
Get a string value from the specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
Returns String value.
listNodes¶
List<String^> listNodes(String^ path, ZIListNodes_enum flags)
This function returns a list of node names found at the specified path.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path for which the nodes should be listed. The path may contain wildcards so that the returned nodes do not necessarily have to have the same parents. |
flags | ZIListNodes_enum | in | Flags specifying how the selected nodes are listed (seeZIListNodes_enum) |
Returns List of node names.
listNodes¶
List<String^> listNodes(String^ path, ZIListNodes_enum flags)
This function returns a list of node names found at the specified path.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path for which the nodes should be listed. The path may contain wildcards so that the returned nodes do not necessarily have to have the same parents. |
flags | ZIListNodes_enum | in | Flags specifying how the selected nodes are listed (seeZIListNodes_enum) |
Returns List of node names.
listNodesJSON¶
String listNodesJSON(String^ path, ZIListNodes_enum flags)
Returns a list of nodes with description found at the specified path.
HF2 devices do not support this functionality.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path for which the nodes should be listed. The path may contain wildcards so that the returned nodes do not necessarily have to have the same parents. |
flags | ZIListNodes_enum | in | Flags specifying how the selected nodes are listed (seeZIListNodes_enum) |
Returns JSON formatted string (nodepath:information).
listNodesJSON¶
String listNodesJSON(String^ path, ZIListNodes_enum flags)
Returns a list of nodes with description found at the specified path.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path for which the nodes should be listed. The path may contain wildcards so that the returned nodes do not necessarily have to have the same parents. |
flags | ZIListNodes_enum | in | Flags specifying how the selected nodes are listed (seeZIListNodes_enum) |
Returns JSON formatted string (nodepath:information).
setByte¶
void setByte(String^ path, String^ value)
Set the value as byte array (string) for a specified node.
The command blocks until the data server has acknowledgement the set request.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | String^ | in | Value of the node. |
setByte¶
void setByte(String^ path, String^ value)
Set the value as byte array (string) for a specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | String^ | in | Value of the node. |
setInt¶
void setInt(String^ path, int64_t value)
Set the value as integer for a specified node.
The command blocks until the data server has acknowledgement the set request.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | int64_t | in | Value of the node. |
setInt¶
void setInt(String^ path, int64_t value)
Set the value as integer for a specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | int64_t | in | Value of the node. |
setDouble¶
void setDouble(String^ path, double value)
Set the value as double for a specified node.
The command blocks until the data server has acknowledgement the set request.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | double | in | Value of the node. |
setDouble¶
void setDouble(String^ path, double value)
Set the value as double for a specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | double | in | Value of the node. |
setString¶
void setString(String^ path, String^ value)
Set the value as string for a specified node.
The command blocks until the data server has acknowledgement the set request.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | String^ | in | Value of the node. |
setString¶
void setString(String^ path, String^ value)
Set the value as string for a specified node.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path to the node holding the value |
value | String^ | in | Value of the node. |
setVector¶
void setVector(String^ path, ZIVector^ vector)
Sets a parameter to the specified vector.
This function is used to configure (set) parameters which have vector types.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path of the module parameter to set. |
vector | ZIVector^ | in | Vector data. |
setVector¶
void setVector(String^ path, ZIVector^ vector)
Sets a parameter to the specified vector.
This function is used to configure (set) parameters which have vector types.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path of the module parameter to set. |
vector | ZIVector^ | in | Vector data. |
subscribe¶
void subscribe(String^ path)
Subscribe to one or several nodes.
Fetch data with the poll command. In order to avoid fetching old data that is still in the buffer, execute a sync command before subscribing to data streams.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path string of the node. Use wild card to select all. |
subscribe¶
void subscribe(String^ path)
Subscribe to one or several nodes.
After subscription the module execution can be started with the 'execute' command. During the module execution paths can not be subscribed or unsubscribed.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path string of the node. Use wild card to select all. |
unsubscribe¶
void unsubscribe(String^ path)
Unsubscribe from one or several nodes.
Use this command after recording to avoid buffer overflows that may increase the latency of other command.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path string of the node. Use wild card to select all. |
unsubscribe¶
void unsubscribe(String^ path)
Unsubscribe from one or several nodes.
During the module execution paths can not be subscribed or unsubscribed.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
path | String^ | in | Path string of the node. Use wild card to select all. |
save¶
void save(String^ fileName)
Save measured data to file.
Parameters
Name | Type | Direction | Description |
---|---|---|---|
fileName | String^ | in | File name string (without extension). |