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

Method ReceivedEvent

Core/ClientSML/src/sml_ClientKernel.cpp:471–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471void Kernel::ReceivedEvent(AnalyzeXML* pIncoming, ElementXML* pResponse)
472{
473 char const* pEventName = pIncoming->GetArgString(sml_Names::kParamEventID) ;
474
475 // This event had no event id field
476 if (!pEventName)
477 {
478 return ;
479 }
480
481 // Convert from the string to an event ID
482 int id = m_pEventMap->ConvertToEvent(pEventName) ;
483
484 if (IsSystemEventID(id))
485 {
486 ReceivedSystemEvent(smlSystemEventId(id), pIncoming, pResponse) ;
487 }
488 else if (IsAgentEventID(id))
489 {
490 ReceivedAgentEvent(smlAgentEventId(id), pIncoming, pResponse) ;
491 }
492 else if (IsRhsEventID(id))
493 {
494 ReceivedRhsEvent(smlRhsEventId(id), pIncoming, pResponse) ;
495 }
496 else if (IsUpdateEventID(id))
497 {
498 ReceivedUpdateEvent(smlUpdateEventId(id), pIncoming, pResponse) ;
499 }
500 else if (IsStringEventID(id))
501 {
502 ReceivedStringEvent(smlStringEventId(id), pIncoming, pResponse) ;
503 }
504}
505
506/*************************************************************
507* @brief This function is called when an event is received

Callers 1

ProcessIncomingSMLMethod · 0.95

Calls 11

GetArgStringMethod · 0.80
IsSystemEventIDFunction · 0.50
smlSystemEventIdEnum · 0.50
IsAgentEventIDFunction · 0.50
smlAgentEventIdEnum · 0.50
IsRhsEventIDFunction · 0.50
smlRhsEventIdEnum · 0.50
IsUpdateEventIDFunction · 0.50
smlUpdateEventIdEnum · 0.50
IsStringEventIDFunction · 0.50
smlStringEventIdEnum · 0.50

Tested by

no test coverage detected