TipcMsgGetCurrentFieldKnown checks if the current field in a message is of known value
T_BOOL TipcMsgGetCurrentFieldKnown(msg, field_valid_return
) T_IPC_MSGmsg
; T_BOOL *field_valid_return
;
msg
message to get status of the current field from
field_valid_return
storage for status
TRUE
if the status of the current field was successfully retrieved from the message, FALSE
otherwise.
If TipcMsgGetCurrentFieldValid fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgGetCurrentFieldKnown checks to see if the current field has a known value. A field_valid_return
of TRUE
indicates that the unknown_value
property of the current field is not set and that the value of the field can be retrieved from the message. A field_valid_return
of FALSE
indicates that the unknown_value
property of the current field is set, and that there is no value in the field that can be retrieved.
If TipcMsgGetCurrentFieldValid returns FALSE
, it does not store a value in field_valid_return
.
TipcMsgAppendUnknown, TipcMsgNextUnknown
This example creates a message, appends a field and gets the status of the current field:
T_IPC_MT mt; T_IPC_MSG msg; T_REAL8 real8; T_BOOL field_valid; mt=TipcMtLookupByNum(T_MT_NUMERIC_DATA); if(mt==NULL) {return
; /* error */
} msg=TipcMsgCreate(mt); if (msg==NULL) {return
; /* error */
} if (!TipcMsgAppendStrReal8(msg,"speed limit", 65.0)) {return
; /* error */
} if (!TipcMsgGetCurrentFieldKnown(msg, &field_valid)) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |