Impact Acquire SDK Python
|
A class to represent string properties. More...
Public Member Functions | |
__init__ (self, *args) | |
Constructs a new unbound mvIMPACT.acquire.PropertyS object. | |
binaryDataBufferMaxSize (self) | |
Reads the max size(in bytes) of binary data this property can store. | |
binaryDataBufferSize (self, index=0) | |
Returns the size(in bytes) needed for the binary representation of the string buffer. | |
read (self, *args) | |
Reads a value from a property. | |
readBinary (self, *args) | |
Reads a value stored in the property as binary data. | |
write (self, *args) | |
Writes one value to the property. | |
writeBinary (self, *args) | |
Writes a block of binary data to one entry of the property. | |
Properties | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
A class to represent string properties.
__init__ | ( | self, | |
* | args ) |
Constructs a new unbound mvIMPACT.acquire.PropertyS object.
OVERLOAD 1:
OVERLOAD 2: Constructs a new mvIMPACT.acquire.PropertyS object.
hProp | [in] A valid handle to the string property |
OVERLOAD 3: Constructs a new mvIMPACT.acquire.PropertyS from an existing one.
src | [in] A constant reference to the mvIMPACT.acquire.PropertyS object, this object shall be created from |
Reimplemented from Property.
binaryDataBufferMaxSize | ( | self | ) |
Reads the max size(in bytes) of binary data this property can store.
When binary data shall be stored in a string property, the user will need to allocate memory when this data shall be written to the property. To find out how much binary data can be stored by a property before calling the function mvIMPACT.acquire.PropertyS.writeBinary this function can be used.
binaryDataBufferSize | ( | self, | |
index = 0 ) |
Returns the size(in bytes) needed for the binary representation of the string buffer.
When binary data has been stored in a string property it has been stored in Base64 format internally. If the user wants to know the length of the binary data in decoded format, this function can be called.
index | [in] The index of the value for which to query the buffer size(if this property holds more than one value). |
read | ( | self, | |
* | args ) |
Reads a value from a property.
OVERLOAD 1:
This function queries a single value stored under index index in the property.
index | [in] The index of the value to read from the property. |
OVERLOAD 2: Reads a set of values from a property.
This function queries a set of values from a property and stores these values into sequence.
sequence | [out] A reference to a container to store the data read from the property into. |
start | [in] The index from where to start reading values from the property. |
end | [in] The index where to stop reading values from the property. |
OVERLOAD 3: Reads a set of values from a property.
This function queries a set of values from a property and stores these values into sequence.
sequence | [out] A reference to a container to store the data read from the property into. |
start | [in] The index from where to start reading values from the property. |
end | [in] The index where to stop reading values from the property. |
OVERLOAD 4: Reads a set of values from a property.
This function queries a set of values from a property and stores these values into sequence.
sequence | [out] A reference to a container to store the data read from the property into. |
start | [in] The index from where to start reading values from the property. |
end | [in] The index where to stop reading values from the property. |
readBinary | ( | self, | |
* | args ) |
Reads a value stored in the property as binary data.
OVERLOAD 1:
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
Reading binary data with this function obviously only makes sense if the property has been assigned the value by a previous call to mvIMPACT.acquire.PropertyS.writeBinary (here you find a small code example as well). However using this method any kind of data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
index | [in] The index of the value to get(if this property holds more than one value). |
boLegacyMode | [in] If set to true this allows applications compiled with Impact Acquire 2.32.0 or greater using this function to run on systems with Impact Acquire smaller than 2.32.0. The legacy version of this function runs slower! |
OVERLOAD 2: Reads a value stored in the property as binary data.
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
Reading binary data with this function obviously only makes sense if the property has been assigned the value by a previous call to mvIMPACT.acquire.PropertyS.writeBinary (here you find a small code example as well). However using this method any kind of data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
pBuf | [in] A pointer to a piece of memory that shall receive the binary data stored by the this property. |
bufSize | [in] The size of the buffer pointed to by pBuf in bytes. |
index | [in] The index of the value to get(if this property holds more than one value). |
boLegacyMode | [in] If set to true this allows applications compiled with Impact Acquire 2.32.0 or greater using this function to run on systems with Impact Acquire smaller than 2.32.0. The legacy version of this function runs slower! |
OVERLOAD 3: Reads a value stored in the property as binary data.
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
Reading binary data with this function obviously only makes sense if the property has been assigned the value by a previous call to mvIMPACT.acquire.PropertyS.writeBinary (here you find a small code example as well). However using this method any kind of data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
pBuf | [in] A pointer to a piece of memory that shall receive the binary data stored by the this property. |
bufSize | [in] The size of the buffer pointed to by pBuf in bytes. |
index | [in] The index of the value to get(if this property holds more than one value). |
boLegacyMode | [in] If set to true this allows applications compiled with Impact Acquire 2.32.0 or greater using this function to run on systems with Impact Acquire smaller than 2.32.0. The legacy version of this function runs slower! |
OVERLOAD 4: Reads a value stored in the property as binary data.
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
Reading binary data with this function obviously only makes sense if the property has been assigned the value by a previous call to mvIMPACT.acquire.PropertyS.writeBinary (here you find a small code example as well). However using this method any kind of data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
pBuf | [in] A pointer to a piece of memory that shall receive the binary data stored by the this property. |
bufSize | [in] The size of the buffer pointed to by pBuf in bytes. |
index | [in] The index of the value to get(if this property holds more than one value). |
boLegacyMode | [in] If set to true this allows applications compiled with Impact Acquire 2.32.0 or greater using this function to run on systems with Impact Acquire smaller than 2.32.0. The legacy version of this function runs slower! |
write | ( | self, | |
* | args ) |
Writes one value to the property.
OVERLOAD 1:
This function writes a single value under index index to the property.
value | [in] The value to write to the property. |
index | [in] The index defining at which position to write the value. |
OVERLOAD 2: Writes a set of values to the property.
This function writes a set of values starting at index to the property.
sequence | [in] An array containing the values to write to the property. |
index | [in] The index where to write the first value to the property. |
OVERLOAD 3: Writes a set of values to the property.
This function writes a set of values starting at index to the property.
sequence | [in] An array containing the values to write to the property. |
index | [in] The index where to write the first value to the property. |
writeBinary | ( | self, | |
* | args ) |
Writes a block of binary data to one entry of the property.
OVERLOAD 1:
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
By writing binary data with this function arbitrary data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
To find out if a property contains binary data check if mvIMPACT.acquire.cfContainsBinaryData is set e.g. by calling
Performance considerations:
Impact Acquire 2.15.0 and newer:
Impact Acquire versions smaller than 2.15.0
value | [in] A const reference to the string holding the binary data that shall be stored by the this property. |
index | [in] The index defining at which position to write the value. |
OVERLOAD 2: Writes a block of binary data to one entry of the property.
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
By writing binary data with this function arbitrary data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
To find out if a property contains binary data check if mvIMPACT.acquire.cfContainsBinaryData is set e.g. by calling
Performance considerations:
Impact Acquire 2.15.0 and newer:
Impact Acquire versions smaller than 2.15.0
pBuf | [in] A const pointer to a piece of memory holding the binary data that shall be stored by the this property. |
bufSize | [in] The size of the buffer pointed to by pBuf in bytes. |
index | [in] The index defining at which position to write the value. |
OVERLOAD 3: Writes a block of binary data to one entry of the property.
Binary data can only be stored in string properties. When writing binary data to a string property it's stored in Base64 format internally. The Base64 algorithm converts arbitrary data into a read and printable string representation. As a result of this 3 bytes of arbitrary binary data will occupy 4 bytes of memory.
By writing binary data with this function arbitrary data can be stored by a string property. This can e.g. be interesting when certain data shall be stored in the user accessible part of the devices non-volatile memory.
To find out if a property contains binary data check if mvIMPACT.acquire.cfContainsBinaryData is set e.g. by calling
Performance considerations:
Impact Acquire 2.15.0 and newer:
Impact Acquire versions smaller than 2.15.0
pBuf | [in] A const pointer to a piece of memory holding the binary data that shall be stored by the this property. |
bufSize | [in] The size of the buffer pointed to by pBuf in bytes. |
index | [in] The index defining at which position to write the value. |
|
static |