Interface CCodePlatformConfiguration

    • Method Detail

      • setProjectRootFolderPath

        void setProjectRootFolderPath​(java.lang.String path)
                               throws java.rmi.RemoteException
        Set the path to the project root folder.
        Parameters:
        path - The new path to the project root folder.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getProjectRootFolderPath

        java.lang.String getProjectRootFolderPath()
                                           throws java.rmi.RemoteException
        Get the path to the project root folder.
        Returns:
        The path to the project root folder
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setOutputFolderPath

        void setOutputFolderPath​(java.lang.String path)
                          throws java.rmi.RemoteException
        Set the path to the output folder.
        Parameters:
        path - The new path to the output folder
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getOutputFolderPath

        java.lang.String getOutputFolderPath()
                                      throws java.rmi.RemoteException
        Get the path to the output folder.
        Returns:
        The path to the output folder
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getSourceFileItems

        RemoteList<SourceFileItem> getSourceFileItems()
                                               throws java.rmi.RemoteException
        Get the sources currently contained in this platform
        Returns:
        The list of the currently set source files
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createSourceFileItem

        SourceFileItem createSourceFileItem​(java.lang.String path)
                                     throws java.rmi.RemoteException
        Add a new source file with default settings to this configuration
        Parameters:
        path - The path of this source file relative to the TPT project
        Returns:
        The new created source file
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setWrapperCode

        void setWrapperCode​(java.lang.String wrapperCode)
                     throws java.rmi.RemoteException
        Set the additional wrapper code
        Parameters:
        wrapperCode - The additional wrapper code
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getWrapperCode

        java.lang.String getWrapperCode()
                                 throws java.rmi.RemoteException
        Get the additional wrapper code
        Returns:
        The additional wrapper code, may be empty
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setWrappperIsCpp

        void setWrappperIsCpp​(boolean wrapperIsCpp)
                       throws java.rmi.RemoteException
        Parameters:
        wrapperIsCpp - Set to true if the wrapper code is to be treated as C++. Set to false if the wrapper code is to be treated as C.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getWrappperIsCpp

        boolean getWrappperIsCpp()
                          throws java.rmi.RemoteException
        Returns:
        True if the wrapper code is set to be treated as C++. False if the wrapper code is set to be treated as C.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setWrapperExtraCompilerOptions

        void setWrapperExtraCompilerOptions​(java.lang.String extraOptions)
                                     throws java.rmi.RemoteException
        Parameters:
        extraOptions - Set the extra compiler options for parsing or compiling the wrapper code.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getWrapperExtraCompilerOptions

        java.lang.String getWrapperExtraCompilerOptions()
                                                 throws java.rmi.RemoteException
        Returns:
        The extra compiler options for parsing or compiling the wrapper code.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setCompiler

        void setCompiler​(java.lang.String name)
                  throws java.rmi.RemoteException
        Set the name of the compiler to be used
        Parameters:
        name - The name of the desired compiler
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getCompiler

        java.lang.String getCompiler()
                              throws java.rmi.RemoteException
        Returns:
        The name of the currenty used compiler
        Throws:
        java.rmi.RemoteException - remote communication problem
      • set64Bit

        void set64Bit​(boolean is64Bit)
               throws java.rmi.RemoteException
        Configure if the test frame should be compiled in 64 bit
        Parameters:
        is64Bit - true if the code should be compiled in 64 bit, false otherwise
        Throws:
        java.rmi.RemoteException - remote communication problem
      • is64Bit

        boolean is64Bit()
                 throws java.rmi.RemoteException
        Returns:
        true if the test frame will be compiled in 64 bit, false otherwise
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setTasmoInstrumentationLevel

        @Deprecated
        void setTasmoInstrumentationLevel​(TasmoCCodeInstrumentationLevel instrumentationLevel)
                                   throws java.rmi.RemoteException
        Deprecated.
        Use setCoverageToTPT() to enable TPT coverage which is necessary for Tasmo testcase generation.
        From TPT-19 Tasmo coverage can only be used if code coverage is measured with TPT coverage. For compatibility setting this to FULL_INSTRUMENTATION or COVERAGE_MEASUREMENT will enable TPT-Coverage and thus enable coverage measurement or TASMO testcase generation. Setting this to NO_INSTRUMENTATION will disable Tasmo coverage if it was enabled before.
        Set the TASMO instrumentation level
        Parameters:
        instrumentationLevel - The TASMO instrumentation level
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTasmoInstrumentationLevel

        @Deprecated
        TasmoCCodeInstrumentationLevel getTasmoInstrumentationLevel()
                                                             throws java.rmi.RemoteException
        Deprecated.
        Use getCoverageSettings() and check if the result is an instance of TPTCoverageSettings to check if the platform will be instrumented.
        From TPT-19 a C\C++ platform can either be instrumented or not. For compatibility this method returns FULL_INSTRUMENTATION if TPT-Coverage is selected as coverage tool and null if TPT-Coverage is not enabled.
        Get the TASMO instrumentation level
        Returns:
        The TASMO instrumentation level, FULL_INSTRUMENTATION if TPT-Coverage is enabled and NONE if TPT-Coverage is not enabled.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • isUseEffectiveInterface

        boolean isUseEffectiveInterface()
                                 throws java.rmi.RemoteException
        Returns:
        Is the "use effective interface" option enabled
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setUseEffectiveInterface

        void setUseEffectiveInterface​(boolean useEffectiveInterface)
                               throws java.rmi.RemoteException
        Parameters:
        useEffectiveInterface - En- or disable the "use effective interface" option
        Throws:
        java.rmi.RemoteException - remote communication problem
      • generateCode

        java.util.List<java.lang.String> generateCode​(boolean compile)
                                               throws java.rmi.RemoteException
        Generate the code to connect your c-code to TPT.
        Parameters:
        compile - Immediately compile the code after generation
        Returns:
        A list with warnings that eventually occured, empty list if none occured
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getIncludeFolders

        RemoteList<IncludeFolder> getIncludeFolders()
                                             throws java.rmi.RemoteException
        Returns:
        The list of the include folders
        Throws:
        java.rmi.RemoteException - remote communication problem
      • addIncludeFolder

        IncludeFolder addIncludeFolder​(java.lang.String path)
                                throws java.rmi.RemoteException
        Add a new include folder
        Parameters:
        path - The path of the new include folder
        Returns:
        The new include folder
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getSchedulingItems

        RemoteList<FunctionSchedulingItem> getSchedulingItems()
                                                       throws java.rmi.RemoteException
        Get the list of scheduled functions
        Returns:
        The functions to be scheduled
        Throws:
        java.rmi.RemoteException - remote communication problem
      • analyzeSources

        java.util.List<java.lang.String> analyzeSources()
                                                 throws java.rmi.RemoteException
        The interface of the currently set c files is refreshed based on the sources. To access the imported interface afterwards use getSourcesInterface().
        Returns:
        A list with warnings that eventually occured, empty list if none occured
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getSourcesInterface

        java.util.List<SourceInterface> getSourcesInterface()
                                                     throws java.rmi.RemoteException
        Returns:
        The list of imported sources interfaces, without the wrapper and the unresolved references. To update the interface based on the current sources use analyzeSources()
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getImportedCCodeBySource

        SourceInterface getImportedCCodeBySource​(SourceFileItem sourceFile)
                                          throws java.rmi.RemoteException
        Parameters:
        sourceFile - The relevant source file object
        Returns:
        The imported settings for the given source file, null if no SourceInterface matching this SourceFileItem could be found.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getUnresolvedReferences

        SourceInterface getUnresolvedReferences()
                                         throws java.rmi.RemoteException
        Returns:
        The settings to connect unresolved references
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getWrapperInterface

        SourceInterface getWrapperInterface()
                                     throws java.rmi.RemoteException
        Returns:
        The settings to connect the objects in the wrapper code
        Throws:
        java.rmi.RemoteException - remote communication problem
      • importIO

        java.util.List<java.lang.String> importIO​(Project.SynchronizationMethod syncMethod)
                                           throws java.rmi.RemoteException
        Import the interface based on the current source interface settings (default all). Note: The scheduling table will not be updated here. See syncSchedulingItems() for that purpose.
        Parameters:
        syncMethod - Should the objects be synchronized by name or by external name
        Returns:
        A list with warnings that eventually occured, empty list if none occured
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setLinkerOptions

        void setLinkerOptions​(java.lang.String linkerOptions)
                       throws java.rmi.RemoteException
        Set the linker options used when linking the test frame
        Parameters:
        linkerOptions - The new options for the linker
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getLinkerOptions

        java.lang.String getLinkerOptions()
                                   throws java.rmi.RemoteException
        Get the linker options used when linking the test frame
        Returns:
        The current linker options
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setCompilerOptions

        void setCompilerOptions​(java.lang.String compilerOptions)
                         throws java.rmi.RemoteException
        Set the compiler options used when linking the test frame
        Parameters:
        compilerOptions - The new arguments for the compiler
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getCompilerOptions

        java.lang.String getCompilerOptions()
                                     throws java.rmi.RemoteException
        Get the compiler options used when linking the test frame
        Returns:
        The current compiler options
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getDefinitions

        RemoteIndexedList<java.lang.String,​CCodeDefine> getDefinitions()
                                                                      throws java.rmi.RemoteException
        Get the macro definitions
        Returns:
        An indexed list containing all macro definitions
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setDefinition

        void setDefinition​(java.lang.String name,
                           java.lang.String definition)
                    throws java.rmi.RemoteException
        Add a macro definition or overwrite an existing one
        Parameters:
        name - The name of the new definition
        definition - The new value of that definition, null will be treated like a definition without a value
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getCoverageSettings

        CoverageSettings getCoverageSettings()
                                      throws java.rmi.RemoteException
        Get the current coverage settings
        Returns:
        The current coverage settings or null if coverage is disabled
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setCoverageToCTC

        CTCCoverageSettings setCoverageToCTC()
                                      throws java.rmi.RemoteException
        Enable CTC++ coverage measurement to be used for this platform
        Returns:
        The CTC++ coverage settings that will be used
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setCoverageToGCov

        GCovCoverageSettings setCoverageToGCov()
                                        throws java.rmi.RemoteException
        Enable GNU gcov coverage measurement to be used for this platform
        Returns:
        The GNU gcov coverage settings that will be used
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setCoverageToTPT

        TPTCoverageSettings setCoverageToTPT()
                                      throws java.rmi.RemoteException
        Enable TPT coverage measurement to be used for this platform, enables TASMO test case generation
        Returns:
        The TPT coverage settings that will be used
        Throws:
        java.rmi.RemoteException - remote communication problem
      • disableCoverage

        void disableCoverage()
                      throws java.rmi.RemoteException
        Disable any sort of code coverage measurement in this platform
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setA2LFile

        void setA2LFile​(java.lang.String a2lFilePath)
                 throws java.rmi.RemoteException
        Sets path of the A2L file.
        Parameters:
        a2lFilePath - relative or absolute path to the A2L file. If null is passed, the currently set path will be removed.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • importSourceFromCMakeJSonFile

        java.lang.String importSourceFromCMakeJSonFile​(java.lang.String jsonFile)
                                                throws java.rmi.RemoteException,
                                                       ApiException
        Adds the information of a JSON file generated by cmake to this configuration. Previous preprocessor defines will be overwritten.
        Parameters:
        jsonFile - The path to the JSON file to be imported
        Returns:
        If warnings occured during the import, empty string if no warnings occured.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the file cannot be imported