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

Method SendClientMessage

Core/KernelSML/src/sml_KernelSML.cpp:250–263  ·  view source on GitHub ↗

* @brief Send this message out to any clients that are listening. * These messages are from one client to another--kernelSML is just * facilitating the message passing process without knowing/caring what is being passed. *************************************************************/

Source from the content-addressed store, hash-verified

248* facilitating the message passing process without knowing/caring what is being passed.
249*************************************************************/
250std::string KernelSML::SendClientMessage(AgentSML* pAgentSML, char const* pMessageType, char const* pMessage)
251{
252 char response[10000] ;
253 response[0] = 0 ;
254
255 bool ok = m_RhsListener.HandleEvent(smlEVENT_CLIENT_MESSAGE, pAgentSML, false, pMessageType, pMessage, sizeof(response), response) ;
256 if (!ok)
257 {
258 // There was listening to this message
259 strcpy(response, "**NOBODY RESPONDED**") ;
260 }
261
262 return response ;
263}
264
265/*************************************************************
266* @brief Send this command line out to all clients that have

Callers 4

destroySoarMethod · 0.45
TEST_DEFINITIONFunction · 0.45

Calls 1

HandleEventMethod · 0.45

Tested by 3

destroySoarMethod · 0.36
TEST_DEFINITIONFunction · 0.36