Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name problem of the state types #26

Open
annaborn opened this issue Mar 2, 2021 · 2 comments
Open

Name problem of the state types #26

annaborn opened this issue Mar 2, 2021 · 2 comments

Comments

@annaborn
Copy link

annaborn commented Mar 2, 2021

Hello,

the test tasks could not be built.
If the tests are enabled, the following error occurs:

2021-03-02 11:36:10 +0100: running /usr/bin/ruby2.5 -S /opt/rock/master-20.06/rock-master-20.06-ruby-orogen/bin/orogen --corba --extensions=cpp_proxies,modelExport --extensions=metadata_support --import=std --no-rtt-scripting --parallel-build=4 --test --transports=corba,mqueue,typelib --type-export-policy=used iodrivers_base.orogen in directory /drivers/orogen/iodrivers_base /drivers/orogen/iodrivers_base/.orogen/typekit/types/iodrivers_base/TaskStates.hpp:78:10: error: redefinition of 'test_STATES' enum test_STATES ^ /drivers/orogen/iodrivers_base/.orogen/typekit/types/iodrivers_base/TaskStates.hpp:55:10: note: previous definition is here enum test_STATES ^ 1 error generated.

The state types of the tasks test::FDTask and test::PeriodicTask have same name: enum test_STATES

#ifndef iodrivers_base_TASKS_STATES
#define iodrivers_base_TASKS_STATES
namespace iodrivers_base
{
    
    enum Task_STATES
    {
        
            Task_INIT,
        
            Task_PRE_OPERATIONAL,
        
            Task_FATAL_ERROR,
        
            Task_EXCEPTION,
        
            Task_STOPPED,
        
            Task_RUNNING,
        
            Task_RUNTIME_ERROR,
        
            Task_IO_ERROR,
        
            Task_IO_TIMEOUT
        
    };
    
    enum Proxy_STATES
    {
        
            Proxy_INIT,
        
            Proxy_PRE_OPERATIONAL,
        
            Proxy_FATAL_ERROR,
        
            Proxy_EXCEPTION,
        
            Proxy_STOPPED,
        
            Proxy_RUNNING,
        
            Proxy_RUNTIME_ERROR,
        
            Proxy_IO_ERROR,
        
            Proxy_IO_TIMEOUT
        
    };
    
    enum test_STATES
    {
        
            test_INIT,
        
            test_PRE_OPERATIONAL,
        
            test_FATAL_ERROR,
        
            test_EXCEPTION,
        
            test_STOPPED,
        
            test_RUNNING,
        
            test_RUNTIME_ERROR,
        
            test_IO_ERROR,
        
            test_IO_TIMEOUT
        
    };
    
    enum test_STATES
    {
        
            test_INIT,
        
            test_PRE_OPERATIONAL,
        
            test_FATAL_ERROR,
        
            test_EXCEPTION,
        
            test_STOPPED,
        
            test_RUNNING,
        
            test_RUNTIME_ERROR,
        
            test_IO_ERROR,
        
            test_IO_TIMEOUT
        
    };
    
}
#endif

@annaborn annaborn changed the title TaskStates naming of the state types Name problem of the state types Mar 2, 2021
@doudou
Copy link
Member

doudou commented Mar 3, 2021

This has most probably something to do with your orogen version and/or some extensions that change orogen's behavior. Could you try without the cpp_proxies and modelExport extensions you are using ?

This is not the only package that currently has more than one task under test::.

FYI, the task states are indeed unscoped, which forbids having the same class name in two different namespaces, e.g. no

task_context "Task" do
end
task_context "test::Task" do
end

@doudou
Copy link
Member

doudou commented May 18, 2021

@annaborn, ping ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants