gusimplewhiteboard
guWhiteboard::RemoteWhiteboard Class Reference

compatibility API for accessing the remote whiteboard More...

#include <RemoteWhiteboard.h>

Inheritance diagram for guWhiteboard::RemoteWhiteboard:
Collaboration diagram for guWhiteboard::RemoteWhiteboard:

Public Member Functions

 RemoteWhiteboard (const char *wbName, RWBMachine n, Whiteboard *local_whiteboard=NULL)
 API Constructor This sets up the API and the callback soap server. More...
 
virtual ~RemoteWhiteboard ()
 Destructor. More...
 
RWBMachine machine () const
 machine getter More...
 
void addReplicationType (const std::string &type)
 
std::vector< std::string > getKnownTypesForMachine ()
 Get Known Types For Machine Gets all the currently known types for a machine. More...
 
virtual void subscribeToMessage (const std::string &type, WBFunctorBase *func, WBResult &result)
 Subscribe To Message Subscribes to a message type on a whiteboard or whiteboards. More...
 
- Public Member Functions inherited from guWhiteboard::Whiteboard
 Whiteboard (const char *sharedMemoryObjectName=gsw_global_whiteboard_name, bool checkVersion=true, int number=0)
 API Constructor This sets up the API and the callback soap server. More...
 
virtual ~Whiteboard ()
 Destructor. More...
 
void addMessage (gsw_hash_info *hashinfo, const WBMsg &msg, bool nonatomic=false, bool notifySubscribers=true)
 Add Message Adds a message to the whiteboard that the API is connected to. More...
 
WBMsg getMessage (gsw_hash_info *hashinfo, WBResult *result=NULLPTR)
 Get Message Gets a message from a simple whiteboard. More...
 
void subscriptionCallback (void)
 subscription callback: not really public! More...
 
virtual void subscribeToMessage (gsw_hash_info *hashinfo, WBFunctorBase *func, WBResult &result)
 Subscribe To Message Subscribes to a message type on a whiteboard or whiteboards. More...
 
void unsubscribeToMessage (gsw_hash_info *hashinfo, WBResult &result)
 Unsubscribe To Message (sic!) Unsubscribes from a message type on a whiteboard or whiteboards. More...
 
gsw_hash_infogetTypeOffset (std::string type)
 create a hash offset from message type, needed for adding, getting from WB More...
 
void addMessage (const std::string &type, const WBMsg &msg, bool nonatomic=false, bool notifySubscribers=true)
 Add Message Adds a message to the whiteboard that the API is connected to. More...
 
WBMsg getMessage (std::string type, WBResult *result=NULLPTR)
 Get Message Gets a message from a simple whiteboard. More...
 
void unsubscribeToMessage (std::string type, WBResult &result)
 Unsubscribe To Message (sic!) Unsubscribes from a message type on a whiteboard or whiteboards. More...
 

Additional Inherited Members

- Public Types inherited from guWhiteboard::Whiteboard
enum  wb_method_result { METHOD_OK , METHOD_FAIL }
 Return Type Enum. More...
 
typedef enum guWhiteboard::Whiteboard::wb_method_result WBResult
 Return Type Enum. More...
 
- Static Public Member Functions inherited from guWhiteboard::Whiteboard
static WBMsg getWBMsg (gu_simple_message *m)
 convert the new 'simple' whiteboard data structure into the old WBMsg format More...
 
- Public Attributes inherited from guWhiteboard::Whiteboard
gu_simple_whiteboard_descriptor_wbd
 underlying whiteboard
More...
 

Detailed Description

compatibility API for accessing the remote whiteboard

Definition at line 114 of file RemoteWhiteboard.h.

Constructor & Destructor Documentation

◆ RemoteWhiteboard()

RemoteWhiteboard::RemoteWhiteboard ( const char *  wbName,
RWBMachine  n,
Whiteboard local_whiteboard = NULL 
)

API Constructor This sets up the API and the callback soap server.

Parameters
[in]wbNamename of the whiteboard
[in]nwhiteboard number
[in]local_whiteboardlocal whiteboard to use

Definition at line 102 of file RemoteWhiteboard.cc.

References guWhiteboard::Whiteboard::Whiteboard().

◆ ~RemoteWhiteboard()

RemoteWhiteboard::~RemoteWhiteboard ( )
virtual

Destructor.

shuts down the whiteboard

Definition at line 130 of file RemoteWhiteboard.cc.

Member Function Documentation

◆ addReplicationType()

void RemoteWhiteboard::addReplicationType ( const std::string &  type)
           Add Message
           Adds a message to the whiteboard that the API is connected to
           @param[in] type The string type associated with the message object

\

Definition at line 135 of file RemoteWhiteboard.cc.

References guWhiteboard::Whiteboard::addMessage().

Referenced by subscribeToMessage().

◆ getKnownTypesForMachine()

std::vector< std::string > RemoteWhiteboard::getKnownTypesForMachine ( )

Get Known Types For Machine Gets all the currently known types for a machine.

Returns
A vector of string containing the types

Definition at line 140 of file RemoteWhiteboard.cc.

References guWhiteboard::Whiteboard::_wbd, gsw_procure(), GSW_SEM_MSGTYPE, GSW_TOTAL_MESSAGE_TYPES, gsw_vacate(), gsw_simple_message::hash, gsw_simple_whiteboard_s::num_types, gsw_whiteboard_s::sem, gsw_simple_message::string, gsw_simple_whiteboard_s::typenames, and gsw_whiteboard_s::wb.

◆ machine()

RWBMachine guWhiteboard::RemoteWhiteboard::machine ( ) const
inline

machine getter

Definition at line 136 of file RemoteWhiteboard.h.

◆ subscribeToMessage()

void RemoteWhiteboard::subscribeToMessage ( const std::string &  type,
WBFunctorBase func,
WBResult result 
)
virtual

Subscribe To Message Subscribes to a message type on a whiteboard or whiteboards.

Parameters
[in]typeThe string type to subscribe to
[in]funcThe function to call when a message of the type enter is added
[out]resultAn enum showing that either an error occured or the operation was completed successfully

Reimplemented from guWhiteboard::Whiteboard.

Definition at line 160 of file RemoteWhiteboard.cc.

References addReplicationType(), and guWhiteboard::Whiteboard::subscribeToMessage().


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