From: Leandro Lucarella Date: Sun, 19 Oct 2003 00:26:09 +0000 (+0000) Subject: Primer esqueleto de las clases cliente/servidor. X-Git-Tag: svn_import~403 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/65bf2eef7ac487329a3af3cd1c06e7957afc3a6c?ds=inline Primer esqueleto de las clases cliente/servidor. --- diff --git a/Server/src/Makefile b/Server/src/Makefile new file mode 100644 index 0000000..146f7a8 --- /dev/null +++ b/Server/src/Makefile @@ -0,0 +1,56 @@ +# vim: set noexpandtab tabstop=4 shiftwidth=4: +#---------------------------------------------------------------------------- +# PlaQui +#---------------------------------------------------------------------------- +# This file is part of PlaQui. +# +# PlaQui is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA 02111-1307 USA +#---------------------------------------------------------------------------- +# Creado: sáb oct 18 21:24:06 ART 2003 +# Autores: Leandro Lucarella +#---------------------------------------------------------------------------- +# +# $Id$ +# + +# Opciones para el compilador. +CXXFLAGS=-ansi -pedantic -Wall -g +LDFLAGS=-lsocket++ + +TARGETS=connection.o controlclient.o controlserver.o receiver.o transmitter.o \ + server.o + +# Regla por defecto. +all: $(TARGETS) + +runnable_h=runnable.h + +connection_h=$(runnable_h) connection.h +connection.o: $(connection_h) + +controlclient_h=$(connection_h) controlclient.h +controlclient.o: $(controlclient_h) + +controlserver_h=$(connection_h) controlserver.h +controlserver.o: $(controlserver_h) + +receiver_h=$(connection_h) receiver.h +receiver.o: $(receiver_h) + +transmitter_h=$(connection_h) transmitter.h +transmitter.o: $(transmitter_h) + +clean: + rm -f $(TARGETS) *.o diff --git a/Server/src/connection.cpp b/Server/src/connection.cpp new file mode 100644 index 0000000..086548a --- /dev/null +++ b/Server/src/connection.cpp @@ -0,0 +1,40 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#include "connection.h" +#include + +using namespace Plaqui; + +Connection::Connection(const sockinetbuf& sb): + socket(sb) { +} + +Connection::Connection(sockbuf::type type): + socket(type) { +} + diff --git a/Server/src/connection.h b/Server/src/connection.h new file mode 100644 index 0000000..306e273 --- /dev/null +++ b/Server/src/connection.h @@ -0,0 +1,69 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_CONNECTION_H +#define PLAQUI_CONNECTION_H + +#include "runnable.h" +#include + +namespace Plaqui { + + /// Conexión. + class Connection: public Runnable { + + protected: + + /// Socket a usar en la conexión. + iosockinet socket; + + public: + + /** + * Destructor. + */ + virtual ~Connection(void) {} + + /** + * Constructor. + * + * \param socket Socket a usar en la conexión. + */ + Connection(const sockinetbuf& sb); + + /** + * Constructor. + * + * \param type Tipo de socket a usar. + */ + Connection(sockbuf::type type); + + }; + +} + +#endif // PLAQUI_CONNECTION_H diff --git a/Server/src/controlclient.cpp b/Server/src/controlclient.cpp new file mode 100644 index 0000000..3ad35f8 --- /dev/null +++ b/Server/src/controlclient.cpp @@ -0,0 +1,36 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#include "controlclient.h" + +using namespace Plaqui; + +ControlClient::ControlClient(std::string host, int port): + Connection(sockbuf::sock_stream) { + socket->connect(host.c_str(), port); +} + diff --git a/Server/src/controlclient.h b/Server/src/controlclient.h new file mode 100644 index 0000000..ce32d86 --- /dev/null +++ b/Server/src/controlclient.h @@ -0,0 +1,59 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_CONTROLCLIENT_H +#define PLAQUI_CONTROLCLIENT_H + +#include "connection.h" +#include + +namespace Plaqui { + + /// Conexión para enviar comandos de control a una planta. + class ControlClient: public Connection { + + public: + + /** + * Destructor. + */ + virtual ~ControlClient(void) {} + + /** + * Constructor. + * + * \param host Host al cual conectarse para enviar comandos de + * control. + * \param port Puerto al cual conectarse. + */ + ControlClient(std::string host = "localhost", int port = 7522); + + }; + +} + +#endif // PLAQUI_CONTROLCLIENT_H diff --git a/Server/src/controlserver.cpp b/Server/src/controlserver.cpp new file mode 100644 index 0000000..c9007c5 --- /dev/null +++ b/Server/src/controlserver.cpp @@ -0,0 +1,34 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#include "controlserver.h" + +using namespace Plaqui; + +//ControlServer::ControlServer(const iosockinet& socket) { +//} + diff --git a/Server/src/controlserver.h b/Server/src/controlserver.h new file mode 100644 index 0000000..c973134 --- /dev/null +++ b/Server/src/controlserver.h @@ -0,0 +1,58 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_CONTROLSERVER_H +#define PLAQUI_CONTROLSERVER_H + +#include "connection.h" +#include + +namespace Plaqui { + + /// Conexión para recibir comandos de control para una planta. + class ControlServer: public Connection { + + public: + + /** + * Destructor. + */ + virtual ~ControlServer(void) {} + + /** + * Constructor. + * + * \param socket Socket a usar para recibir comandos. + */ + ControlServer(const sockinetbuf& socket): Connection(socket) {} + + }; + +} + + +#endif // PLAQUI_CONTROLSERVER_H diff --git a/Server/src/receiver.cpp b/Server/src/receiver.cpp new file mode 100644 index 0000000..172a19f --- /dev/null +++ b/Server/src/receiver.cpp @@ -0,0 +1,35 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#include "receiver.h" + +/* +Receiver::Receiver(int port, std::string host): Connection(sockbuf::dgram) { + socket->bind(port); +} +*/ + diff --git a/Server/src/receiver.h b/Server/src/receiver.h new file mode 100644 index 0000000..8be4e30 --- /dev/null +++ b/Server/src/receiver.h @@ -0,0 +1,60 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_RECEIVER_H +#define PLAQUI_RECEIVER_H + +#include "connection.h" +#include +#include + +namespace Plaqui { + + /// Conexión para recibir el estado de una planta. + class Receiver: public Connection { + + public: + + /** + * Destructor. + */ + virtual ~Receiver(void) {} + + /** + * Constructor. + * + * \param port Puerto por el cual recibir estado de la planta. + * \param host Host del cual recibir el estado de la planta. + */ + Receiver(int port = 7528 /*, std::string host = "localhost"*/): + Connection(sockbuf::sock_dgram) { socket->bind(port); } + + }; + +} + +#endif // PLAQUI_RECEIVER_H diff --git a/Server/src/runnable.h b/Server/src/runnable.h new file mode 100644 index 0000000..04cb094 --- /dev/null +++ b/Server/src/runnable.h @@ -0,0 +1,45 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 20:55:08 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_RUNNABLE_H +#define PLAQUI_RUNNABLE_H + +namespace Plaqui { + + /// ealizauna tarea (generalmente en un thread). + class Runnable { + + public: + + /// Realiza la tarea. + virtual void run(void) = 0; + + }; + +} + +#endif // PLAQUI_RUNNABLE_H diff --git a/Server/src/server.cpp b/Server/src/server.cpp new file mode 100644 index 0000000..bbf41c0 --- /dev/null +++ b/Server/src/server.cpp @@ -0,0 +1,49 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#include "server.h" + +using namespace Plaqui; + +Server::Server(int port): + socket(sockbuf::sock_stream) { +#warning Not implemented! + // TODO +} + +bool Server::start_transmission(std::string host, int port) { +#warning Not implemented! + // TODO + return false; +} + +bool Server::stop_transmission(std::string host, int port) { +#warning Not implemented! + // TODO + return false; +} + diff --git a/Server/src/server.h b/Server/src/server.h new file mode 100644 index 0000000..ccd2c0e --- /dev/null +++ b/Server/src/server.h @@ -0,0 +1,110 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_SERVER_H +#define PLAQUI_SERVER_H + +#include "controlserver.h" +#include "transmitter.h" +#include +#include +#include + +namespace Plaqui { + + /** + * Servidor de plantas químicas. + * Maneja muchas conexiones, de control o de transmisión. + */ + class Server: public Runnable { + + private: + + /// Lista de conexiones de control. + typedef std::list ControllerList; + + /// Lista de conexiones de control. + typedef std::list TransmitterList; + + /// Socket para escuchar conexiones. + sockbuf socket; + + /// Conexiones de control. + ControllerList controllers; + + /// Transmisiones del estado de las plantas. + TransmitterList transmissions; + + public: + + /** + * Destructor. + */ + virtual ~Server(void) {} + + /** + * Constructor. + * + * \param port Puerto en el cual escuchar. + */ + Server(int port = 7522); + + /** + * Comienza la transimisión del estado de una planta. + * + * \param host Host al cual se quiere transmitir. + * \param port Puerto al cual transmitir. + * + * \return true si se pudo empezar a transmitir, false si no. + * + * \todo Ver si es necesario que devuelva algo y si devuelve ver si + * no sería mejor que dé más información (si no se pudo abrir + * o si ya estaba abierto por ejemplo. + */ + bool start_transmission(std::string host = "localhost", + int port = 7528); + + /** + * Finaliza la transimisión del estado de una planta. + * + * \param host Host al cual se quiere dejar de transmitir. + * \param port Puerto al cual dejar de transmitir. + * + * \return true si se pudo empezar a transmitir, false si no. + * + * \todo Ver si es necesario que devuelva algo y si devuelve ver si + * no sería mejor que dé más información (si no se pudo abrir + * o si ya estaba abierto por ejemplo. + */ + bool stop_transmission(std::string host = "localhost", + int port = 7528); + + }; + +} + +#endif // PLAQUI_SERVER_H diff --git a/Server/src/transmitter.cpp b/Server/src/transmitter.cpp new file mode 100644 index 0000000..b8635fa --- /dev/null +++ b/Server/src/transmitter.cpp @@ -0,0 +1,39 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#include "transmitter.h" +#include +#include + +using namespace Plaqui; + +Transmitter::Transmitter(std::string host, int port): + Connection(sockbuf::sock_dgram) { +#warning Not implemented! + socket->connect(host.c_str(), port); +} + diff --git a/Server/src/transmitter.h b/Server/src/transmitter.h new file mode 100644 index 0000000..2100c1f --- /dev/null +++ b/Server/src/transmitter.h @@ -0,0 +1,58 @@ +// vim: set noexpandtab tabstop=4 shiftwidth=4: +//---------------------------------------------------------------------------- +// PlaQui +//---------------------------------------------------------------------------- +// This file is part of PlaQui. +// +// PlaQui is free software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the Free Software +// Foundation; either version 2 of the License, or (at your option) any later +// version. +// +// PlaQui is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along +// with PlaQui; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307 USA +//---------------------------------------------------------------------------- +// Creado: Sat Oct 18 18:18:36 2003 +// Autores: Leandro Lucarella +//---------------------------------------------------------------------------- +// +// $Id$ +// + +#ifndef PLAQUI_TRANSMITTER_H +#define PLAQUI_TRANSMITTER_H + +#include "connection.h" +#include + +namespace Plaqui { + + /// Conexión para transmitir el estado de una planta. + class Transmitter: public Connection { + + public: + + /** + * Destructor. + */ + virtual ~Transmitter(void) {} + + /** + * Constructor. + * + * \param host Host al cual transmitir. + * \param port Puerto al cual transmitir. + */ + Transmitter(std::string host = "localhost", int port = 7528); + + }; + +} + +#endif // PLAQUI_TRANSMITTER_H