Problem with script execution

Hello,
I have an Orocos application with 3 components : SystemTask, ControllerTask and the FileReporting. Everything is working fine when I use the TaskBrowser. I wrote this simple program :

program TestReportProgram {
do Reporter.start()
do ControllerTask.start()
}

When I load the application, I do the following commands :

In Task SystemTask[S]. (Status of last Command : none )
(type 'ls' for context info) :start()
Got :start()
= true

In Task SystemTask[R]. (Status of last Command : none )
(type 'ls' for context info) :scripting.loadPrograms("TestReportProgram")
Got :scripting.loadPrograms("TestReportProgram")
122.822 [ Info ][ProgramLoader::loadProgram] Parsing file TestReportProgram
122.822 [ Info ][ProgramLoader::loadProgram] Loading Program 'TestReportProgram'
= true

In Task SystemTask[R]. (Status of last Command : none )
(type 'ls' for context info) :TestReportProgram.start()
Got :TestReportProgram.start()

In Task SystemTask[R]. (Status of last Command : queued )
(type 'ls' for context info) :

In Task SystemTask[R]. (Status of last Command : busy )
(type 'ls' for context info) :list TestReportProgram
1 program TestReportProgram {
S> 2 do Reporter.start()
3 do ControllerTask.start()
4 }

In Task SystemTask[R]. (Status of last Command : busy )
(type 'ls' for context info) :Reporter.isRunning()
Got :Reporter.isRunning()
= true

In Task SystemTask[R]. (Status of last Command : busy )
(type 'ls' for context info) :ControllerTask.isRunning()
Got :ControllerTask.isRunning()
= true

As I can see, both task are running so the program has been correctly executed. However, the status of the last Command still "busy". What does that mean?

Thank you,

Philippe Hamelin

Problem with script execution

Hi Philippe,

On Tue, Nov 18, 2008 at 02:28:31PM -0000, philippe [dot] hamelin [..] ... wrote:

> I have an Orocos application with 3 components : SystemTask,
> ControllerTask and the FileReporting. Everything is working fine
> when I use the TaskBrowser. I wrote this simple program :
>
> program TestReportProgram {
> do Reporter.start()
> do ControllerTask.start()
> }
>
> When I load the application, I do the following commands :
>
> In Task SystemTask[S]. (Status of last Command : none )
> (type 'ls' for context info) :start()
> Got :start()
> = true
>
> In Task SystemTask[R]. (Status of last Command : none )
> (type 'ls' for context info) :scripting.loadPrograms("TestReportProgram")
> Got :scripting.loadPrograms("TestReportProgram")
> 122.822 [ Info ][ProgramLoader::loadProgram] Parsing file TestReportProgram
> 122.822 [ Info ][ProgramLoader::loadProgram] Loading Program 'TestReportProgram'
> = true
>
> In Task SystemTask[R]. (Status of last Command : none )
> (type 'ls' for context info) :TestReportProgram.start()
> Got :TestReportProgram.start()
>
> In Task SystemTask[R]. (Status of last Command : queued )
> (type 'ls' for context info) :
>
> In Task SystemTask[R]. (Status of last Command : busy )
> (type 'ls' for context info) :list TestReportProgram
> 1 program TestReportProgram {
> S> 2 do Reporter.start()
> 3 do ControllerTask.start()
> 4 }
>
> In Task SystemTask[R]. (Status of last Command : busy )
> (type 'ls' for context info) :Reporter.isRunning()
> Got :Reporter.isRunning()
> = true
>
> In Task SystemTask[R]. (Status of last Command : busy )
> (type 'ls' for context info) :ControllerTask.isRunning()
> Got :ControllerTask.isRunning()
> = true
>
> As I can see, both task are running so the program has been
> correctly executed. However, the status of the last Command still
> "busy". What does that mean?

I can reproduce this. Interestingly, it seems the busy state only
shows up if the script is started as "ProgName.start()". If started as
"engine.startProgram("TestProgram")" everything seems to work fine.

I'm not sure what the difference between these two calling styles is,
and it's not quite obvious to me from looking at TaskBrowser.cpp
yet...

Best regards
Markus