summaryrefslogtreecommitdiff
path: root/2005
diff options
context:
space:
mode:
Diffstat (limited to '2005')
-rw-r--r--2005/i/robert/src/asserv/asserv.cc6
-rw-r--r--2005/i/robert/src/asserv/asserv.hh2
-rw-r--r--2005/i/robert/src/es/es.cc6
-rw-r--r--2005/i/robert/src/es/es.hh2
-rw-r--r--2005/i/robert/src/motor/motor.cc6
-rw-r--r--2005/i/robert/src/motor/motor.hh2
-rw-r--r--2005/i/robert/src/proto/proto.cc6
-rw-r--r--2005/i/robert/src/proto/proto.hh3
8 files changed, 33 insertions, 0 deletions
diff --git a/2005/i/robert/src/asserv/asserv.cc b/2005/i/robert/src/asserv/asserv.cc
index ea82b57..662e52f 100644
--- a/2005/i/robert/src/asserv/asserv.cc
+++ b/2005/i/robert/src/asserv/asserv.cc
@@ -76,6 +76,12 @@ bool Asserv::wait(int timeout)
return proto_.wait(timeout);
}
+/// Récupère le File Descriptor
+int Asserv::getFd(void)
+{
+ return proto_.getFd();
+}
+
/// Commandes d'asservissement
void Asserv::linearMove(double distance)
{
diff --git a/2005/i/robert/src/asserv/asserv.hh b/2005/i/robert/src/asserv/asserv.hh
index de135c3..07bb731 100644
--- a/2005/i/robert/src/asserv/asserv.hh
+++ b/2005/i/robert/src/asserv/asserv.hh
@@ -101,6 +101,8 @@ class Asserv : public NonCopyable, public Proto::Receiver
bool sync (void);
/// Attend que toute les émissions soit terminées.
bool wait (int timeout = -1);
+ /// Récupère le File Descriptor
+ int getFd(void);
/// Commandes asservissement
void linearMove(double distance);
void angularMove(double angle);
diff --git a/2005/i/robert/src/es/es.cc b/2005/i/robert/src/es/es.cc
index 3673fb3..c9ca801 100644
--- a/2005/i/robert/src/es/es.cc
+++ b/2005/i/robert/src/es/es.cc
@@ -95,6 +95,12 @@ void Es::wait(int timeout)
proto_.wait(timeout);
}
+/// Récupère le File Descriptor
+int Es::getFd(void)
+{
+ return proto_.getFd();
+}
+
void Es::loadConfig(const Config & config)
{
tty_ = config.get<std::string>("es.tty");
diff --git a/2005/i/robert/src/es/es.hh b/2005/i/robert/src/es/es.hh
index 6bb0fc4..ebe9c9f 100644
--- a/2005/i/robert/src/es/es.hh
+++ b/2005/i/robert/src/es/es.hh
@@ -83,6 +83,8 @@ class Es : public Proto::Receiver
void ventouses(void);
/// On attend ...
void wait(int timeout);
+ /// Récupère le File Descriptor
+ int getFd(void);
/// Charge les paramètre du fichier de config
void loadConfig(const Config & config);
/// définition du receiver::receive
diff --git a/2005/i/robert/src/motor/motor.cc b/2005/i/robert/src/motor/motor.cc
index a9f90bf..fb4a6dd 100644
--- a/2005/i/robert/src/motor/motor.cc
+++ b/2005/i/robert/src/motor/motor.cc
@@ -178,6 +178,12 @@ void Motor::wait(int timeout)
asserv_.wait(timeout);
}
+/// Récupère le File Descriptor
+int Motor::getFd(void)
+{
+ return asserv_.getFd();
+}
+
bool Motor::jackState(void)
{
pinUpdated_ = false;
diff --git a/2005/i/robert/src/motor/motor.hh b/2005/i/robert/src/motor/motor.hh
index 6080850..79af4d8 100644
--- a/2005/i/robert/src/motor/motor.hh
+++ b/2005/i/robert/src/motor/motor.hh
@@ -93,6 +93,8 @@ class Motor : public Asserv::Receiver
bool sync(void);
/// On attend...
void wait(int timeout);
+ /// Récupère le File Descriptor
+ int getFd(void);
/// Retoure l'état du jack (false entrée et true sortie)
bool jackState(void);
/// Retourne la couleur selectionné
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