CTBCAFComm
From TBwiki
(Difference between revisions)
(Initial documentation for this page) |
m |
||
Line 4: | Line 4: | ||
Parameters for this module are contained in class ''CTBCAFCommParams''. | Parameters for this module are contained in class ''CTBCAFCommParams''. | ||
− | Please refer to documentation in the C++ header files for class CTBCAFCommParams to know more about available parameters. | + | Please refer to documentation in the C++ header files for class ''CTBCAFCommParams'' to know more about available parameters. |
== Example usage == | == Example usage == |
Revision as of 10:13, 30 May 2011
This library is mandatory for enabling communication with other applications, such as toolpack_engine, or the Toolpack OAM system. All Toolpack applications must initialize this module.
This module should be initialized through the GlobalSetParams function. Parameters for this module are contained in class CTBCAFCommParams.
Please refer to documentation in the C++ header files for class CTBCAFCommParams to know more about available parameters.
Example usage
TBX_RESULT MyApplication::Init() { TBX_RESULT Result = TBX_RESULT_OK; CTBCAFGlobalsParams CafGlobalParams; CTBCAFCommParams CafCommParams; // Set the parameters you want CafCommParams.mstrApplicationName = "MyApplication"; // (other parameters are generally left to default values) CafGlobalParams.mpCommParams = &CafCommParams; CafGlobalParams.mfDetectHosts = TBX_TRUE; // Allow communicating with toolpack_engine CafGlobalParams.mfDetectAdapters = TBX_FALSE; // This application does not need to directly communicate with TMedia units // CafGlobalParams.mpLogParams = [your paramters...] // CafGlobalParams.mpCliParams = [your paramters...] // etc... Result = TBCAF::GlobalSetParam( &CafGlobalParams ); return Result; } TBX_RESULT MyApplication::UnInit() { TBX_RESULT Result = TBX_RESULT_OK; // Terminate all CAF modules mGlobalParams.Clear(); Result = TBCAF::GlobalSetParam( &mGlobalParams ); return Result; }