00001 // File: HawkExample.H 00002 // Author: Josh Villbrandt <josh.villbrandt@usc.edu> 00003 // Date: April 2010 00004 00005 #include <string> 00006 #include <Ice/Ice.h> 00007 #include "Robots/BeoHawk/core/HawkMessages.ice.H" 00008 #include "Robots/BeoHawk/computer/HawkAgent.H" 00009 00010 class HawkExample : public HawkAgent { 00011 public: 00012 // These functions must be defined in all HawkAgents 00013 HawkExample(std::string myName, int argc, char* argv[]); 00014 bool scheduler(); 00015 void registerTopics(); 00016 void catchMessage(const HawkMessages::MessagePtr& msg, const Ice::Current&); 00017 00018 private: 00019 // These functions are specific to the individual agents 00020 enum States {INIT, RECEIVED_FIRST_MESSAGE, WAITING}; 00021 States state; 00022 //void doSomeBigTask(): 00023 void sendExampleMessageOne(); 00024 void sendExampleMessageTwo(); 00025 };