summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/proto
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/proto')
-rw-r--r--2005/i/robert/src/proto/proto.cc6
-rw-r--r--2005/i/robert/src/proto/proto.hh3
2 files changed, 9 insertions, 0 deletions
diff --git a/2005/i/robert/src/proto/proto.cc b/2005/i/robert/src/proto/proto.cc
index 5fc9265..4e04c83 100644
--- a/2005/i/robert/src/proto/proto.cc
+++ b/2005/i/robert/src/proto/proto.cc
@@ -200,6 +200,12 @@ Proto::wait (int timeout/*-1*/)
return serial_.wait (timeout < timeout_ ? timeout : timeout_);
}
+/// Récupère le File Descriptor
+int Proto::getFd(void)
+{
+ return serial_.getFd();
+}
+
/// Récupère les infos de l'AVR pour construire une frame
bool
Proto::getFrame(void)
diff --git a/2005/i/robert/src/proto/proto.hh b/2005/i/robert/src/proto/proto.hh
index 163c44c..11b1ae3 100644
--- a/2005/i/robert/src/proto/proto.hh
+++ b/2005/i/robert/src/proto/proto.hh
@@ -102,6 +102,9 @@ class Proto : public NonCopyable
/// milliseconde et les traite. Renvois le résultat de sync (). Attention,
/// fonction bloquante, n'utiliser que pour les tests.
bool wait (int timeout = -1);
+ /// Récupère le File Descriptor
+ int getFd(void);
+
public:
/// Les clients de Proto doivent dériver de Receiver.
class Receiver