dataIO(name[, mandparams, optparams]) -> creates new instance of dataIO plugin ‘name’
This is the constructor for a dataIO plugin. It initializes an new instance of the plugin specified by ‘name’. The initialisation parameters are parsed and unnamed parameters are used in their incoming order to fill first mandatory parameters and afterwards optional parameters. Parameters may be passed with name as well but after the first named parameter no more unnamed parameters are allowed.
See pluginHelp(name) for detail information about the specific initialisation parameters.
Parameters: | name : {str}
mandparams : {variant(s)}
optparams : {variant(s)}, optional
|
---|---|
Returns: | inst : {dataIO}
|
This method triggers a new data acquisition. This method immediately returns even if the acquisition is not finished yet. Use getVal or copyVal to get the acquired data. Both methods block until the data is available.
Parameters: | trigger : {int}, optional
|
---|
Returns a deep copy of the recently acquired data (for grabber and ADDA only) of the camera or AD-converter device. The deep copy sometimes requires one copy operation more than the similar command getVal. However, getVal only returns a reference to the plugin internal data structure whose values might be changed if another data acquisition is started.
If no acquisition has been triggered, this method raises a RuntimeError. If the acquisition is not finished yet, this method blocks and waits until the end of the acquisition.
Parameters: | dataObject : {dataObject}
|
---|---|
Raises: | RuntimeError :
|
See also
If the auto grabbing flag is set, the camera acquisition is automatically and continuously triggered if at least one live image is connected. This is an undesired behaviour if a measurement is started where the acquisition should be controlled by a specific script or something similar. Then disable the auto grabbing property. All connected live images will then get new images when getVal or copyVal is called by the script. The live image timer is disabled.
This method disables the auto grabbing flag.
See also
If the auto grabbing flag is set, the camera acquisition is automatically and continuously triggered if at least one live image is connected. This is an undesired behaviour if a measurement is started where the acquisition should be controlled by a specific script or something similar. Then disable the auto grabbing property. All connected live images will then get new images when getVal or copyVal is called by the script. The live image timer is disabled.
This method enables the auto grabbing flag.
See also
Every plugin can define further functions that can for instance be used in order to call specific calibration routines of cameras or actuators. This general method is used to call one of these specific functions registered under funcName.
Parameters: | funcName : {str}
param1 : {variant}, optional
|
---|---|
Returns: | out : {variant, list of variants}.
|
See also
execFuncsInfo
If the auto grabbing flag is set, the camera acquisition is automatically and continuously triggered if at least one live image is connected. This is an undesired behaviour if a measurement is started where the acquisition should be controlled by a specific script or something similar. Then disable the auto grabbing property. All connected live images will then get new images when getVal or copyVal is called by the script. The live image timer is disabled.
Returns: | auto grabbing flag : {bool}
|
---|
See also
Every plugin can define further functions, that are called by plugin.exec(‘funcName’ [,param1, param2...]). This can for instance be used in order to call specific calibration routines of cameras or actuators. This method allows printing information about available functions of this type.
Parameters: | funcName : {str}, optional
detailLevel : {dict}, optional
|
---|---|
Returns: | out : {None or dict}
|
See also
Returns the current value of the internal plugin parameter with ‘name’. The type of the returned value depends on the real type of the internal plugin, which may be:
The name of the parameter must have the following form:
Parameters: | name : {str}
|
---|---|
Returns: | out : {variant}
|
Raises: | ValueError :
|
See also
Each plugin defines a set of parameters, where each parameter has got a name and maps to any value. The value is represented by the C++ class ito::ParamBase and can have one of the following types:
Using one of the parameter names, its current value can be obtained by getParam(‘name’) and is writable by setParam(‘name’, newValue) (if not read-only)
Returns: | out : {list}
|
---|
See also
Each plugin defines a set of parameters, where each parameter has got a name and maps to any value. The value is represented by the C++ class ito::ParamBase and can have one of the following types:
Using one of the parameter names, its current value can be obtained by getParam(‘name’) and is writable by setParam(‘name’, newValue) (if not read-only)
This method prints a detailed table with the name, current value, description string and further meta information of every plugin parameter.
Parameters: | detailLevel : {dict}, optional
|
---|---|
Returns: | out : {None, dict}
|
See also
Returns a reference (shallow copy) of the recently acquired image (located in the internal memory if the plugin) if the plugin is a grabber or camera and the buffer is a dataObject. Please consider that the values of the dataObject might change if a new image is acquired since it is only a reference. Therefore consider copying the dataObject or directly use copyVal.
If no acquisition has been triggered, this method raises a RuntimeError. If the acquisition is not finished yet, this method blocks and waits until the end of the acquisition.
If the plugin is another type than a grabber or camera (e.g. serialIO), this method requires any buffer-object that is preallocated with a reasonable size. Then, the currently available data is copied into this buffer object and the size of the copied data is returned. If the buffer is too small, only the data that fits into the buffer is copied. Another call to getVal will copy the rest.
Parameters: | buffer : {dataObject, bytearray, bytes or str}
length : {int}, optional
|
---|---|
Returns: | out : {None or int}
|
See also
Raises: | RuntimeError :
|
---|
See also
Returns: | name : {str}
|
---|
See also
If the auto grabbing flag is set, the camera acquisition is automatically and continuously triggered if at least one live image is connected. This is an undesired behaviour if a measurement is started where the acquisition should be controlled by a specific script or something similar. Then disable the auto grabbing property. All connected live images will then get new images when getVal or copyVal is called by the script. The live image timer is disabled.
This method allows setting this flag.
Parameters: | on : {bool}
|
---|
See also
Sets the internal plugin parameter with ‘name’ to a new value. The plugin itsself can decide whether the given value is accepted as new value. This may depend on the type of the given value, but also on the allowed value range indicated by further meta information of the internal parameter. Parameters that have the read-only flag set can not be reset.
The name of the parameter must have the following form:
Parameters: | name : {str}
value : {str, int, double, ...}
|
---|
See also
If the dataIO plugin has the subtype ADDA, this method is used to send data to one or more analog outputs of the device. In this case a dataObject must be given as first argument and the second argument length must be 1.
For other dataIO plugins, the first argument must be any buffer object, like bytearray, bytes or unicode string. The length is then extracted from this value. However it is also possible to define a user-defined size using the ‘length’ argument.
Parameters: | dataObjectOrBuffer : {dataObject, bytearray, bytes, str}
length : {int}, optional
|
---|
Raises: | RuntimeError :
|
---|
Raises: | RuntimeError :
|
---|
See also
This command starts the dataIO plugin such that it is ready for data acquisition. Call this method before you start using commands like acquire, getVal or copyVal. If the device already is started, an internal start-counter is incremented by the parameter ‘count’. The corresponding stopDevice method then decrements this counter and finally stops the device once the counter drops to zero again.
The counter is necessary, since every connected live image needs to start the device without knownledge about any previous start. No acquisition is possible, if the device has not been started, hence the counter is 0.
Parameters: | count : {int}, optional
|
---|
See also
If this method is called as many times as the corresponding startDevice (or if the counts are equal), the dataIO device is stopped (not deleted) and it is not possible to acquire further data.
Once a live image is connected to a camera, startDevice is automatically called at start of the live acquisition and stopDevice at shutdown.
Parameters: | count : {int}, optional
|
---|---|
Returns: | counts : {None or int}
|
See also