Using lua for deployment : setActivity

Hi,

Is there another way to define the schedtype in lua thant write a
number manually ? Isn't it a constant like "rtt.ORO_SCHED_OTHER" to do
this ?

extract from the cokbook ($8.2)
http://www.orocos.org/wiki/orocos/toolchain/LuaCookbook#toc41

Using lua for deployment : setActivity

Hi Willy,

On Fri, Apr 06, 2012 at 06:55:11PM +0200, Willy Lambert wrote:

> Is there another way to define the schedtype in lua thant write a
> number manually ? Isn't it a constant like "rtt.ORO_SCHED_OTHER" to do
> this ?

Yes, you need to access the globals repository:

> =rtt.globals
{SendNotReady=SendNotReady,LOCK_FREE=2,NewData=NewData,SendFailure=SendFailure,SendSuccess=SendSuccess,ORO_SCHED_OTHER=0,NoData=NoData,ORO_SCHED_RT=1,UNSYNC=0,LOCKED=1,OldData=OldData,BUFFER=1,DATA=0}
> =rtt.globals.ORO_SCHED_OTHER
0
>

> extract from the cokbook ($8.2)
> http://www.orocos.org/wiki/orocos/toolchain/LuaCookbook#toc41
>

Using lua for deployment : setActivity

2012/4/9 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>:
> Hi Willy,
>
> On Fri, Apr 06, 2012 at 06:55:11PM +0200, Willy Lambert wrote:
>
>> Is there another way to define the schedtype in lua thant write a
>> number manually ? Isn't it a constant like "rtt.ORO_SCHED_OTHER" to do
>> this ?
>
> Yes, you need to access the globals repository:
>
>  > =rtt.globals
>  {SendNotReady=SendNotReady,LOCK_FREE=2,NewData=NewData,SendFailure=SendFailure,SendSuccess=SendSuccess,ORO_SCHED_OTHER=0,NoData=NoData,ORO_SCHED_RT=1,UNSYNC=0,LOCKED=1,OldData=OldData,BUFFER=1,DATA=0}
>  > =rtt.globals.ORO_SCHED_OTHER
>  0
>  >
>
>> extract from the cokbook ($8.2)
>> http://www.orocos.org/wiki/orocos/toolchain/LuaCookbook#toc41
>>

Using lua for deployment : setActivity

On Mon, Apr 09, 2012 at 06:29:07PM +0200, Willy Lambert wrote:
> 2012/4/9 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>:
> > Hi Willy,
> >
> > On Fri, Apr 06, 2012 at 06:55:11PM +0200, Willy Lambert wrote:
> >
> >> Is there another way to define the schedtype in lua thant write a
> >> number manually ? Isn't it a constant like "rtt.ORO_SCHED_OTHER" to do
> >> this ?
> >
> > Yes, you need to access the globals repository:
> >
> >  > =rtt.globals
> >  {SendNotReady=SendNotReady,LOCK_FREE=2,NewData=NewData,SendFailure=SendFailure,SendSuccess=SendSuccess,ORO_SCHED_OTHER=0,NoData=NoData,ORO_SCHED_RT=1,UNSYNC=0,LOCKED=1,OldData=OldData,BUFFER=1,DATA=0}
> >  > =rtt.globals.ORO_SCHED_OTHER
> >  0
> >  >
> >
> >> extract from the cokbook ($8.2)
> >> http://www.orocos.org/wiki/orocos/toolchain/LuaCookbook#toc41
> >>
> >> -- create activity for producer: period=1, priority=0,
> >> -- schedtype=ORO_SCHED_OTHER (1).
> >> depl:setActivity("producer", 1, 0, 1)
> >
> > depl:setActivity("producer", 1, 0, rtt.globals.ORO_SCHED_OTHER)
> >
> > Markus
>
> Thanks, I updated the cookbook to correct the setActivity statement.
> The globals were documented but I forgot that ^^

Thanks!
Markus