ThingWorx C SDK
|
Property definitions & metadata functions. More...
#include "twOSPort.h"
#include "twLogger.h"
#include "twBaseTypes.h"
#include "twInfoTable.h"
#include "cJSON.h"
Go to the source code of this file.
Classes | |
struct | twPropertyDef |
Property definition structure. More... | |
struct | twProperty |
Property base structure. More... | |
Typedefs | |
typedef struct twPropertyDef | twPropertyDef |
Property definition structure. | |
typedef struct twProperty | twProperty |
Property base structure. | |
Functions | |
twPropertyDef * | twPropertyDef_Create (char *name, enum BaseType type, char *description, char *pushType, double pushThreshold) |
Creates a new twPropertyDef structure. More... | |
void | twPropertyDef_Delete (void *input) |
Frees all memory associated with a twPropertyDef structure and all its owned substructures. More... | |
twProperty * | twProperty_Create (char *name, twPrimitive *value, DATETIME timestamp) |
Creates a new twProperty structure. More... | |
twProperty * | twPropertyVTQ_Create (char *name, twPrimitive *value, DATETIME timestamp, char *quality) |
Creates a new twProperty structure with an OPC style Quality value. More... | |
twProperty * | twProperty_CreateFromStream (twStream *s) |
Creates a new twProperty structure from a :twStream. More... | |
void | twProperty_Delete (void *input) |
Frees all memory associated with a twProperty structure and all its owned substructures. More... | |
Property definitions & metadata functions.
twProperty* twProperty_Create | ( | char * | name, |
twPrimitive * | value, | ||
DATETIME | timestamp | ||
) |
Creates a new twProperty structure.
[in] | name | The name of the property. |
[in] | value | A pointer to a twPrimitive containing the value of the property. |
[in] | timestamp | Timestamp of the property (defaults to current time). |
value
pointer and is responsible for freeing it. twProperty* twProperty_CreateFromStream | ( | twStream * | s | ) |
Creates a new twProperty structure from a :twStream.
[in] | s | Pointer to the stream to read from |
void twProperty_Delete | ( | void * | input | ) |
Frees all memory associated with a twProperty structure and all its owned substructures.
[in] | input | A pointer to the twProperty structure to be deleted. |
twPropertyDef* twPropertyDef_Create | ( | char * | name, |
enum BaseType | type, | ||
char * | description, | ||
char * | pushType, | ||
double | pushThreshold | ||
) |
Creates a new twPropertyDef structure.
[in] | name | The name of the property. |
[in] | type | The BaseType of the property. |
[in] | description | A description of the property. |
[in] | pushType | The push type of the property. Can be set to #NEVER, #ALWAYS, or #VALUE (on change). |
[in] | pushThreshold | The amount the property has to change (if the type is TW_NUMBER or TW_INTEGER) before pushing the new value. |
void twPropertyDef_Delete | ( | void * | input | ) |
Frees all memory associated with a twPropertyDef structure and all its owned substructures.
[in] | input | A pointer to the twPropertyDef structure to be deleted. |
twProperty* twPropertyVTQ_Create | ( | char * | name, |
twPrimitive * | value, | ||
DATETIME | timestamp, | ||
char * | quality | ||
) |
Creates a new twProperty structure with an OPC style Quality value.
[in] | name | The name of the property. |
[in] | value | A pointer to a twPrimitive containing the value of the property. |
[in] | timestamp | Timestamp of the property (defaults to current time). |
[in] | qualtiy | The OPC style quality of the value(defaults to "GOOD"). |
value
pointer and is responsible for freeing it.