evarobot_rgb.h
Go to the documentation of this file.
00001 #ifndef INCLUDE_EVAROBOT_RGB_H_
00002 #define INCLUDE_EVAROBOT_RGB_H_
00003 
00004 #include "ros/ros.h"
00005 #include <vector>
00006 #include <fcntl.h>
00007 #include <sys/ioctl.h>          /* ioctl */
00008 #include "IMEIO.h"
00009 #include <vector>
00010 #include <sstream>
00011 
00012 #include "im_msgs/SetRGB.h"
00013 
00014 
00015 #include <ros/console.h>
00016 #include "ErrorCodes.h"
00017 
00018 #include <diagnostic_updater/diagnostic_updater.h>
00019 #include <diagnostic_updater/publisher.h>
00020 
00021 char SEM_NAME[]= "i2c";
00022 
00023 using namespace std;
00024 
00025 class IMRGB
00026 {
00027 public:
00028         IMRGB(IMEIO * eio);
00029         ~IMRGB();
00030         void RunAutonomousMode();
00031         void RunTeleopMode();
00032         void RunWanderMode();
00033         void RunManualMode();
00034         void RunChargingMode();
00035         void RunChargedMode();
00036         void RunErrorMode();
00037         void RunLowBatteryMode();
00038         void RunOpeningMode();
00039         void TurnLedOff();
00040         
00041         bool isNewRequest() const;
00042         float GetFrequency() const;
00043         int GetMode() const;
00044         int GetTimesValue() const;
00045         
00046         // Callback Fınction
00047         bool callbackSetRGB(im_msgs::SetRGB::Request& request, im_msgs::SetRGB::Response& response);
00048         
00049         // COLORS
00050         static const int LEDOFF;
00051         static const int RED;
00052         static const int GREEN;
00053         static const int YELLOW;
00054         static const int BLUE;
00055         static const int PINK;
00056         static const int TURQUOISE;
00057         static const int WHITE;
00058         
00059         // MODES
00060         static const int MANUAL;
00061         static const int ON;
00062         static const int AUTONOMOUS;
00063         static const int TELEOP;
00064         static const int WANDER;
00065         static const int LOW_BATTERY;
00066         static const int CHARGING;
00067         static const int CHARGED;
00068         static const int ERROR;
00069                 
00070 private:
00071         IMEIO * eio;
00072         
00073         bool b_new_data;
00074         int i_mode;
00075         float f_frequency;
00076         int i_times;
00077         int i_color;
00078         
00079         void TurnLedOn(int i_color);
00080         
00081         void FlipFlip(int i_color);
00082         void Flash(int i_color, float f_frequency);
00083         bool DecreaseTimesValue();
00084 };
00085 
00086 #endif


evarobot_eio
Author(s): Mehmet Akcakoca
autogenerated on Fri Feb 12 2016 01:15:21