equal
deleted
inserted
replaced
14 * |
14 * |
15 * You should have received a copy of the GNU General Public License |
15 * You should have received a copy of the GNU General Public License |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 */ |
17 */ |
18 |
18 |
|
19 #include <iostream> |
|
20 |
19 #include "SimulatorSocketServer.h" |
21 #include "SimulatorSocketServer.h" |
|
22 #include "ButtonEvent.h" |
|
23 #include "MotionEvent.h" |
20 |
24 |
21 SimulatorSocketServer::SimulatorSocketServer() { |
25 SimulatorSocketServer::SimulatorSocketServer() { |
22 } |
26 } |
23 |
27 |
24 SimulatorSocketServer::SimulatorSocketServer(const SimulatorSocketServer& orig) { |
28 SimulatorSocketServer::SimulatorSocketServer(const SimulatorSocketServer& orig) { |
25 } |
29 } |
26 |
30 |
27 SimulatorSocketServer::~SimulatorSocketServer() { |
31 SimulatorSocketServer::~SimulatorSocketServer() { |
28 } |
32 } |
29 |
33 |
|
34 void SimulatorSocketServer::publishButtonEvent(const ButtonEvent e) { |
|
35 std::wcout << L"buttonEvent(" << e.number << L", " << (e.pressed ? L"pressed" : L"released") << L")" << std::endl; |
|
36 } |
|
37 |
|
38 void SimulatorSocketServer::publishMotionEvent(const MotionEvent e) { |
|
39 std::wcout << L"motionEvent( m = [" |
|
40 << e.x << L", " |
|
41 << e.y << L", " |
|
42 << e.z << L"], " |
|
43 << L"r = [" |
|
44 << e.rx << L", " |
|
45 << e.ry << L", " |
|
46 << e.rz << L"], " |
|
47 << L"period = " << e.period |
|
48 << L")" << std::endl; |
|
49 |
|
50 } |