Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 19 Using TIBCO Object Service Broker SDK (C/C++) : SDK (C/C++) Functions

SDK (C/C++) Functions
This section contains a brief overview of the functions of the SDK (C/C++) client.
Rule Calls, Session and Transaction Management
 
On page
Serves as the main SDK (C/C++) entry point for processing STARTSS, STARTTR, CALLRULE, STOPTR, STOPSS, RESETSS, GETENDMSG, and SESSACTIVE requests.
Performs transaction start, rule call, and transaction end as a single SDK (C/C++) call.
Code Page Setting and Error Retrieval
 
On page
Sets an SDK (C/C++)/SDK (Java) code page.
Commarea Helper Functions
This group of functions facilitate dataIn and dataOut commarea processing. All the functions work with the format described in Calling a Rule – CALLRULE. Generally, these functions do not validate memory pointers passed as parameters.
On page
Calculates the size of a single-segment commarea, given the size of the segment.
C Macros
 
On page
Copies a string with an explicitly specified length to a string with a two-byte length prefix.
See Also
Appendix A, SDK (C/C++) and SDK (Java) Error Reason Codes for a list of error reason codes issued in relation to SDK (C/C++).
cliProc
cliProc is the main SDK (C/C++) function. It accepts specific operation requests and the meaning of most cliProc parameters depends on the specifics of the request.

 
void cliProc(CLI_SESSION session,
             const char * operation,
             char * operand,
             const char * params,
             const void * dataIn,
             void * dataOut,
             char * retData,
             int * retCode);

 
Parameters:
 
Application-supplied session work area. The SDK (C/C++) client uses this area to store all session related internal data. For the SDK (C/C++) client to function properly, the application must not modify contents of this area.
 
 
These values are in ASCII for Open Systems, and in EBCDIC for z/OS. The strings do not have to be zero-terminated. To determine what operation is requested, the SDK (C/C++) client compares the supplied request name to the names until the match is found. If the request name is not one of the above, cliProc fails with CLI_INVREQUEST (2) as return code.
 
Pointer to the operand. The meaning of this parameter varies depending on the specific request (that is, the value of the operation cliProc parameter, described above).
Pointer to the operation parameters. The meaning of this parameter varies depending on the specific request (that is, the value of the operation cliProc parameter, described above).
Pointer to the memory area where the result of the operation is to be stored. The nature of the result depends on the specific request (that is, the value of the operation cliProc parameter, described above).
Pointer to the memory area where return code of the request is to be stored. If the request succeeds, CLI_SUCCESS (0) is returned, if the request fails, the value depends on the specific request (that is, the value of the operation cliProc parameter, described above).
 
For some values of operation, some of these parameter are ignored. In this case, it does not matter what the parameter contains. This is different from setting a parameter to NULL, which has a specific meaning for that parameter.
Return Value:
None.
Comments
All the requests accepted by cliProc are session-related. Sessions are distinguished by the session parameter of cliProc. session points to application-provided storage that the SDK (C/C++) client uses to store all the data related to a particular session. The structure of this storage is internal and the application must not modify data in storage. Type CLI_SESSION is provided to declare or allocate variables large enough to hold all internal session data.
STARTSS properly formats the session area and the other operations assume that the area is formatted correctly. For all cliProc calls except STARTSS, if session was not previously passed to STARTSS or is corrupt, the behavior of the SDK (C/C++) client is undefined. The SDK (C/C++) client checks an eyecatcher area in the session area and, if the eyecatcher is corrupt, the operation fails with a CLI_SESSINVALID (199) error reason code. Use this error reason code as an indication of memory misuse when debugging the application.
Generally, cliProc does not perform memory accessibility checks for pointers that the application supplies. However, there are a few exceptions from this rule, as described in the cliProc request specifications below.
If two calls to STARTSS with the same session parameter are issued one right after the other, the first session becomes inaccessible because all the internal SDK (C/C++) data for that session is lost. To avoid this, always issue a STOPSS or a RESETSS before issuing another STARTSS on the same session area.
STARTSS – Start a Session
STARTSS starts a new TIBCO Object Service Broker session. The following table lists the cliProc parameters used by this operation:
Points to the SDK (C/C++)/SDK (Java) code page for the new session. The SDK (C/C++) expects a 24‑byte, blank-padded code page name. If this parameter is NULL, the SDK (C/C++) uses the code page set by the most recent cliSetCodepage call. The code page name is in EBCDIC. For valid values, refer to cliSetCodepage.
Session parameters string. It must be prefixed by two bytes giving its length, exclusive of the length of the prefix. The string must be in the SDK (C/C++)/SDK (Java) code page specified by the cliSetCodepage call or in the STARTSS operand parameter. The endian type of the length prefix is the same as the endian type of the SDK (C/C++) client platform.
Points to the operation return data buffer. If the STARTSS operation succeeds, the session user ID (eight bytes, blank-padded) is copied to the buffer. If STARTSS fails, an error reason code (four bytes) is placed into the buffer.
Points to a buffer for the return code (four bytes). Possible values of the return code are CLI_SUCCESS (0) and CLI_STARTSS_FAILED (4).
 
Use the session parameters string (params) to define various session behavior aspects. There are a number of parameters that are specific for the SDK (C/C++). These (case-insensitive) parameters are:
 
Node name of the machine that runs the TIBCO Object Service Broker monitor process (Windows or Solaris) or the z/OS Execution Environment where the SDK (C/C++) client is to connect.
Session endian type. This parameter affects the external representation of MAP table fields with internal syntax B, and “*” external syntax. Valid entries are: BIG and LITTLE (case insensitive).
A model Execution Environment communications identifier required only when VTAM connections are used. If specified, the value must be compatible with the configuration of the VTAM installation.
You use CLINODE to identify the TIBCO Object Service Broker monitor process (Windows or Solaris) or the Execution Environment (z/OS) on the network. See your TIBCO Object Service Broker administrator for the node name of the Execution Environment, or osMon in Windows or Solaris, to which you want to connect. For more information on the CLINODE parameter, refer to TIBCO Object Service Broker Parameters.
Make sure that your session parameter string contains the CLINODE parameter. Otherwise, STARTSS fails with a CLI_INVNODE (193) error reason code.
CLIENDIAN provides a way to override the application endian type for a session. This parameter affects the external representation of MAP table fields with numeric internal syntaxes and the “*” external syntax. If CLIENDIAN is not specified the endian type natural for the SDK (C/C++) client platform is selected.
The session area is formatted to represent a session for subsequent cliProc calls. Even if the STARTSS call fails, the area can be used in subsequent cliProc calls (all calls except SESSACTIVE and GETENDMSG fail with a CLI_CALLOUTOFSEQ (36) error reason code). Do not call a STARTSS passing session area pointer that represents another active session, because the information about it is overwritten.
Open Systems programs using the SDK (C/C++) also have available the CLIHOST and CLIPORT parameters as an alternative to CLINODE.
STARTTR – Start a Transaction
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Transaction parameters string. It must be prefixed by two bytes giving its length, exclusive of the length of the prefix. The string must be in the session SDK (C/C++)/SDK (Java) code page. The endian type of the length prefix is the same as the endian type of the SDK (C/C++) client platform.
If the params pointer is NULL, all transaction parameters are assigned based on session defaults.
Points to a memory area where the error reason code (four bytes) is placed. If the operation succeeds, the area stays unchanged.
Points to a buffer for the return code (four bytes). Possible values of the return code are CLI_SUCCESS (0) and CLI_STARTTR_FAILED (10).
STARTTR starts a transaction within a specified session. If the session already has transactions started, STARTTR starts a child transaction.
Transaction parameters are specified in the form of a string (all characters are case insensitive):
BROWSE | UPDATE, TEST | NOTEST, SEARCH=S | I | L, LIBRARY=libname
If you omit a parameter, STARTTR uses session default value specified in the session parameter string at STARTSS time. These session defaults are set by the BROWSE, TEST, SEARCH, and LIBRARY session parameters. For more information on these, refer to TIBCO Object Service Broker Parameters.
If the session abends or is stopped, STARTTR fails with a CALLOUTOFSEQ (36) error reason code.
If the maximum allowed number of transactions are already running in the session, the operation fails with TOOMANYTRANS (106) error reason code. Refer to TIBCO Object Service Broker Parameters for information on the TRANMAXNUM Execution Environment parameter, which sets the maximum value.
CALLRULE – Call a Rule
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Points to the maximum length for the rules return value that is placed in the retData buffer, including the two-byte length prefix and the terminating zero.
This parameter is an unsigned integer of length two bytes. Its endian type is the same as the endian type of the SDK (C/C++) client platform. If operand is NULL, no return value is stored.
This parameter is In/Out. Refer to operand under Out below.
Rules call string of the following form: 'RULENAME(PARAM1, PARAM2,…,PARAMn)' It must be prefixed by a two-byte string giving its length, exclusive of the length of the prefix. The string must be in the session SDK (C/C++)/SDK (Java) code page. The endian type of the length prefix is the same as the endian type of the SDK (C/C++) client platform. The maximum allowed length of the call string (excluding the length prefix) is 514 (CLI_MAXRULEEXPRLEN in oscli.h).
Points to the dataIn commarea. To indicate that you do not want this commarea used, set this parameter to NULL.
Points to the dataOut commarea populated by a rule. To indicate that you are not using the dataOut commarea, set this parameter to NULL.
Length (two bytes, unsigned integer, the SDK (C/C++) client platform endian type) of the whole rules return value in textual form (length prefix and terminating zero are excluded). If the operand is NULL, no length is written.
Points to a memory area where the error reason code (four bytes) is to be placed if the operation fails. If the operation succeeds, the area is filled with the rules return value in textual form. The maximum number of bytes written to retData is passed through the operand parameter. The return value is in the session SDK (C/C++)/SDK (Java) code page. It is prefixed by two bytes stating its length and has a terminating zero byte at the end. The endian type of the length prefix is the same as the endian type of the SDK (C/C++) client platform.
Points to a buffer for the return code (four bytes). Possible values of the return code are CLI_SUCCESS (0) and CLI_CALLRULE_FAILED(11).
CALLRULE performs a rule call. Rule name and parameters are supplied in a textual form: RULENAME(PARAM1, PARAM2,…,PARAMn). The maximum length of this string is 514 (CLI_MAXRULEEXPRLEN) excluding the length prefix. If a longer string is passed, CALLRULE fails with a CLI_RULEEXPRTOOLONG (3090) error reason code. If params is NULL, CALLRULE fails with a CLI_NORULENAME  (96) error reason code.
If the session stops or abends, or no transaction was started within the session, CALLRULE fails with a CLI_CALLOUTOFSEQ (36) error reason code.
The rules return value is converted to text and placed in the memory pointed to by the retData parameter. The operand parameter is used as an In/out parameter. An application uses it to pass the number of bytes available to store the rules return value and the SDK (C/C++) client uses the parameter to return the length of the whole return value in text form, regardless of possible truncation. The returned length does not include the two-byte length prefix and terminating zero. To determine whether truncation occurred, the application can compare the resulting value to the value of the length prefix of the string in retData buffer.
If the rule does not return a value, an empty string is stored in retData. An empty string in this case is represented by three zero bytes, two for the length prefix, one for the terminating zero.
CALLRULE uses the dataIn and dataOut commareas for binary data exchange between the application and the rule. The format of a commarea is as follows:
If dataIn or dataOut does not reside in accessible memory, CALLRULE fails with the appropriate error reason code. The dataIn memory must be accessible for reading and dataOut for reading and writing.
The TIBCO Object Service Broker Execution Environment creates a copy of dataIn and makes the pointer to the area available to the rule through the APIINHANDLE field of @SESSION(0). For dataOut, the Execution Environment allocates memory for the whole area and copies the area header. A pointer to dataOut is made available through the APIOUTHANDLE field of @SESSION(0). For more information about the @SESSION table, refer to TIBCO Object Service Broker Shareable Tools.
Access to dataIn and dataOut using MAP tables is always granted by the system and MAP tables can be used without @MAP registration of the dataIn and dataOut addresses. dataIn is accessible for reading and dataOut for reading and writing. For more information about MAP tables, refer to TIBCO Object Service Broker Managing Data.
When a rule successfully completes, contents of the dataOut are transferred back from the Execution Environment to the application memory. Consider reducing the number of bytes transmitted to the application by your rule. You do this by properly reformatting the dataOut header, then, before transmitting data back, the Execution Environment reevaluates the dataOut header to determine the correct number of bytes to send back to the application.
STOPTR – Stop a Transaction
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Points to COMMIT/ROLLBACK or NULL. NULL is equivalent to COMMIT. The code page of the parameter is ASCII for Open Systems, and EBCDIC for z/OS.
Points to a memory area where the error reason code (four bytes) is to be placed. If the operation succeeds, the area stays unchanged.
Points to a buffer for the return code (four bytes). Possible values of the return code are CLI_SUCCESS (0) and CLI_STOPTR_FAILED (12).
STOPTR commits or rolls back changes and stops the transaction active within a given session. The current transaction is destroyed and the session transaction nesting level is decremented even if STOPTR fails.
If the session is stops, if it abends, or if no transaction was started within the session, STOPTR fails with a CLI_CALLOUTOFSEQ (36) error reason code.
STOPSS – Stop a Session
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Points to a memory area where the error reason code (four bytes) is to be placed. If the operation succeeds, the area stays unchanged.
Points to a buffer for the return code (four bytes). Possible values of the return code are CLI_SUCCESS (0) and CLI_STOPSS_FAILED (9).
STOPSS stops the session.
If the session abends or was stops, STOPSS fails with a CLI_CALLOUTOFSEQ (36) error reason code.
If there are transactions active within the session, STOPSS fails with a CLI_TRANSACTIVE (128) error reason code, and the session stays active.
All other error reason codes mean that the session shutdown sequence did not complete properly (for instance, network connection was lost during the session shutdown), but the session became inactive anyway.
RESETSS – Drop a Connection to a Session
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Points to a memory area where the error reason code (four bytes) is to be placed. If the operation succeeds, the area stays unchanged.
RESETSS forcefully closes the session by dropping the session connection as opposed to an orderly shutdown by STOPSS. The session does not have to be active for the call to succeed. When a connection is dropped, the Execution Environment generates an error message, and closes the session. All uncommitted data changes are lost.
If session is processed by STARTSS and is not modified directly by the application, RESETSS does not fail. If session is not previously passed to STARTSS or became corrupt, the operation fails with CLI_SESSINVALID(199). Refer to cliProc for information about session area validity checks.
GETENDMSG – Retrieve a Rules End Message
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Points to a memory area where the rules end message is to be placed. The end message has a two-byte length prefix and a terminating zero. The endian type of the length prefix is the same as the endian type of the SDK (C/C++) client platform. The maximum length of TIBCO Object Service Broker rules end message is 148 (CLI_MAXENDMSGLEN in oscli.h), therefore, to accommodate a possible end message, the application must provide a buffer of 151 bytes. The rules end message is in the session SDK (C/C++)/SDK (Java) code page.
Points to a buffer for the return code (four bytes). Possible values are CLI_SUCCESS (0) and CLI_GETENDMSG_FAILED (13).
GETENDMSG retrieves the most recent rules end message. The session does not have to be active for the call to succeed. If no CALLRULE was issued within the session or rules did not generate an end message, an empty string (three bytes of zeroes) is returned.
If session is processed by STARTSS and is not modified directly by the application, GETENDMSG does not fail. If session is not previously passed to STARTSS or became corrupt, the operation fails with CLI_SESSINVALID(199). Refer to cliProc for information about session area validity checks.
SESSACTIVE – Inquire Whether Session Is Active
The following table lists the cliProc parameters used by this operation:
Points to a session area. If STARTSS did not process this area, the SDK (C/C++) client behavior is undefined.
Points to a memory area where the error reason code (four bytes) is to be placed in the case of an error. If the operation succeeds, a value of 1 or 0 (four-bytes, endian type of the SDK (C/C++) platform) is returned. 1 indicates that the session is still active, 0, that it is not active (either abended or stopped by STOPSS or by RESETSS).
Points to a buffer for the return code (four bytes). Possible values of the return code are CLI_SUCCESS (0) or CLI_SESSACTIVE_FAILED (14).
It is possible for a TIBCO Object Service Broker session to become inactive any time after it starts (due to network problems, Execution Environment abnormal terminations, and others).
When that happens, STARTTR, STOPTR, CALLRULE, and STOPSS operations on this session fail with an appropriate error reason code. In addition, appropriate changes to the session area are made to indicate that the session is no longer active, so that subsequent STARTTR, STOPTR, CALLRULE, and STOPSS operations fail with a CLI_CALLOUTOFSEQ (36) error reason code. Use a SESSACTIVE cliProc request to determine whether the session is still active. If the session abends or is stopped by STOPSS or RESETSS, SESSACTIVE returns 0 in the retData area.
If session is processed by STARTSS and is not modified directly by the application, SESSACTIVE should not fail. If session is not previously passed to STARTSS or became corrupt, the operation fails with CLI_SESSINVALID(199). Refer to cliProc for information about session area validity checks.
cliExecTran
This function combines the following cliProc actions:

 
void cliExecTran(CLI_SESSION session,
const char * transParam,
const char * ruleName,
unsigned short * retBufLen,
const void * dataIn,
void * dataOut,
char * retData,
int * retCode);

 
Parameters:
In:
 
Rule call in the form of the string RULE(PARAM1, PARAM2,…PARAMn). For more detail, refer to CALLRULE – Call a Rule.
Maximum length of the retData buffer. For more detail, refer to CALLRULE – Call a Rule.
Out:
 
– CLI_SUCCESS (0)
– CLI_STARTTR_FAILED (10),
– CLI_CALLRULE_FAILED (11),
– CLI_STOPTR_FAILED (12).
Return Value:
None.
Comments
If CALLRULE succeeds, STOPTR is called with the COMMIT parameter. Otherwise, STOPTR is called with the ROLLBACK parameter.
cliSetCodepage
This function indicates the SDK (C/C++)/SDK (Java) code page, that is, the code page that your application expects to use to communicate with TIBCO Object Service Broker sessions.

 
void cliSetCodepage(const char * codepage)

 
Parameter:
 
Address of the SDK (C/C++)/SDK (Java) code page name. The code page name is expected to be 16‑byte blank-padded text. No terminating zero is required. The code page name is expected to be in EBCDIC. The valid values for this field are the code page names shown in TIBCO Object Service Broker National Language Support.
 
WIN‑1252 is recommended for use in clients that do not depend on TIBCO Object Service Broker code pages; it supports all TIBCO Object Service Broker code pages.
ISO8859‑1 works only with code pages that do not support the euro sign.
ISO8859‑15 works only with code pages that support the euro sign.
Also, the following translations occur:
Value of code page
A euro code page
x'9F' (the universal currency symbol) in the non-euro code page «-» 1 x'20' in the euro code page.
A non-euro code page
x'9F' (the universal currency symbol) in the non-euro code page «-» x'20' in the euro code page.
The Windows code page
x'80' (the euro symbol) in the Windows code page «-» x'20' in the non-euro code page.
x'A4' (the universal currency symbol) in the Windows code page «-» code point x'9F' in the non-euro code page.
x'A4' (the universal currency symbol) in the Windows code page «-» x'20' in the euro code page.
x'80' (the euro symbol) in the Windows code page «-» x'9F' in the non-euro code page.

1
In this table, the “«-»” symbol means “translates to, in both directions”.

Return Value:
None.
Comments
The code page setting determines the code page of certain cliProc IN/OUT parameters as well as the external representation of MAP table fields with “*” external syntax and textual internal syntaxes.
The following cliProc parameters are affected by the setting:
The code page name set by cliSetCodepage affects all sessions started after the cliSetCodepage call. Sessions that are already running are not affected.
There is a way to override this global setting on a session basis by specifying an alternative code page name as a parameter for the STARTSS operation. Refer to STARTSS – Start a Session.
Initial value of the code page name is ISO8859‑1 for Open Systems, and IBM‑037 for z/OS.
cliSetCodepage stores, without validation, the code page name for future STARTSS cliProc requests (with no overriding code page specified). If the code page is not supported by TIBCO Object Service Broker, STARTSS fails with a CLI_UNSUPPCODEPAG (161) error reason code.
cliSetCodepage is thread safe and can be called at any time by any application thread. However, due to the fact that cliSetCodepage deals with the global data of the SDK (C/C++) client, some contention can occur if many threads are issuing cliSetCodepage or STARTSS cliProc requests (with no overriding code page specified) at the same time. If you need to simultaneously start sessions with varying code page settings, using the STARTSS operand parameter is a better choice because it does not lead to resource access synchronization by the SDK (C/C++) client.
cliErrorReasonDescr
This function retrieves a textual description of an error reason code returned by cliProc or cliExecTran.

 
const char * cliErrorReasonDescr(int reasonCode)

 
Parameter:
 
Return Value:
Pointer to the textual description of the error reason code. It has a two-byte long prefix and a terminating zero.
Comments
The application must not modify the contents of the description retrieved.
cliCommCreate
This function allocates memory for and formats a commarea with the given structure.

 
void * cliCommCreate( unsigned int count,
unsigned int * segmentSizes)

 
Parameters:
 
Return Value:
Pointer to the beginning of the created commarea (to the count field of the header - refer to the commarea format description in CALLRULE – Call a Rule), or NULL if the memory allocation failed.
Comments
If memory allocation fails, a NULL pointer is returned.
Segment memory is not initialized.
To delete a commarea created by cliCommCreate, you must use cliCommDelete.
cliCommCreate1
This function calls cliCommCreate to allocate memory for, and format, a one-segment commarea.

 
void * cliCommCreate1(unsigned int segmentSize)

 
Parameter:
 
Return Value:
Pointer to the newly created area or NULL if memory allocation failed.
Comments
Use cliCommDelete to delete a commarea created by this function. The segment memory is not initialized.
cliCommDelete
This function deletes a commarea created by cliCommCreate.

 
void cliCommDelete(void * area)

 
Parameter:
 
Return Value:
None.
cliCommFormat
This function formats a memory area according to the commarea format specifications, as supplied through the count and segmentSizes parameters.

 
void cliCommFormat( void * area,
unsigned int count,
unsigned int * segmentSizes)

 
Parameters:
 
Return Value:
None.
Comments
For more about the commarea format, refer to CALLRULE – Call a Rule.
Segment memory is not initialized.
Behavior of this operation is undefined if the area memory area is not large enough to hold the header part of the commarea. Allocation and deallocation of the area memory is the responsibility of the application. Do not use cliCommDelete to deallocate the area memory.
cliCommFormat1
This function formats a one-segment memory area according to the commarea format specifications.

 
void cliCommFormat1(const void * area, unsigned int segmentSize)

 
Parameters:
 
Return Value:
None.
Comments
The commarea structure consists of one segment of segmentSize bytes. For details about the commarea format, refer to CALLRULE – Call a Rule.
Segment memory is not initialized.
Behavior of this operation is undefined if the area memory area is not large enough to hold the header part (12 bytes for the areas with one segment) of the commarea. Allocation and deallocation of the area memory is the responsibility of the application. Do not use cliCommDelete to deallocate the area memory.
cliCommSegment
This function calculates the pointer to a specific commarea segment.

 
void * cliCommSegment(const void * area,
unsigned int segmentNum)

 
Parameters:
 
Return Value:
Pointer to the commarea segment, or NULL if the segment does not exist (count field of the header is less than or equal to segmentNum)
Comments
If the area memory does not comply to the commarea format rules (refer to CALLRULE – Call a Rule), the behavior is undefined.
cliCommSegments
This function retrieves the number of segments in the commarea.

 
unsigned int cliCommSegments(const void * area)

 
Parameter:
 
Return Value:
Number of segments in the commarea.
cliCommSegSize
This function retrieves the size of a specific commarea segment.

 
unsigned int cliCommSegSize(const void * area,
unsigned int segmentNum);

 
Parameters:
 
Return Value:
Size of the commarea segment based on the contents of the commarea header.
If the segment does not exist (that is, the count field in the header is less than or equal to segmentNum), this function returns 0.
Comments
If the area memory does not comply to the commarea format rules (refer to CALLRULE – Call a Rule), the behavior is undefined.
cliCommSize
This function calculates the total size of the commarea, including the header.

 
unsigned int cliCommSize(const void * area)v

 
Parameter:
 
Return Value:
Total size of the commarea.
Comments
If the area memory does not comply to the commarea format rules (refer to CALLRULE – Call a Rule), the behavior is undefined.
cliCommSizeCalc
This function calculates the total number of bytes needed for a commarea with count blocks of sizes supplied in segmentSizes array.

 
unsigned int cliCommSizeCalc(unsigned int count,
unsigned int * segmentSizes)

 
Parameters:
 
Return Value:
Number of bytes needed to accommodate the commarea of the given structure.
cliCommSizeCalc1
This function calculates the total number of bytes needed for a commarea consisting of one segment of segmentSize bytes.

 
unsigned int cliCommSizeCalc1(unsigned int segmentSize)

 
Parameter:
 
Return Value:
Total size needed to accommodate a commarea with one segment of segmentSize bytes
LLCOPY_CSTR(listr, cstr)
This C macro copies a zero-terminated string into a string with a two-byte length prefix.
LLCOPY_MEM(listr, prt, len)
This C macro copies a string with an explicitly specified length into a string with a two-byte length prefix.
LLDECLARE(name, len)
This C macro declares a string with two bytes reserved for the length prefix.
LLSETLEN(listr, len)
This C macro sets a two-byte length prefix.
LLSTR(listr)
This macro retrieves a pointer to the text part of a string that has a two-byte length prefix.
LLSTRLEN(listr)
This C macro retrieves a string length from the string’s two-byte length prefix.
See Also
TIBCO Object Service Broker Managing Data about MAP tables.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved