TipcMsgAppendInt8Array


Name

TipcMsgAppendInt8Array — append an INT8_ARRAY field to a message

Synopsis

T_BOOL TipcMsgAppendInt8Array(msg, int8_array_data, array_size) 
T_IPC_MSG msg; 
T_INT8 *int8_array_data; 
T_INT4 array_size; 

Arguments

msg — message to append field to

int8_array_data — data for new message field

array_size — number of elements in int8_array_data

Return Values

TRUE if the field was successfully appended to the message, FALSE otherwise.

Diagnostics

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

Description

TipcMsgAppendInt8Array appends an eight-byte integer array (INT8_ARRAY) field containing int8_array_data to the end of a message’s data. TipcMsgAppendInt8Array makes a copy of the array data.

Caution

Eight-byte integers are not available as native integer data types on all platforms.

See Also

TipcMsgAppendInt8ArrayPtr, TipcMsgNextInt8Array

Examples

This example creates a message and appends an INT8_ARRAY field:

T_IPC_MT mt; 
T_IPC_MSG msg; 
T_INT8 data[2]; 
 
#define USER_MT_INT8_ARRAY_TEST 100 
mt = TipcMtCreate("int8_array_test", USER_MT_INT8_ARRAY_TEST,  
                  "int8_array"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
  return;  /* error */ 
} 
 
/* An RTclient would typically set the destination of */ 
/* a message at this point by calling TipcMsgSetDest. */ 
 
data[0] = 56000000000; 
data[1] = 57000000000; 
if (!TipcMsgAppendInt8Array(msg, data, 2)) { 
  return;  /* error */ 
}  
 
/* A process would typically send a message at this point by */ 
/* calling TipcConnMsgSend or TipcSrvMsgSend. */ 
 
/* A process would typically destroy a message at this point by */ 
/* calling TipcMsgDestroy. */ 

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