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

Method Shutdown

Core/ClientSML/src/sml_ClientKernel.cpp:179–198  ·  view source on GitHub ↗

* @brief Preparation for deleting the kernel. * Agents are destroyed at this point (if we own the kernel) * After calling shutdown the kernel cannot be restarted * it must be deleted. * This is separated from delete to ensure that messages * relating to system shutdown can be sent in a more stable * state (while the kernel object still exists). ***********

Source from the content-addressed store, hash-verified

177* state (while the kernel object still exists).
178*************************************************************/
179void Kernel::Shutdown()
180{
181 m_bShutdown = true ;
182
183 // Currently we have no work to do on the kernel side before
184 // disconnecting a remote connection.
185 if (!GetConnection() || GetConnection()->IsRemoteConnection())
186 {
187 if (GetConnection())
188 {
189 GetConnection()->CloseConnection() ;
190 }
191
192 return ;
193 }
194
195 AnalyzeXML response ;
196 GetConnection()->SendAgentCommand(&response, sml_Names::kCommand_Shutdown) ;
197 GetConnection()->CloseConnection() ;
198}
199
200/*************************************************************
201* @brief Delete the kernel (or our connection to the kernel)

Callers 1

TestPythonSML.pyFile · 0.45

Calls 4

SendAgentCommandMethod · 0.80
GetConnectionFunction · 0.70
IsRemoteConnectionMethod · 0.45
CloseConnectionMethod · 0.45

Tested by

no test coverage detected