From 1d57bcc0e69306423d76cfa40a37bad2acf61577 Mon Sep 17 00:00:00 2001 From: dufourj Date: Wed, 24 May 2006 01:13:15 +0000 Subject: Marvin : * Es : - supporte pleins de nouveauté du code ES avr. * Proto : - commande moche qui envoye un string plutôt qu'une liste d'arguments ; - support de 5 arguments max au lieu de 4. --- i/marvin/src/proto/proto.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'i/marvin/src/proto/proto.hh') diff --git a/i/marvin/src/proto/proto.hh b/i/marvin/src/proto/proto.hh index 47ef9a0..4e1f24c 100644 --- a/i/marvin/src/proto/proto.hh +++ b/i/marvin/src/proto/proto.hh @@ -83,6 +83,9 @@ class Proto : public NonCopyable /// 32 bits, majuscule pour signé). void send (char command, const char *format = "", int a0 = 0, int a1 = 0, int a2 = 0, int a3 = 0, int a4 = 0, int a5 = 0, bool reliable = true); + /// Send a string of size number. + void send (char command, const std::string &str, int size, bool reliable = + true); /// permet d'envoyer un packet robert void Proto::sendUnreliable (char command, const char *format, int a0, int a1, int a2, int a3, int a4, int a5); @@ -97,6 +100,8 @@ class Proto : public NonCopyable &a1, int &a2); static bool decode (const Frame &frame, const char *format, int &a0, int &a1, int &a2, int &a3); + static bool decode (const Frame &frame, const char *format, int &a0, int + &a1, int &a2, int &a3, int &a4); //@} /// Attend que des caractères soit disponible pendant un temps maximum en /// milliseconde et les traite. Renvois le résultat de sync (). Attention, @@ -125,7 +130,7 @@ class Proto : public NonCopyable static int argsFrameSize(const char *format); /// Décode un argument static void decodeArg(const Frame & frame, const char *format, int &a0, - int &a1, int &a2, int &a3); + int &a1, int &a2, int &a3, int &a4); }; /// Affiche une frame. -- cgit v1.2.3