summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/proto/proto.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/proto/proto.cc')
-rw-r--r--2005/i/robert/src/proto/proto.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/2005/i/robert/src/proto/proto.cc b/2005/i/robert/src/proto/proto.cc
index 3a35ec3..20727a2 100644
--- a/2005/i/robert/src/proto/proto.cc
+++ b/2005/i/robert/src/proto/proto.cc
@@ -179,6 +179,16 @@ Proto::decode (const Frame &frame, const char *format, int &a0,
return true;
}
+/// Attend que des caractères soit disponible pendant un temps maximum en
+/// milliseconde et les traite. Renvois le résultat de sync (). Attention,
+/// fonction bloquante, n'utiliser que pour les tests.
+bool
+Proto::wait (int timeout/*-1*/)
+{
+ serial_.wait (timeout);
+ return sync ();
+}
+
/// Récupère les infos de l'AVR pour construire une frame
bool
Proto::getFrame(void)