Changeset 409


Ignore:
Timestamp:
04/30/2010 01:39:26 PM (11 years ago)
Author:
KDucasse
Message:
 
Location:
UH/SAMGAR/SAMGAR LIB/Trunk/HeaderFiles
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • UH/SAMGAR/SAMGAR LIB/Trunk/HeaderFiles/SamgarMainClass.h

    r121 r409  
    2323public: 
    2424 
    25          Bottle SavedBottle; 
     25         Bottle SavedBottle0,SavedBottle1,SavedBottle2; 
    2626         int istherebottle; 
     27         bool InRead; 
     28         int bottlenum; 
    2729 
    2830        virtual void onRead(Bottle& b) 
    2931        { 
     32        //      this-> 
     33        //      puts("in onread"); 
     34                InRead=true; 
    3035                *Status = running; 
    31                 SavedBottle=b; 
     36 
     37         
     38                switch(bottlenum) 
     39                { 
     40                case 2: 
     41                SavedBottle2=b; 
     42                bottlenum=0; 
     43                break; 
     44                case 1: 
     45                SavedBottle1=b; 
     46                bottlenum=2; 
     47                break; 
     48                case 0: 
     49                SavedBottle0=b; 
     50                bottlenum=1; 
     51                break; 
     52                } 
    3253                istherebottle=1; 
     54                InRead=false; 
     55        //      puts("out of onread"); 
    3356        } 
    34          DataPort(int *lala) {Status = lala; } 
     57         DataPort(int *lala) {Status = lala; bottlenum =0;} 
    3558}; 
    3659 
     
    5679         ImageOf<PixelBgr> yarpImage; 
    5780         /* only for internal use , use acessor methods to retrive data */ 
    58          bool GetDataFromPort(string NameOfPort,int TypeOfData, int *I = 0,float *F =0,double *D =0 , string *S= 0,Bottle *B =0); 
     81         bool GetDataFromPort(string NameOfPort,int TypeOfData, int *I = 0,float *F =0,double *D =0 , string *S= 0,Bottle *B =0 ,int mode = 0); 
    5982         /* Only for internal use , user acessor methods to send data */ 
    6083         void SendData(int type,string port,string S ,int I ,double D,float F,Bottle B); 
     
    6285 
    6386public : 
     87 
     88        static const int interupt = 0; 
     89        static const int run      = 1; 
     90        static const int NoStep   = 0; 
     91        static const int Step     = 1; 
     92//      int  
     93 
    6494 
    6595        void GetAvailPlatforms(void); 
     
    87117        /* give a name and setup the image port */ 
    88118        void SetupImagePort(string outputname); 
    89         /* get the int data of port named, also give it the memory locatoin of interger to be chaned, returns true if new data avail */ 
    90         bool GetIntData(string NameOfPort,int *I); 
    91         /* get the float data of port named, also give it the memory locatoin of float to be chaned, returns true if new data avail */ 
    92         bool GetFloatData(string NameOfPort,float *I); 
    93         /* get the double data of port named, also give it the memory locatoin of double to be chaned, returns true if new data avail */ 
    94         bool GetDoubleData(string NameOfPort,double *I); 
    95         /* get the string data of port named, also give it the memory locatoin of string to be chaned, returns true if new data avail */ 
    96         bool GetStringData(string NameOfPort,string *I); 
    97         /* get the Bottle data of port named, also give it the memory locatoin of string to be chaned, returns true if new data avail */ 
    98         bool GetBottleData(string NameOfPort,Bottle *B); 
     119        /* get the int data of port named, also give it the memory locatoin of interger to be chaned, returns true if new data avail 
     120           mode nostep = low volume data, mode step = high volume data 
     121        */ 
     122        bool GetIntData(string NameOfPort,int *I, int mode); 
     123        /* get the float data of port named, also give it the memory locatoin of float to be chaned, returns true if new data avail  
     124           mode nostep = low volume data, mode step = high volume data 
     125        */ 
     126        bool GetFloatData(string NameOfPort,float *I, int mode); 
     127        /* get the double data of port named, also give it the memory locatoin of double to be chaned, returns true if new data avail  
     128           mode nostep = low volume data, mode step = high volume data 
     129        */ 
     130        bool GetDoubleData(string NameOfPort,double *I, int mode); 
     131        /* get the string data of port named, also give it the memory locatoin of string to be chaned, returns true if new data avail  
     132           mode nostep = low volume data, mode step = high volume data 
     133        */ 
     134        bool GetStringData(string NameOfPort,string *I, int mode); 
     135        /* get the Bottle data of port named, also give it the memory locatoin of string to be chaned, returns true if new data avail  
     136           mode nostep = low volume data, mode step = high volume data 
     137        */ 
     138        bool GetBottleData(string NameOfPort,Bottle *B, int mode); 
    99139 
    100140        /* send data to port */ 
  • UH/SAMGAR/SAMGAR LIB/Trunk/HeaderFiles/UserVars.h

    r121 r409  
    1717using namespace yarp::os; // network stuff 
    1818using namespace yarp::sig;// image stuff 
    19 //using namespace yarp::os; 
     19using namespace yarp::os; 
    2020 
    2121#define TypeInt 0 
     
    2626 
    2727// types of module 
    28 #define interupt 0 
    29 #define run      1 
     28//#define interupt 0 
     29//#define run      1 
    3030// current mode 
    3131#define running 0 
Note: See TracChangeset for help on using the changeset viewer.