.. index:: pair: class; rgpot::IPIDriver .. _doxid-classrgpot_1_1_i_p_i_driver: class rgpot::IPIDriver ====================== .. toctree:: :hidden: Overview ~~~~~~~~ Client side of the i-PI socket protocol. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class IPIDriver { public: // construction :ref:`IPIDriver`(const :ref:`IPIDriverConfig`& config, :ref:`IPIEvaluator` evaluate); :target:`IPIDriver`(const IPIDriver&); :target:`~IPIDriver`(); // methods IPIDriver& :target:`operator=`(const IPIDriver&); void :ref:`connect`(); bool :ref:`step`(); void :ref:`run`(); void :ref:`close`(); const :ref:`IPIDriverConfig`& :target:`config`() const; const std::string& :ref:`endpoint`() const; bool :target:`connected`() const; int32_t :ref:`bead`() const; const std::string& :ref:`initString`() const; uint64_t :ref:`evaluations`() const; }; .. _details-classrgpot_1_1_i_p_i_driver: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Client side of the i-PI socket protocol. Construction ------------ .. index:: pair: function; IPIDriver .. _doxid-classrgpot_1_1_i_p_i_driver_1a93bedec44a0c2437ff2d8748511518c8: .. ref-code-block:: cpp :class: doxyrest-title-code-block IPIDriver(const :ref:`IPIDriverConfig`& config, :ref:`IPIEvaluator` evaluate) Validates the config and the species; does not connect. Methods ------- .. index:: pair: function; connect .. _doxid-classrgpot_1_1_i_p_i_driver_1a68f281544e4167e57eee50423c298c54: .. ref-code-block:: cpp :class: doxyrest-title-code-block void connect() Connects, retrying a refused or missing socket for connect_timeout_s. .. index:: pair: function; step .. _doxid-classrgpot_1_1_i_p_i_driver_1a1283b62b282be230ce74910baab4d95c: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool step() Handles one server message. Returns false after EXIT. .. index:: pair: function; run .. _doxid-classrgpot_1_1_i_p_i_driver_1a686b516b62f6248762c77ce8989c094e: .. ref-code-block:: cpp :class: doxyrest-title-code-block void run() Connects if needed, then handles messages until EXIT. .. index:: pair: function; close .. _doxid-classrgpot_1_1_i_p_i_driver_1ac966782a00a0546f48a0266f6fab56cb: .. ref-code-block:: cpp :class: doxyrest-title-code-block void close() Closes the connection without sending anything. .. index:: pair: function; endpoint .. _doxid-classrgpot_1_1_i_p_i_driver_1a76917fb930eb71deba7d886b8ee86937: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::string& endpoint() const ``unix:`` or ``tcp::`` the driver connects to. .. index:: pair: function; bead .. _doxid-classrgpot_1_1_i_p_i_driver_1ada13c4be086c1374cd54f1f517ac1782: .. ref-code-block:: cpp :class: doxyrest-title-code-block int32_t bead() const Bead index of the last INIT, -1 before one. .. index:: pair: function; initString .. _doxid-classrgpot_1_1_i_p_i_driver_1ab9c5f5e973b061ea56943e9b0e483faf: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::string& initString() const Init string of the last INIT. .. index:: pair: function; evaluations .. _doxid-classrgpot_1_1_i_p_i_driver_1a04c7be27d6639e2af64a33d03637a0ba: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint64_t evaluations() const Number of POSDATA messages evaluated.