#include <RobotRemote.h>
Inheritance diagram for CRobotRemoteWLanThread:
Public Member Functions | |
CRobotRemoteWLanThread () | |
~CRobotRemoteWLanThread () | |
bool | wlanIsConnected () |
void | wlanConnect (const unsigned long remoteIP, int remotePort) |
void | wlanDisconnect () |
Public Attributes | |
DECLARE_SYNC | |
MessageQueue | queueToRobot |
MessageQueue | queueFromRobot |
Private Member Functions | |
void | communicate () |
Private Attributes | |
TcpConnection * | tcpConnection |
unsigned long | remoteIP |
int | remotePort |
bool | wlanNeedsToBeConnected |
Definition at line 34 of file RobotRemote.h.
CRobotRemoteWLanThread::CRobotRemoteWLanThread | ( | ) |
Constructor
Definition at line 351 of file RobotRemote.cpp.
References communicate(), Thread< CRobotRemoteWLanThread >::start(), tcpConnection, and wlanNeedsToBeConnected.
CRobotRemoteWLanThread::~CRobotRemoteWLanThread | ( | ) |
Destructor
Definition at line 497 of file RobotRemote.cpp.
void CRobotRemoteWLanThread::communicate | ( | ) | [private] |
The thread main function
Definition at line 358 of file RobotRemote.cpp.
References MessageQueue::clear(), getRobotRemoteApp(), MessageQueue::isEmpty(), Thread< CRobotRemoteWLanThread >::isRunning(), PRINT, queueFromRobot, queueToRobot, remoteIP, remotePort, TcpConnection::sendAndReceive(), SYNC, SYNC_WITH, tcpConnection, wlanIsConnected(), and wlanNeedsToBeConnected.
Referenced by CRobotRemoteWLanThread().
void CRobotRemoteWLanThread::wlanConnect | ( | const unsigned long | remoteIP, | |
int | remotePort | |||
) |
This function establishes the connection over the WLan interface and must be called before using it, of course
Definition at line 448 of file RobotRemote.cpp.
References PRINT, remoteIP, remotePort, SYNC, and wlanNeedsToBeConnected.
Referenced by CRobotRemoteDlg1::OnConnectButton().
void CRobotRemoteWLanThread::wlanDisconnect | ( | ) |
This function terminates an WLan connection
send empty DebugKeyTable and immediateReadWrite to prevent useless full queues on robot
Definition at line 465 of file RobotRemote.cpp.
References OutMessage::bin, debugKeyTable, OutMessage::finishMessage(), idDebugKeyTable, idQueueFillRequest, idSolutionRequest, MessageQueue::out, PRINT, queueToRobot, SolutionRequest::setDefaultSolutions(), SYNC, tcpConnection, and wlanIsConnected().
Referenced by CRobotRemoteApp::ExitInstance(), and CRobotRemoteApp::InitInstance().
bool CRobotRemoteWLanThread::wlanIsConnected | ( | ) |
Returns whether WLAN connection is established
Definition at line 437 of file RobotRemote.cpp.
References TcpConnection::isConnected(), and tcpConnection.
Referenced by communicate(), CRobotRemoteApp::OnIdle(), and wlanDisconnect().
Make this object synchronizable.
Definition at line 37 of file RobotRemote.h.
A queue for messages to be received from the WLAN
Definition at line 49 of file RobotRemote.h.
Referenced by communicate().
A queue for messages to be sent via the WLAN to the robot
Definition at line 46 of file RobotRemote.h.
Referenced by communicate(), CRobotRemoteApp::OnIdle(), and wlanDisconnect().
unsigned long CRobotRemoteWLanThread::remoteIP [private] |
int CRobotRemoteWLanThread::remotePort [private] |
a TCP/IP client class handling the WLan interface
Definition at line 65 of file RobotRemote.h.
Referenced by communicate(), CRobotRemoteWLanThread(), wlanDisconnect(), and wlanIsConnected().
bool CRobotRemoteWLanThread::wlanNeedsToBeConnected [private] |
Definition at line 68 of file RobotRemote.h.
Referenced by communicate(), CRobotRemoteWLanThread(), and wlanConnect().