OSSIA
Open Scenario System for Interactive Application
wiimote_parameter.hpp
1 #pragma once
2 #include <ossia/detail/hash_map.hpp>
3 #include <ossia/network/common/device_parameter.hpp>
4 
5 #include <cstdint>
6 
7 struct wiimote_t;
8 
9 namespace ossia::net
10 {
11 
12 class rumble_parameter : public device_parameter
13 {
14 
15 public:
16  rumble_parameter(ossia::net::node_base& node, struct wiimote_t* wiimote);
17 
18 protected:
19  void device_update_value() override;
20 
21 private:
22  struct wiimote_t* m_wiimote{};
23 };
24 
25 class led_parameter : public device_parameter
26 {
27 
28 public:
29  led_parameter(
30  ossia::net::node_base& node, struct wiimote_t* wiimote, const uint8_t led);
31 
32  ~led_parameter();
33 
34 protected:
35  void device_update_value() override;
36 
37 private:
38  struct wiimote_t* m_wiimote{};
39  const uint8_t m_led{};
40  static ossia::hash_map<wiimote_t*, uint8_t> m_led_mask;
41 };
42 }
The node_base class.
Definition: network/base/node.hpp:48