![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Sample Application Using the SDK (C/C++)The sample program is available in the \install_folder\RemoteCLI\src folder.The Microsoft Visual C++ 6.0 compiler should be available. Microsoft provides a script file (VCVARS32.BAT) to initialize environment variables for the development environment. The following instructions assume that the OS_ROOT environment variable is initialized and the following directories exist:@REM Search in the standard TIBCO Object Service Broker libraries for '.h' files.@REM Search in the standard TIBCO Object Service Broker libraries for unsatisfied external references.@REM (The following is one command, appearing here on several lines for readability.)CL /I "%OS_ROOT%\RemoteCLI\INCLUDE"
/I "%OS_ROOT%\EXTRC\INCLUDE"
/I "%OS_ROOT%\SRC\ENCRYPT"
/I "%OS_ROOT%\SRC\SECURITY"
/nologo /TP
/Fo"E:\obj\RCLISAMP.obj" "E:\src\RCLISAMP.cpp"
/link /DEFAULTLIB:"%OS_ROOT%\RemoteCLI\LIB\OSCLI"
/DEFAULTLIB:"%OS_ROOT%\EXTRC\LIB\OSEXTUSR"
/out:"E:\bin\RCLISAMP.EXE"
The parameter string “CLIHOST=localhost,CLIPORT=9068” contains no white space. Therefore it is passed to the program as a single parameter. The sample assumes that the PORT parameter supplied to the osMon process is defined as, or defaulted to, 9068.The g++ compiler should be available in /usr/local/bin. The following instructions assume that the OS_ROOT environment variable is initialized and the following directories exist:g++ -D_POSIX_C_SOURCE=199506L -U_XOPEN_SOURCE \
-D_XOPEN_SOURCE -D__EXTENSIONS__ -D_REENTRANT \
-I$OS_ROOT/RemoteCLI/include \
-L$OS_ROOT/sharedlib \
-loscli -losextusr -losscalar -loscs -losdobext \
-losmisc -losmsgs -losencryp -lossecur -lsocket \
-losbrand -lnsl -lpthread \
-lrt \
-o$HOME/bin/RCLISAMP \
$HOME/src/RCLISAMP.cpp
The parameter string “CLIHOST=localhost,CLIPORT=8032” contains no white space. Therefore it is passed to the program as a single parameter. The sample assumes that the PORT parameter supplied to the osMon process is defined as 8032.
The sample uses the HURON1 TIBCO Object Service Broker user with a password of HURON1.This is a sample of a rule that creates an occurrence of the LOG TDS table, generates an end message, and returns a value. On completion of the rule, the changes are not committed because the transaction is still active. The SDK (C/C++) program explicitly stops the transaction by issuing STOPTR with a COMMIT flag or a ROLLBACK flag to indicate whether the changes are to be committed.
CALLRULE completed, return value: 'RETURN VALUE OF RULE "TC007113RU002"'
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |