If the object is a structure or structure array, the data from the the buffer is copied into its primitive components in order of their position in the structure. Alignment adjustments are made as necessary to match the alignment of a C struct equivalent to the SDS structure. In the structure or structure array case the offset parameter is ignored.
If the object is primitive data is transferred starting at the position in the item specified by offset.
If the data was previously undefined memory for the data is allocated at this time.
If the data is too long to fit into the object, it will be truncated.
> | id | SdsIdType | Identifier of the primitive item. |
---|---|---|---|
> | length | unsigned long | Length in bytes of the buffer containing the data. |
> | offset | unsigned long | Offset into the data object at which to start writing data. The offset is measured in units of the size of each individual item in the array - e.g. 4 bytes for an INT or 8 bytes for a DOUBLE. The offset is zero to start at the beginning of the array. |
> | data | void* | Buffer containing the data. |
! | status | StatusType* | Modified status. Possible failure codes are: |
SDS__NOMEM | Insufficient memory for creation |
---|---|
SDS__NOTPRIM | Not a primitive item |
SDS__UNDEFINED | Data undefined, and object external |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au