Public Member Functions | Protected Member Functions | Private Attributes
AsebaDashelHub Class Reference

#include <asebaros.h>

Inheritance diagram for AsebaDashelHub:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 AsebaDashelHub (AsebaROS *asebaROS, unsigned port, bool forward)
void operator() ()
 run the hub
void sendMessage (Aseba::Message *message, bool doLock, Dashel::Stream *sourceStream=0)
void startThread ()
 start the hub thread
void stopThread ()
 stop the hub thread and wait for its termination

Protected Member Functions

virtual void connectionClosed (Dashel::Stream *stream, bool abnormal)
virtual void connectionCreated (Dashel::Stream *stream)
virtual void incomingData (Dashel::Stream *stream)

Private Attributes

AsebaROSasebaROS
 thread for the hub
bool forward
 should we only forward messages instead of transmit them back to the sender
boost::thread * thread

Detailed Description

Definition at line 32 of file asebaros.h.


Constructor & Destructor Documentation

AsebaDashelHub::AsebaDashelHub ( AsebaROS asebaROS,
unsigned  port,
bool  forward 
)

Creates the hub, listen to TCP on port, and creates a DBus interace.

Parameters:
portport on which to listen for incoming connections
forwardshould we only forward messages instead of transmit them back to the sender

Definition at line 50 of file asebaros.cpp.


Member Function Documentation

void AsebaDashelHub::connectionClosed ( Dashel::Stream stream,
bool  abnormal 
) [protected, virtual]

Reimplemented from Dashel::Hub.

Definition at line 161 of file asebaros.cpp.

void AsebaDashelHub::connectionCreated ( Dashel::Stream stream) [protected, virtual]

Reimplemented from Dashel::Hub.

Definition at line 147 of file asebaros.cpp.

void AsebaDashelHub::incomingData ( Dashel::Stream stream) [protected, virtual]

Reimplemented from Dashel::Hub.

Definition at line 123 of file asebaros.cpp.

void AsebaDashelHub::operator() ( )

run the hub

Definition at line 101 of file asebaros.cpp.

void AsebaDashelHub::sendMessage ( Aseba::Message message,
bool  doLock,
Dashel::Stream sourceStream = 0 
)

Sends a message to Dashel peers. Does not delete the message, should be called by the main thread.

Parameters:
messageaseba message to send
sourceStreamoriginate of the message, if from Dashel.

Definition at line 67 of file asebaros.cpp.

start the hub thread

Definition at line 108 of file asebaros.cpp.

stop the hub thread and wait for its termination

Definition at line 113 of file asebaros.cpp.


Member Data Documentation

thread for the hub

pointer to aseba ROS

Definition at line 36 of file asebaros.h.

bool AsebaDashelHub::forward [private]

should we only forward messages instead of transmit them back to the sender

Definition at line 37 of file asebaros.h.

boost::thread* AsebaDashelHub::thread [private]

Definition at line 35 of file asebaros.h.


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


asebaros
Author(s): Stéphane Magnenat
autogenerated on Sun Oct 5 2014 23:47:01