NerfUS mobile node that manages a target for the Nerf gun firing range
Dependencies: LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager
Fork of NerfUS by
TargetManager.hpp
00001 #ifndef TARGET_MANAGER_HPP 00002 #define TARGET_MANAGER_HPP 00003 00004 #include "NerfusTickerInterface.hpp" 00005 #include "TargetInfo.hpp" 00006 #include "TargetInterface.hpp" 00007 #include "TargetManagerInterface.hpp" 00008 00009 #include <vector> 00010 #include "stdint.h" 00011 00012 class TargetManager : public TargetManagerInterface 00013 { 00014 public: 00015 TargetManager(std::vector<TargetInterface*>& targets, std::vector<NerfusTickerInterface*>& nerfus_tickers); 00016 00017 void execute(const TargetInfo& target_info); 00018 virtual void execute(const std::vector<uint8_t>& target_info_bytes, int *address = 0); 00019 00020 virtual void target_missed(int target_id); 00021 virtual void target_hit(int target_id); 00022 00023 private: 00024 std::vector<TargetInterface*>& targets; 00025 std::vector<NerfusTickerInterface*>& nerfus_tickers; 00026 std::vector<bool> is_active_target; 00027 }; 00028 00029 #endif
Generated on Thu Jul 14 2022 01:50:39 by
1.7.2
