23 #ifndef RUNTIME_HANDLE_H_ 24 #define RUNTIME_HANDLE_H_ 29 #include <boost/shared_ptr.hpp> 30 #include <boost/thread/mutex.hpp> 31 #include <boost/thread/shared_mutex.hpp> 56 void getNeighbors(std::map<int, NeighborBase>& neighbors);
61 void insertOrUpdateNeighbor(
int robot_id,
float distance,
float azimuth,
float elevation,
float x,
float y,
float z,
float vx,
float vy,
float vz);
87 unsigned int lclock, time_t wtime,
unsigned int rcount,
int robot_id);
136 std::map<int, std::map<std::string, BlackBoardTuple> >
blackboard_;
boost::shared_mutex status_mutex_
boost::shared_mutex type_mutex_
std::map< int, std::map< std::string, BlackBoardTuple > > blackboard_
bool isBlackBoardTupleExist(int id, const std::string &key)
void setRobotType(int robot_type)
boost::shared_mutex bb_mutex_
void joinNeighborSwarm(int robot_id, int swarm_id)
void createVirtualStigmergy(int id)
void getSwarmList(std::vector< int > &swarm_list)
boost::shared_mutex neighbor_distance_mutex_
void deleteBlackBoard(int id)
int getBlackBoardSize(int id)
std::map< std::string, SCDSPSODataTuple > scds_pso_tuple_
const Base & getRobotBase()
int getVirtualStigmergySize(int id)
bool checkNeighborsOverlap(int robot_id)
bool getVirtualStigmergyTuple(int id, const std::string &key, VirtualStigmergyTuple &vstig_tuple)
void setRobotID(int robot_id)
void printNeighborSwarm()
void deleteBlackBoardValue(int id, const std::string &key)
bool getNeighborBase(int robot_id, NeighborBase &nb)
void deleteNeighborSwarm(int robot_id)
boost::shared_mutex neighbor_mutex_
void setRobotBase(const Base &robot_base)
void setNeighborDistance(float neighbor_distance)
void insertOrUpdateNeighbor(int robot_id, float distance, float azimuth, float elevation, float x, float y, float z, float vx, float vy, float vz)
void insertOrUpdateSwarm(int swarm_id, bool value)
void deleteSwarm(int swarm_id)
void insertOrUpdateVirtualStigmergy(int id, const std::string &key, const std::vector< uint8_t > &value, unsigned int lclock, time_t wtime, unsigned int rcount, int robot_id)
boost::shared_mutex scds_pso_tuple_mutex_
boost::shared_mutex barrier_mutex_
void insertOrUpdateListenerHelper(const std::string &key, const boost::shared_ptr< ListenerHelper > helper)
bool inNeighbors(int robot_id)
bool inNeighborSwarm(int robot_id, int swarm_id)
boost::shared_mutex vstig_mutex_
void deleteNeighbor(int robot_id)
void printVirtualStigmergy()
const float & getNeighborDistance()
void insertOrUpdateBlackBoard(int id, const std::string &key, const std::vector< uint8_t > &value, const ros::Time ×tamp, int robot_id)
const boost::shared_ptr< ListenerHelper > getListenerHelper(const std::string &key)
bool getSwarmFlag(int swarm_id)
boost::shared_mutex listener_helpers_mutex_
void setRobotStatus(int robot_status)
std::map< int, NeighborSwarmTuple > neighbor_swarms_
void deleteListenerHelper(const std::string &key)
boost::shared_ptr< CheckNeighborInterface > cni_
std::map< int, bool > swarms_
void insertOrRefreshNeighborSwarm(int robot_id, const std::vector< int > &swarm_list)
std::map< int, NeighborBase > neighbors_
void getSwarmMembers(int swarm_id, std::set< int > &swarm_members)
boost::shared_mutex swarm_mutex_
boost::shared_mutex id_mutex_
std::map< int, std::map< std::string, VirtualStigmergyTuple > > virtual_stigmergy_
void leaveNeighborSwarm(int robot_id, int swarm_id)
std::map< int, NeighborBase > getNeighbors()
void createBlackBoard(int id)
boost::shared_mutex base_mutex_
void deleteVirtualStigmergy(int id)
boost::shared_mutex neighbor_swarm_mutex_
void updateVirtualStigmergyTupleReadCount(int id, const std::string &key, int count)
void deleteVirtualStigmergyValue(int id, const std::string &key)
bool isVirtualStigmergyTupleExist(int id, const std::string &key)
void getBlackBoardTuple(int id, const std::string &key, BlackBoardTuple &bb_tuple)
void insertOrUpdateSCDSPSOValue(const std::string &aKey, const SCDSPSODataTuple &aT)
void insertBarrier(int robot_id)
std::map< std::string, boost::shared_ptr< ListenerHelper > > listener_helpers_
bool getSCDSPSOValue(const std::string &aKey, SCDSPSODataTuple &aT)