summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/proto
diff options
context:
space:
mode:
authorhaller2005-05-04 11:35:46 +0000
committerhaller2005-05-04 11:35:46 +0000
commit792e6bf0b476a778e3b3fb4fcdb3aa4202654175 (patch)
treea94719c28478cc6dd42acb2ed0afea42e34e4a4f /2005/i/robert/src/proto
parent065bdb8d1076fc1f1396de3f6d71e3fb15c727b6 (diff)
Codage de getFd
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