Skip to content

Usage setup

1. Cc< Name >

  • Right click to "Cc< Name >" -> "Open Specification"

    Screenshot

    • Edit < Name > or < NAME > adhere to uppercase or lowercase, how you look to < Name >

    Header Preference

    #if (defined(USE_WSTYPE_< NAME >))

    Header Ending

    #endif

    RTActorId incarnateCc< Name >(Frame::Base& oFrame,RTActorRef& oRole,CdString* psName);

    bool UseCc< Name >();

    Implementation Preface

    #if (defined(USE_WSTYPE_< NAME >))

    Implementation Ending

    RTActorId incarnateCc< Name >(Frame::Base& oFrame,RTActorRef& oRole,CdString* psName){return oFrame.incarnate(oRole,Cc< Name >,psName,&RTType_CdString,0,-1);}

    bool UseCc< Name >(){return true;}

    #else

    RTActorId incarnateCc< Name >(Frame::Base& oFrame,RTActorRef& oRole,CdString* psName){CrAssertExLog(!"Incarnate of unused Cc< Name >"); return RTActorId(NULL);}

    bool UseCc< Name >(){return false;}

    #endif


2. Cc< Name >Logic

  • Right click to "Cc< Name >Logic" -> "Open Specification"

    Screenshot

    • Edit < Name > or < NAME > adhere to uppercase or lowercase, how you look to < Name >

    Header Preference

    #if (defined(USE_WSTYPE_< NAME >))

    Header Ending

    #endif

    Implementation Preface

    #if (defined(USE_WSTYPE_< NAME >))

    Implementation Ending

    #endif


3. HdrScpUsage

  • open path in Rose: "Model/Logical View/ScbLib/ScpHeaders" -> "HdrScpUsage"

    -> Tab "C++"

    -> Right click "Headers preface" -> "Edit in new windows"

  • add USE_WSTYPE_< NAME > to USE_ALL section

Example

#if (defined(USE_ALL))

//########### MainTestMC ###############################################

#define USE_WSTYPE_MAIN_TEST_MC

#endif

  • add WSTYPE_< NAME > "< Name >" (do not forget to put USE_WSTYPE_< NAME > to usage file (UsageAppl< ProjectName >.h))

Example

//############ MainTestMC ################################################

#define WSTYPE_MAIN_TEST_MC "MainTestMC"

  • or you can use main USE_WSTYPE_< NAME > which must be defined in usage file and base on it define others

Example

#if (defined(USE_ALL))

//########### MainTestMC ###############################################

#define USE_WSTYPE_MAIN_TEST_MC

#endif

//############ MainTestMC ################################################

#if defined(USE_WSTYPE_MAIN_TEST_MC)

#define USE_WSTYPE_STACKER

#define USE_WSTYPE_MANIPULATOR

#define USE_WSTYPE_STAMPER

#define USE_WSTYPE_SEPARATOR

#define WSTYPE_MAIN_TEST_MC             "MainTestMC"

#define WSTYPE_STACKER                  "Stacker"

#define WSTYPE_MANIPULATOR              "Manipulator"

#define WSTYPE_STAMPER                  "Stamper"

#define WSTYPE_SEPARATOR                "Separator"

#endif

  • "Apply" -> "OK"

4. Create Lib and connect to others libs

  • open path in Rose: "Model/Component View/< TestMcComponents >/../LbMTT_CEx86"

    • Here right click to lib and choose "Duplicate" or press "ctrl+shit+D"

    Screenshot

    • rename copy lib to "Lb< Name >_CEx86"
  • two clicks "Lb< Name >_CEx86"

    • open tab "References " abd delete lib it's here (look picture delete "Manipulator")

    Screenshot

    • drag and drop folder to "References"

    Screenshot

    • open tab "Relations" and delete "depends on..." which not use this lib

    Screenshot

    • open tab "C++ Compilation" and check "TargetConfiguration"

    Screenshot

    • Confirm "OK"
  • open path in Rose: "Model/Component View/< TestMcComponents >/../" -> open "Dependecies"

    • drag and drop lib "Lb< Name >_CEx86" to window "Dependecies"

    Screenshot

    • and give arrow "C++ Executable" to "YourLib" in that order, look picture

    Screenshot

    Warning

    If you give arrow contrariwise

    You must open lib "Lb< Name >_CEx86" -> "Relations"

    and delete "depends... Exe..."

    Screenshot

  • Now you can Build


5. Add to Evaluate and Incernate

  • open path in Rose: "Model/Logical View/ScpLib/ScpSystem/ScpMachineTypes/ScpMachineTypes< Name >" -> "CcScpSystem< Name >"

    • open "Evaluateparam"

      • Tab "Detail"

      • add new line

        Example

        if ( UseCc< Name >() ) oSA << WSTYPE_< NAME >;

      Screenshot

      • confirm "OK"
    • open "IncarnateWorkStation"

      • add new line

        Example

        if ( UseCc< Name >() ) if ( m_pxeUnitTypes[nIdx].Compare( WSTYPE_< NAME > )) oId=incarnateCc< Name > ( frame,*pTargetRole,&s );

      Screenshot

6. Add to Dependecies

  • open path in Rose: "Model/Logical View/ScpLib/ScpSystem/ScpMachineTypes/ScpMachineTypes< Name >" -> "Dependencies"

    • drag&drop "Cc< Name>"

    • and give arrow look picture

    Screenshot

    • open path in Rose: "Model/Logical View/ScpLib/ScpSystem/ScpMachineTypes/ScpMachineTypes< Name >"

    • Two clicks "CcScpMachineTypes< Name >" -> "Relations"

    Screenshot

    • Set Inclusion and None

    Screenshot