Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
Connector.hpp
00001 //------------------------------------------------------------------------------
00002 //-- Connector
00003 //------------------------------------------------------------------------------
00004 //--
00005 //-- Device that connects different modules for communications
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 CONNECTOR_H
00025 #define CONNECTOR_H
00026 
00027 #include <vector>
00028 #include "Hormone.hpp"
00029 
00030 namespace hormodular {
00031 
00037 class Connector
00038 {
00039     public:
00040         Connector();
00041 
00047         bool connectTo( Connector * remoteConnector);
00048 
00053         bool sendHormones();
00054 
00060         bool addOutputHormone(Hormone outputHormone);
00061 
00066         bool clearInputBuffer();
00067 
00068 
00069 
00074         int getLocalOrientation() const;
00075 
00080         void setLocalOrientation(int localOrientation);
00081 
00082 
00084         std::vector<Hormone> getInputBuffer();
00085 
00087         Connector * getRemoteConnector();
00088 
00089    private:
00090         std::vector<Hormone> inputBuffer;
00091         std::vector<Hormone> outputBuffer;
00092 
00093         Connector * remoteConnector;
00094         int localOrientation;
00095 
00096         bool addInputHormone(Hormone inputHormone );
00097 };
00098 
00099 }
00100 #endif //-- CONNECTOR_H
 All Classes Functions Variables Friends