CTBCAFComm
From TBwiki
(Difference between revisions)
m |
|||
Line 33: | Line 33: | ||
{ | { | ||
TBX_RESULT Result = TBX_RESULT_OK; | TBX_RESULT Result = TBX_RESULT_OK; | ||
+ | CTBCAFGlobalsParams EmptyGlobalParams; | ||
// Terminate all CAF modules | // Terminate all CAF modules | ||
− | + | Result = TBCAF::GlobalSetParam( &EmptyGlobalParams ); | |
− | Result = TBCAF::GlobalSetParam( & | + | |
return Result; | return Result; | ||
} | } |
Latest revision as of 10:19, 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; CTBCAFGlobalsParams EmptyGlobalParams; // Terminate all CAF modules Result = TBCAF::GlobalSetParam( &EmptyGlobalParams ); return Result; }