ThingWorx C SDK
|
Macros | |
#define | TW_MAKE_NUMBER(numberValue) twPrimitive_CreateFromNumber((double)numberValue) |
This macro creates Number primitives from C doubles. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_INT(intValue) twPrimitive_CreateFromInteger(intValue) |
This macro creates Integer primitives from C unsigned integers. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_STRING(stringValue) twPrimitive_CreateFromString((char*)stringValue,TRUE) |
This macro creates String primitives from a C char *. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_BOOL(boolValue) twPrimitive_CreateFromBoolean(boolValue) |
This macro creates Boolean primitives from a C char which is the SDK boolean type. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_DATETIME(timestamp) twPrimitive_CreateFromDatetime(timestamp) |
This macro creates DateTime primitives from a C DATETIME. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_DATETIME_NOW twPrimitive_CreateFromDatetime(twGetSystemTime(TRUE)) |
A convenience version of TW_MAKE_DATETIME that assumes you want to create a primitive representing the current time. It requires no arguments. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_EMPTY twPrimitive_Create() |
This macro creates an emptry Primitive of type TW_NOTHING. It requires not arguments. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define | TW_MAKE_LOC(latitude, longitude, elevation) twPrimitive_CreateFromLocationAndDelete(twCreateLocationFrom(latitude,longitude,elevation)) |
This macro creates a Location primitive from a latitude, longitude and elevation. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE(). More... | |
#define TW_MAKE_BOOL | ( | boolValue | ) | twPrimitive_CreateFromBoolean(boolValue) |
This macro creates Boolean primitives from a C char which is the SDK boolean type. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
boolValue | char A C char to be converted |
#define TW_MAKE_DATETIME | ( | timestamp | ) | twPrimitive_CreateFromDatetime(timestamp) |
This macro creates DateTime primitives from a C DATETIME. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
timestamp | C DATETIME to be converted |
#define TW_MAKE_DATETIME_NOW twPrimitive_CreateFromDatetime(twGetSystemTime(TRUE)) |
A convenience version of TW_MAKE_DATETIME that assumes you want to create a primitive representing the current time. It requires no arguments. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
#define TW_MAKE_EMPTY twPrimitive_Create() |
This macro creates an emptry Primitive of type TW_NOTHING. It requires not arguments. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
#define TW_MAKE_INT | ( | intValue | ) | twPrimitive_CreateFromInteger(intValue) |
This macro creates Integer primitives from C unsigned integers. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
numberValue | int32_t[in] A C signed integer value to be converted |
#define TW_MAKE_LOC | ( | latitude, | |
longitude, | |||
elevation | |||
) | twPrimitive_CreateFromLocationAndDelete(twCreateLocationFrom(latitude,longitude,elevation)) |
This macro creates a Location primitive from a latitude, longitude and elevation. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
latitude | double [in] |
longitude | double [in] |
elevation | double [in] |
#define TW_MAKE_NUMBER | ( | numberValue | ) | twPrimitive_CreateFromNumber((double)numberValue) |
This macro creates Number primitives from C doubles. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
numberValue | double[in] A c double value to be converted |
#define TW_MAKE_STRING | ( | stringValue | ) | twPrimitive_CreateFromString((char*)stringValue,TRUE) |
This macro creates String primitives from a C char *. Useful for populating InfoTables or calling API functions. Note that the returned primitive has been allocated on the heap and if not used in a function call that takes over responsibility for this value, must be disposed of with TW_FREE().
stringValue | const char*[in] A C string value to be converted |