From c4f4fcd21a3440014c35152e6258033351ed7dc0 Mon Sep 17 00:00:00 2001 From: Olivier Lanneluc Date: Sat, 27 Apr 2013 00:11:52 +0200 Subject: digital/io-hub/src/common-cc: add simulation path report --- digital/io-hub/src/common-cc/simu_report.host.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'digital/io-hub/src/common-cc/simu_report.host.cc') diff --git a/digital/io-hub/src/common-cc/simu_report.host.cc b/digital/io-hub/src/common-cc/simu_report.host.cc index 2a3f98fd..e28df533 100644 --- a/digital/io-hub/src/common-cc/simu_report.host.cc +++ b/digital/io-hub/src/common-cc/simu_report.host.cc @@ -28,6 +28,7 @@ SimuReport::SimuReport (ucoo::Host &host) { std::string instance (host.get_instance ()); pos_mtype_ = node_.reserve (instance + ":pos-report"); + path_mtype_ = node_.reserve (instance + ":path"); } void @@ -40,3 +41,12 @@ SimuReport::pos (vect_t *pos, int pos_nb, uint8_t id) node_.send (msg); } +void +SimuReport::path (const vect_t *pos, int pos_nb) +{ + ucoo::mex::Msg msg (path_mtype_); + for (; pos_nb; pos++, pos_nb--) + msg.push ("hh") << pos->x << pos->y; + node_.send (msg); +} + -- cgit v1.2.3