Main Page Class Hierarchy Compound List File List Compound Members File Members

# /home/gilberto/prog/tesi2.31/lib/Packages/AiboInfoPkg.h

Go to the documentation of this file.

    00001 #ifndef AIBOINFOPKG_H_DEF
    00002 #define AIBOINFOPKG_H_DEF
    00003
    00004 #include "TelepatiPkg.h"
    00005
    00006 using namespace std;
    00010 enum aiboState{
    00011   ACTIVE=0,
    00012   WAITINGREPLY=1,
    00013   INACTIVE=2,
    00014   BYED=3
    00015 };
    00016
    00025 class AiboInfoPkg : public TelepatiPkg {
    00026  public:
    00028   AiboInfoPkg();
    00033   AiboInfoPkg(aiboState* aiboAct, int aiboNum=0, int a=TelepatiPkg::ADDR_INVALID);
    00036   AiboInfoPkg(byte* ptr);
    00037
    00039   virtual ~AiboInfoPkg();
    00040
    00043   virtual TelepatiPkg* clone();
    00044
    00048   byte* getMsg();
    00049
    00051   inline int getNumOfAibo() { return numOfAibo; };
    00055   inline bool isActive(int a){
    00056     if(a < numOfAibo)
    00057       return (aiboActive[a] == ACTIVE || aiboActive[a] == WAITINGREPLY) ? true: false;
    00058     else
    00059       return false;
    00060   };
    00061
    00065   bool isAllActive();
    00066
    00067  private:
    00068   int numOfAibo; /* numero di Aibo presenti*/
    00069   aiboState *aiboActive; /* array degli stati di attivita' degli Aibo*/
    00070 };
    00071 #endif