Hi all,
I'm trying to learn how to create Typekits following the instructions of
page 4 of " Extending the Real-Time Toolkit with your own Data Types".
Using the code explained in this page I obtain a compiling error:
...
error: expected type-specifier before ‘addType’
error: expected constructor, destructor, or type conversion before ‘addType’
...
Thanks for any hint
Luca
Telling th RTT about a struct
On Mon, May 28, 2012 at 5:52 PM, Luca Magnabosco
<magnabosco [dot] luca [..] ...>wrote:
> Hi all,
> I'm trying to learn how to create Typekits following the instructions of
> page 4 of " Extending the Real-Time Toolkit with your own Data Types".
> Using the code explained in this page I obtain a compiling error:
> ...
> error: expected type-specifier before ‘addType’
> error: expected constructor, destructor, or type conversion before
> ‘addType’
>
A link to the document you're consulting would have been helpful...
I'm assuming you're talking about
http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-typek...
That last line is meant to be written in a C++ function, such as main() or
the constructor of your component.
You can't write that in the top-level C++ 'scope'.
Peter
Telling th RTT about a struct
Really thank you for your help!
Next time I will add the link and not only the title.
Best regards
Luca
Telling th RTT about a struct
Hi all,
thanks to Peter's hint I have a struct and a vector of struct correctly
recognised by RTT,
however I haven't understand yet, how can I obtain that RTT recognises a
simple type like:
"unsigned char" or "unsigned short"...
Best regards
Luca
Telling th RTT about a struct
Luca Magnabosco wrote:
> Hi all,
> thanks to Peter's hint I have a struct and a vector of struct correctly
> recognised by RTT,
> however I haven't understand yet, how can I obtain that RTT recognises a
> simple type like:
> "unsigned char" or "unsigned short"...
I've been wondering about this too, in particular in relation to the 'orocos_typegen_headers' CMake statement. How does one let OROCOS know about uint64_t for instance? Is it necessary to typedef these to some project wide type (typedef uint64_t my_uint64_t)?
Telling th RTT about a struct
On Tue, Jun 5, 2012 at 12:36 PM, g ah <gaohml [..] ...> wrote:
>
> Luca Magnabosco wrote:
> > Hi all,
> > thanks to Peter's hint I have a struct and a vector of struct correctly
> > recognised by RTT,
> > however I haven't understand yet, how can I obtain that RTT recognises a
> > simple type like:
> > "unsigned char" or "unsigned short"...
>
Types()->addType( new StdTypeInfo<unsigned char>("uchar") );
http://people.mech.kuleuven.be/~orocos/pub/documentation/rtt/v2.x/api/ht...
>
> I've been wondering about this too, in particular in relation to the
> 'orocos_typegen_headers' CMake statement. How does one let OROCOS know
> about uint64_t for instance? Is it necessary to typedef these to some
> project wide type (typedef uint64_t my_uint64_t)?
>
>
These are defined in the 'standard' typekits which RTT itself or ROS
provides. For typegen, I'm not sure how it works, but we just use typegen
in combination with ROS, which provides all these types.
Peter