summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/common-cc/simu_report.host.cc
diff options
context:
space:
mode:
authorOlivier Lanneluc2013-04-27 00:11:52 +0200
committerNicolas Schodet2013-04-27 00:11:52 +0200
commitc4f4fcd21a3440014c35152e6258033351ed7dc0 (patch)
tree37cac239935c3580ac4556bf7390997d6be2d6cf /digital/io-hub/src/common-cc/simu_report.host.cc
parentac36d70fb2aca75a6bb201351346cb6e97715d39 (diff)
digital/io-hub/src/common-cc: add simulation path report
Diffstat (limited to 'digital/io-hub/src/common-cc/simu_report.host.cc')
-rw-r--r--digital/io-hub/src/common-cc/simu_report.host.cc10
1 files changed, 10 insertions, 0 deletions
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);
+}
+