Fills-in a field descriptor.
a0tError a0SetMapField( | | | |
| a0tMapField | *field, | |
| int | index, | |
| void | *baseaddr, | |
| a0tFormat | *format, | |
| void | *address, | |
| int | count );
| |
Name | rd/wr | Description |
field | write | Field table to fill in. |
index | write | Element of the table to fill in. |
baseaddr | read | Address of a sample structure. |
format | read | Format of the data elements of the field. |
address | read | Address of the first data element. |
count | read | Number of data elements. |
This function fills in a field descriptor. A field descriptor contains three components: a format descriptor, an address displacement and an element count. The format descriptor is given by format, the displacement is computed with baseaddr and address and the element count is passed in count.
Basic formats (see a0UseFormats()) or user-defined map formats can be used as format descriptor of map fields.
Field descriptors are necessary when creating a new map format (see a0NewMapFormat()). All fields that compose a new map format must be described in an array of field descriptors. This function allows the programmer to describe, one-by-one, the fields that must be incorporated in a new map format. Field descriptors can be reused to build different map formats.
On return of this function, the variable pointed by field[index] contains a filled-in map field descriptor.
Error Code | Description |
A0ErrOkSuccessful completion. | |
a0NewMapFormat() a0UseFormats()