awGetStructFieldAsEvent
BrokerError awGetStructFieldAsEvent(
BrokerEvent event,
char *field_name,
BrokerEvent *value);
event | The event whose field is to be obtained. |
field_name | Name of the event field. This may be NULL if you wish to retrieve the top level of the event. |
value | An event whose fields correspond to structure fields. This parameter is used for output. |
Obtains the specified event field, of type
struct, and returns it as an event. Each event field corresponds to a field in the structure. Use the appropriate
awGet<type>Field or
awGet<type>SeqField function to obtain the value of the fields within the structure.
Important:
Since the event returned in value is not associated with a Broker client, it is not type checked.
If you get a structure field whose value was not set by the event's publisher, a structure will be returned set with all the appropriate default values.
See
Specifying Field Names for complete information on specifying
field_name.
The caller is responsible for calling awDeleteEvent on the output value.
Possible BrokerError major codes | Meaning |
AW_ERROR_FIELD_NOT_FOUND | The field_name does not exist in the event or an attempt was made to obtain the value of an envelope field that has not been set. |
AW_ERROR_FIELD_TYPE_MISMATCH | The field's type does not match the type of value or the field_name incorrectly accesses a type. |
AW_ERROR_INVALID_EVENT | The event is invalid. |
AW_ERROR_INVALID_FIELD_NAME | The field_name is invalid. |
See also: