|
Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
|
00001 //------------------------------------------------------------------------------ 00002 //-- Hormone 00003 //------------------------------------------------------------------------------ 00004 //-- 00005 //-- Bio-inspired data container used for intermodular comunication 00006 //-- 00007 //------------------------------------------------------------------------------ 00008 //-- 00009 //-- This file belongs to the Hormodular project 00010 //-- (https://github.com/David-Estevez/hormodular.git) 00011 //-- 00012 //------------------------------------------------------------------------------ 00013 //-- Author: David Estevez-Fernandez 00014 //-- 00015 //-- Released under the GPL license (more info on LICENSE.txt file) 00016 //------------------------------------------------------------------------------ 00017 00024 #ifndef HORMONE_H 00025 #define HORMONE_H 00026 00027 #include <string> 00028 00029 namespace hormodular { 00030 00035 class Hormone 00036 { 00037 public: 00038 Hormone( int sourceConnector, int type); 00039 Hormone( int sourceConnector, int type, std::string data); 00040 00041 int getType(); 00042 int getSourceConnector(); 00043 std::string getData(); 00044 00045 //-- Allowed values for type 00046 static const int PING_HORMONE = 0; 00047 static const int LEG_HORMONE = 1; 00048 static const int HEAD_HORMONE = 2; 00049 00050 private: 00051 int type; 00052 int sourceConnector; 00053 std::string data; 00054 00055 }; 00056 00057 } 00058 #endif //-- HORMONE_H
1.7.4