TipcMsgNextReal16


Name

TipcMsgNextReal16 — get a REAL16 field from a message

Synopsis

T_BOOL TipcMsgNextReal16(msg, real16_return) 
T_IPC_MSG msg; 
T_REAL16 *real16_return; 

Arguments

msg — message to get field from

real16_return — storage for REAL16 value from field

Return Values

TRUE if the field was successfully retrieved from the message, FALSE otherwise.

Diagnostics

If TipcMsgNextReal16 fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcMsgNextReal16 retrieves the value of the current field of a message, which must be a REAL16 (16-byte real number) field. If TipcMsgNextReal16 succeeds, it advances the current field to the next field in the message.

TipcMsgNextReal16 converts the field into the data format used by this process if necessary.

Caution

If TipcMsgNextReal16 returns FALSE, it does not store a value in real16_return.

Not all platforms fully support the REAL16 type. While some platforms can manipulate them as uninterpreted bytes, they can neither manipulate nor interpret them as numbers.

See Also

TipcMsgAppendReal16

Examples

This example creates a message, appends a REAL16 field, and reads the field back from the message:

T_IPC_MT mt; 
T_IPC_MSG msg; 
T_REAL16 real16_val; 
 
#define USER_MT_REAL16_TEST 100 
mt = TipcMtCreate("real16_test", USER_MT_REAL16_TEST, "real16"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
  return;  /* error */ 
} 
 
if (!TipcMsgAppendReal16(msg, 1e1000)) { 
  return;  /* error */ 
}  
if (!TipcMsgSetCurrent(msg, 0)) { 
  return;  /* error */ 
}  
if (!TipcMsgNextReal16(msg, &real16_val)) { 
  return;  /* error */ 
}  
TutOut("real16_val = " T_REAL16_SPEC "\n", real16_val); 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com