Aw data set

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 3.3
SDKbuild 24


int aw_data_set (AW_ATTRIBUTE a, const char *value, unsigned int length)

Description

Sets a data attribute.

Callback

None (returns immediately)

Notes

A few of the data attributes have a maximum length defined by AW_MAX_ATTRIBUTE_LENGTH in Aw.h. This limit is currently 255 bytes. Most attributes can be longer than this (e.g. AW_OBJECT_DATA). Their maximum lengths can vary up to 4094 bytes depending on the attribute (e.g. AW_OBJECT_DATA has a maximum length of 4094 bytes).

See SDK Attributes for more information.

Arguments

a
Attribute (defined in Aw.h).
value
Data buffer. This buffer can be modified and/or deallocated afterwards as the SDK makes its own internal copy.
length
Length of data.

Argument attributes

None

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_READ_ONLY
RC_INVALID_ATTRIBUTE
RC_TYPE_MISMATCH
Not a data attribute.
RC_STRING_TOO_LONG
Length exceeded AW_MAX_ATTRIBUTE_LENGTH (255 bytes), or 4094 bytes for a few attributes (e.g. AW_OBJECT_DATA).

Returned attributes

None

See also