Dependencies: SimpleMapSerialization serial_communication
Diff: communication.hpp
- Revision:
- 0:8b0edcbd3b87
- Child:
- 2:074942a78af1
diff -r 000000000000 -r 8b0edcbd3b87 communication.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/communication.hpp Thu Mar 31 04:43:01 2016 +0000 @@ -0,0 +1,36 @@ +#ifndef INCLUDED_NODE_SYSTEM_COMMUNICATION_H +#define INCLUDED_NODE_SYSTEM_COMMUNICATION_H + +#include "moving_object.hpp" +#include "mbed_stl.hpp" + +class communication { +public: + typedef mbed_stl::linear_algebra::vector2f vector2f; + + static communication* instance() { + if (instance_ == NULL) { + instance_ = new communication; + } + return instance_; + } + static void destory() { + delete instance_; + } + node_system::moving_object::CONTROL_MODE get_mode() const; + vector2f get_velocity() const; + float get_angular_velocity_rad_per_sec() const; + vector2f get_target_position_mm() const; + float get_target_heading_rad() const; + +private: + communication() {} + ~communication() {} + // singletonにつき禁止のため以下の二つの実装は無し + void operator=(const communication& s); + communication(const communication& s); + + static communication* instance_; +}; + +#endif