#include <omConnector.h>
Inheritance diagram for omConnector:
Public Member Functions | |
omConnector () | |
omConnector (wxString, unsigned short) | |
omConnector (omObject *) | |
omConnector (omObject *, wxString, unsigned short) | |
bool | Connect () |
void | SendMessage (omTCPMessage) |
void | SendClick () |
Private Member Functions | |
void | OnSocketEvent (wxSocketEvent) |
Called by the event handler. | |
void | OnSocketConnection (wxSocketEvent) |
Private Attributes | |
wxSocketClient * | sock |
Socket information. | |
omObject * | toNotify |
Object to notify. | |
wxString | hostname |
Hostname to connect. | |
unsigned short | service |
Port to connect. | |
bool | connected |
True if connection established. | |
wxString | currentIP |
Current IP, setted after connection. | |
wxString | currentHost |
Store current host name after connection. | |
int | currentPort |
Store current port number after connection. | |
bool | notifyMessages |
flag | |
omTCPParser | tcpParser |
wxString | incomingMessage |
Partial message. |
This object is used to connect the OpenMAIA Application with the rest of the OpenMAIA system.
Every Application (agent) uses an instance of omConnector object to receive and send message to the other agents of the system.
This object provides basic interfaces for receiving and sending messages.
Messages are sent using SendMessage method of omConnector class.
Messages are received via NotifyMessage event generated from omConnector to an omObject or derived class (see image)
|
Builds the omConnector object using defaults:
|
|
Builds the omConnector object for only message trasmission.
|
|
Builds the omConnector object for only receiving.
|
|
Builds the omConnector object for sending and receiving.
|
|
Connect and register the agent
|
|
|
|
Called by the event handler.
|
|
Send the click event to the connected server |
|
Send a message to the server
|
|
True if connection established.
|
|
Store current host name after connection.
|
|
Current IP, setted after connection.
|
|
Store current port number after connection.
|
|
Hostname to connect.
|
|
Partial message.
|
|
flag
|
|
Port to connect.
|
|
Socket information.
|
|
|
|
Object to notify.
|
Copyright © by Luca Clivio |