Can't I wrap RTAI data structure into a class?

Yamato Kira <[email protected]> Mon, 5 Dec 2016 09:05:45 +0000
Newsgroups gmane.linux.real-time.rtai
Message-ID <DM5PR19MB15483D717829209E3A1DA9F6C5830@DM5PR19MB1548.namprd19.prod.outlook.com>
Hi, everyone~

I am trying to wrap RTAI into a class in a C++ project.

I included the header rtai.h and added a RTIME member succesfully.  But when I added a RT_TASK pointer, Eclipse alarms with an error which reads as:
Description                                           Resource    Path                      Location    Type
‘RT_TASK’ does not name a type    mClass.h    /RTAIInCpp/src    line 21       C/C++ Problem
How can it recognize RTIME but not for RT_TASK?
I am so confused........

P.S.: My simple header file is as following:

**************************************************
/*
 * mClass.h
 *
 *  Created on: 2016年12月5日
 *      Author: athrun
 */
#include<rtai.h>
#include<iostream>

#ifndef MCLASS_H_
#define MCLASS_H_

using namespace std;

class mClass{
public:
    mClass();
    ~mClass();
    int mWork();
    RTIME obj_rtTime;
    RT_TASK * obj_RT_TASK;

};

#endif /* MCLASS_H_ */
**************************************************


                                                                                                                                              yours: C.P.

                                                                                                                                              2016-12-05

_______________________________________________
Rtai mailing list
[email protected]
https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai