![]() |
ctrlX Data Layer API for Python
1.6.0
The ctrlX Data Layer API allows access to the ctrlX Data Layer with Python
|
Public Member Functions | |
def | __init__ (self, C_DLR_VARIANT c_variant=None) |
def | __del__ (self) |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_val, exc_tb) |
Result | check_convert (self, VariantType datatype) |
def | clone (self) |
def | close (self) |
typing.List[bool] | get_array_bool8 (self) |
typing.List[float] | get_array_float32 (self) |
typing.List[float] | get_array_float64 (self) |
typing.List[int] | get_array_int16 (self) |
typing.List[int] | get_array_int32 (self) |
typing.List[int] | get_array_int64 (self) |
typing.List[int] | get_array_int8 (self) |
typing.List[str] | get_array_string (self) |
typing.List[int] | get_array_uint16 (self) |
typing.List[int] | get_array_uint32 (self) |
typing.List[int] | get_array_uint64 (self) |
typing.List[int] | get_array_uint8 (self) |
bool | get_bool8 (self) |
int | get_count (self) |
bytearray | get_data (self) |
bytearray | get_flatbuffers (self) |
float | get_float32 (self) |
float | get_float64 (self) |
def | get_handle (self) |
int | get_int16 (self) |
int | get_int32 (self) |
int | get_int64 (self) |
int | get_int8 (self) |
int | get_size (self) |
str | get_string (self) |
VariantType | get_type (self) |
int | get_uint16 (self) |
int | get_uint32 (self) |
int | get_uint64 (self) |
int | get_uint8 (self) |
Result | set_array_bool8 (self, typing.List[bool] data) |
Result | set_array_float32 (self, typing.List[float] data) |
Result | set_array_float64 (self, typing.List[float] data) |
Result | set_array_int16 (self, typing.List[int] data) |
Result | set_array_int32 (self, typing.List[int] data) |
Result | set_array_int64 (self, typing.List[int] data) |
Result | set_array_int8 (self, typing.List[int] data) |
Result | set_array_string (self, typing.List[str] data) |
Result | set_array_uint16 (self, typing.List[int] data) |
Result | set_array_uint32 (self, typing.List[int] data) |
Result | set_array_uint64 (self, typing.List[int] data) |
Result | set_array_uint8 (self, typing.List[int] data) |
Result | set_bool8 (self, bool data) |
Result | set_flatbuffers (self, bytearray data) |
Result | set_float32 (self, float data) |
Result | set_float64 (self, float data) |
Result | set_int16 (self, int data) |
Result | set_int32 (self, int data) |
Result | set_int64 (self, int data) |
Result | set_int8 (self, int data) |
Result | set_string (self, str data) |
Result | set_uint16 (self, int data) |
Result | set_uint32 (self, int data) |
Result | set_uint64 (self, int data) |
Result | set_uint8 (self, int data) |
Static Public Member Functions | |
def | copy (C_DLR_VARIANT c_variant) |
Variant is a container for a many types of data.
Hint see python context manager for instance handling
Definition at line 131 of file variant.py.
Result check_convert | ( | self, | |
VariantType | datatype | ||
) |
Checks whether the variant can be converted to another type.
Definition at line 214 of file variant.py.
References Variant._variant.
Referenced by Variant.get_array_bool8(), Variant.get_array_float32(), Variant.get_array_float64(), Variant.get_array_int16(), Variant.get_array_int32(), Variant.get_array_int64(), Variant.get_array_int8(), Variant.get_array_string(), Variant.get_array_uint16(), Variant.get_array_uint32(), Variant.get_array_uint64(), Variant.get_array_uint8(), Variant.get_flatbuffers(), and Variant.get_string().
def clone | ( | self | ) |
clones the content of a variant to another variant
Definition at line 237 of file variant.py.
References Variant._variant.
|
static |
copies the content of a variant to another variant
Definition at line 225 of file variant.py.
typing.List[bool] get_array_bool8 | ( | self | ) |
Returns the array of int8 if the type is a array of int8 otherwise null.
Definition at line 344 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[float] get_array_float32 | ( | self | ) |
Returns the array of float if the type is a array of float otherwise null.
Definition at line 462 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[float] get_array_float64 | ( | self | ) |
Returns the array of double if the type is a array of double otherwise null.
Definition at line 475 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_int16 | ( | self | ) |
Returns the array of int16 if the type is a array of int16 otherwise null.
Definition at line 384 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_int32 | ( | self | ) |
Returns the array of int32 if the type is a array of int32 otherwise null.
Definition at line 410 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_int64 | ( | self | ) |
Returns the array of int64 if the type is a array of int64 otherwise null.
Definition at line 436 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_int8 | ( | self | ) |
Returns the array of int8 if the type is a array of int8 otherwise null.
Definition at line 358 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[str] get_array_string | ( | self | ) |
Returns the type of the variant.
Definition at line 488 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_uint16 | ( | self | ) |
Returns the array of uint16 if the type is a array of uint16 otherwise null.
Definition at line 397 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_uint32 | ( | self | ) |
Returns the array of uint32 if the type is a array of uint32 otherwise null.
Definition at line 423 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_uint64 | ( | self | ) |
Returns the array of uint64 if the type is a array of uint64 otherwise null.
Definition at line 449 of file variant.py.
References Variant._variant, and Variant.check_convert().
typing.List[int] get_array_uint8 | ( | self | ) |
Returns the array of uint8 if the type is a array of uint8 otherwise null.
Definition at line 371 of file variant.py.
References Variant._variant, and Variant.check_convert().
bool get_bool8 | ( | self | ) |
Returns the value of the variant as a bool (auto convert if possible) otherwise 0.
Definition at line 244 of file variant.py.
References Variant._variant.
int get_count | ( | self | ) |
Returns the count of elements in the variant (scalar data types = 1, array = count of elements in array)
Definition at line 207 of file variant.py.
References Variant._variant.
bytearray get_data | ( | self | ) |
Returns the pointer to the data of the variant.
Definition at line 190 of file variant.py.
References Variant._variant.
Referenced by Variant.get_flatbuffers().
bytearray get_flatbuffers | ( | self | ) |
Returns the flatbuffers if the type is a flatbuffers otherwise null.
Definition at line 334 of file variant.py.
References Variant.check_convert(), NotifyItem.get_data(), and Variant.get_data().
float get_float32 | ( | self | ) |
Returns the value of the variant as a float (auto convert if possible) otherwise 0.
Definition at line 307 of file variant.py.
References Variant._variant.
float get_float64 | ( | self | ) |
Returns the value of the variant as a double (auto convert if possible) otherwise 0.
Definition at line 314 of file variant.py.
References Variant._variant.
int get_int16 | ( | self | ) |
Returns the value of the variant as a int16 (auto convert if possible) otherwise 0.
Definition at line 265 of file variant.py.
References Variant._variant.
int get_int32 | ( | self | ) |
Returns the value of the variant as a int32 (auto convert if possible) otherwise 0.
Definition at line 279 of file variant.py.
References Variant._variant.
int get_int64 | ( | self | ) |
Returns the value of the variant as a int64 (auto convert if possible) otherwise 0.
Definition at line 293 of file variant.py.
References Variant._variant.
int get_int8 | ( | self | ) |
Returns the value of the variant as a int8 (auto convert if possible) otherwise 0.
Definition at line 251 of file variant.py.
References Variant._variant.
int get_size | ( | self | ) |
Definition at line 200 of file variant.py.
References Variant._variant.
str get_string | ( | self | ) |
Returns the array of bool8 if the type is a array of bool otherwise null.
Definition at line 321 of file variant.py.
References Variant._variant, and Variant.check_convert().
VariantType get_type | ( | self | ) |
Returns the type of the variant.
Definition at line 183 of file variant.py.
References Variant._variant.
int get_uint16 | ( | self | ) |
Returns the value of the variant as a uint16 (auto convert if possible) otherwise 0.
Definition at line 272 of file variant.py.
References Variant._variant.
int get_uint32 | ( | self | ) |
Returns the value of the variant as a Uint32 (auto convert if possible) otherwise 0.
Definition at line 286 of file variant.py.
References Variant._variant.
int get_uint64 | ( | self | ) |
Returns the value of the variant as a uint64 (auto convert if possible) otherwise 0.
Definition at line 300 of file variant.py.
References Variant._variant.
int get_uint8 | ( | self | ) |
Returns the value of the variant as a uint8 (auto convert if possible) otherwise 0.
Definition at line 258 of file variant.py.
References Variant._variant.
Result set_array_bool8 | ( | self, | |
typing.List[bool] | data | ||
) |
Set array of bool8.
Definition at line 598 of file variant.py.
References Variant._variant.
Result set_array_float32 | ( | self, | |
typing.List[float] | data | ||
) |
Set array of float32.
Definition at line 697 of file variant.py.
References Variant._variant.
Result set_array_float64 | ( | self, | |
typing.List[float] | data | ||
) |
Set array of float64.
Definition at line 708 of file variant.py.
References Variant._variant.
Result set_array_int16 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of int16.
Definition at line 631 of file variant.py.
References Variant._variant.
Result set_array_int32 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of int32.
Definition at line 653 of file variant.py.
References Variant._variant.
Result set_array_int64 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of int64.
Definition at line 675 of file variant.py.
References Variant._variant.
Result set_array_int8 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of int8.
Definition at line 609 of file variant.py.
References Variant._variant.
Result set_array_string | ( | self, | |
typing.List[str] | data | ||
) |
Set array of strings.
Definition at line 719 of file variant.py.
References Variant._variant.
Result set_array_uint16 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of uint16.
Definition at line 642 of file variant.py.
References Variant._variant.
Result set_array_uint32 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of uint32.
Definition at line 664 of file variant.py.
References Variant._variant.
Result set_array_uint64 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of uint64.
Definition at line 686 of file variant.py.
References Variant._variant.
Result set_array_uint8 | ( | self, | |
typing.List[int] | data | ||
) |
Set array of uint8.
Definition at line 620 of file variant.py.
References Variant._variant.
Result set_bool8 | ( | self, | |
bool | data | ||
) |
Set a bool value.
Definition at line 501 of file variant.py.
References Variant._variant.
Result set_flatbuffers | ( | self, | |
bytearray | data | ||
) |
Set an flatbuffers.
Definition at line 586 of file variant.py.
References Variant._variant.
Result set_float32 | ( | self, | |
float | data | ||
) |
Set a float value.
Definition at line 564 of file variant.py.
References Variant._variant.
Result set_float64 | ( | self, | |
float | data | ||
) |
Set a double value.
Definition at line 571 of file variant.py.
References Variant._variant.
Result set_int16 | ( | self, | |
int | data | ||
) |
Set a int16 value.
Definition at line 522 of file variant.py.
References Variant._variant.
Result set_int32 | ( | self, | |
int | data | ||
) |
Set a int32 value.
Definition at line 536 of file variant.py.
References Variant._variant.
Result set_int64 | ( | self, | |
int | data | ||
) |
Set a int64 value.
Definition at line 550 of file variant.py.
References Variant._variant.
Result set_int8 | ( | self, | |
int | data | ||
) |
Set a int8 value.
Definition at line 508 of file variant.py.
References Variant._variant.
Result set_string | ( | self, | |
str | data | ||
) |
Set a string.
Definition at line 578 of file variant.py.
References Variant._variant.
Result set_uint16 | ( | self, | |
int | data | ||
) |
Set a uint16 value.
Definition at line 529 of file variant.py.
References Variant._variant.
Result set_uint32 | ( | self, | |
int | data | ||
) |
Set a uint32 value.
Definition at line 543 of file variant.py.
References Variant._variant.
Result set_uint64 | ( | self, | |
int | data | ||
) |
Set a uint64 value.
Definition at line 557 of file variant.py.
References Variant._variant.
Result set_uint8 | ( | self, | |
int | data | ||
) |
Set a uint8 value.
Definition at line 515 of file variant.py.
References Variant._variant.