OMNotebook: OmcCommunicator Class Reference

- Main Page
- Classes
- Files
- Related Pages
- Examples

- Class List
- Class Hierarchy
- Class Members

# OmcCommunicator Class Reference

The OmcCommunicator handles all low level communication with Omc. More...

`#include <omc_communicator.hpp>`

List of all members.

## Public Member Functions
| ~OmcCommunicator ()
| Destroys the Omc communicator.
bool | establishConnection ()
| Attempts to establish a connection to Omc.
void | closeConnection ()
| Closes the connection to Omc. Omc is not terminated by closing the connection.
bool | isConnected () const
| Returns true if a connection has been established to Omc, false otherwise.
QString | callOmc (const QString &fnCall)
| Executes the specified Omc function and returns the return value received from Omc.
## Static Public Member Functions
static OmcCommunicator & | getInstance ()
| Returns a reference to the Omc communicator.

## Detailed Description

The OmcCommunicator handles all low level communication with Omc.

This class is a singleton class, use the static getInstance() member function to obtain a reference to its instance.

## Member Function Documentation

QString OmcCommunicator::callOmc | ( | const QString & | fnCall | ) |

  | Executes the specified Omc function and returns the return value received from Omc. Exceptions:
  | OmcError | if the Omc function call fails.
  | OmcConnectionLost | if the connection to Omc is lost.

bool OmcCommunicator::establishConnection | ( |  | ) |

| Attempts to establish a connection to Omc. Returns: true if a connection was established successfully or if a connection already exists, false otherwise.

The documentation for this class was generated from the following files:

- C:/OpenModelica/OMNotebookQT4 v2/OMNotebookQT4/omc_communicator.hpp
- C:/OpenModelica/OMNotebookQT4 v2/OMNotebookQT4/omc_communicator.cpp