MCPcopy Create free account
hub / github.com/SoarGroup/Soar / RegisterForClientMessageEvent

Method RegisterForClientMessageEvent

Core/ClientSML/src/sml_ClientKernel.cpp:2208–2215  ·  view source on GitHub ↗

* @brief Register a handler for receiving generic messages sent from another client. * The content of the messages are up to the client and really aren't related to Soar, but providing the * ability to send a message from any client to any other client is sometimes useful. * * When the original client sends a message, the RHS function handler is called to process and (optional

Source from the content-addressed store, hash-verified

2206* @returns Unique ID for this callback. Required when unregistering this callback.
2207*************************************************************/
2208int Kernel::RegisterForClientMessageEvent(char const* pClientName, ClientMessageHandler handler, void* pUserData, bool addToBack)
2209{
2210 smlRhsEventId id = smlEVENT_CLIENT_MESSAGE ;
2211
2212 // We actually use the RHS function code internally to process this message (since it's almost exactly like calling a RHS function that's
2213 // processed on a client).
2214 return InternalAddRhsFunction(id, pClientName, static_cast<RhsEventHandler>(handler), pUserData, addToBack) ;
2215}
2216
2217/*************************************************************
2218* @brief Unregister for a particular client message

Calls

no outgoing calls

Tested by 1

TEST_DEFINITIONFunction · 0.64