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

Method Refresh

Core/ClientSML/src/sml_ClientWorkingMemory.cpp:1388–1410  ·  view source on GitHub ↗

* @brief Resend the complete input link to the kernel * and remove our output link structures. * We do this when the user issues an "init-soar" event. * There should be no reason for the client to call this method directly. *************************************************************/

Source from the content-addressed store, hash-verified

1386* There should be no reason for the client to call this method directly.
1387*************************************************************/
1388void WorkingMemory::Refresh()
1389{
1390 if (m_InputLink)
1391 {
1392 AnalyzeXML response ;
1393
1394 // Start by getting the input link identifier
1395 if (GetConnection()->SendAgentCommand(&response, sml_Names::kCommand_GetInputLink, GetAgentName()))
1396 {
1397 // Old comment: Technically we should reset the value of the input link identifier itself, but it should never
1398 // change value (since it's architecturally created) and also adding a method to set the identifier value
1399 // is a bad idea if we only need it here.
1400
1401 // New comment: smem's lti support means the parent symbol can change.
1402 m_InputLink->GetSymbol()->SetIdentifierSymbol(response.GetResultString());
1403 }
1404
1405 m_InputLink->Refresh() ;
1406
1407 // Send the new input link over to the kernel
1408 Commit() ;
1409 }
1410}
1411
1412void WorkingMemory::InvalidateOutputLink()
1413{

Callers

nothing calls this directly

Calls 4

SendAgentCommandMethod · 0.80
SetIdentifierSymbolMethod · 0.80
GetConnectionFunction · 0.70
GetResultStringMethod · 0.45

Tested by

no test coverage detected