/media/STORE N GO/NetPark C++ sous Linux/documents/barriere.h |
#ifndef _BARRIERE_H
#define _BARRIERE_H
#include <Socket.h>
#include <string.h>
inline
void setCommandeSensMontee(Socket &barriere)
{
barriere.envoyer("Barriere:setCommandeSensMontee");
barriere.recevoir();
}
inline
void setCommandeSensDescente(Socket &barriere)
{
barriere.envoyer("Barriere:setCommandeSensDescente");
barriere.recevoir();
}
inline
bool isInFDCH(Socket &barriere)
{
barriere.envoyer("Barriere:isInFDCH");
return strcmp(barriere.recevoir(), "haut") == 0;
}
inline
bool isInFDCL(Socket &barriere)
{
barriere.envoyer("Barriere:isInFDCL");
return strcmp(barriere.recevoir(), "bas") == 0;
}
inline
bool isBoucleAmont(Socket &barriere)
{
barriere.envoyer("Barriere:isBoucleAmont");
return strcmp(barriere.recevoir(), "entree") == 0;
}
inline
bool isBoucleAval(Socket &barriere)
{
barriere.envoyer("Barriere:isBoucleAval");
return strcmp(barriere.recevoir(), "sortie") == 0;
}
#endif