SourceCode/Bond/Servo/Model.cpp
@@ -89,6 +89,30 @@
   m_hsmsPassive.init(this, "APP", 7000);
   SERVO::MasterListener masterListener;
   masterListener.onEqAlive = [&](void* pMaster, SERVO::CEquipment* pEquipment, BOOL bAlive) -> void {
      LOGI("<CModel>Equipment onAlive:%s(%s).\n", pEquipment->getName().c_str(),
         bAlive ? _T("ON") : _T("OFF"));
      notifyPtr(RX_CODE_EQ_ALIVE, pEquipment);
   };
   masterListener.onEqCimStateChanged = [&](void* pMaster, SERVO::CEquipment* pEquipment, BOOL bOn) -> void {
      LOGI("<CModel>Equipment Cim State:%s(%s).\n", pEquipment->getName().c_str(),
         bOn ? _T("ON") : _T("OFF"));
      notifyPtr(RX_CODE_EQ_ALIVE, pEquipment);
   };
   masterListener.onEqStepEvent = [&](SERVO::CStep* pStep, int code, void* pData) -> void {
      if (code == STEP_EVENT_READDATA) {
         LOGI("<CModel>onEqStepEvent,数据变化:%s(%s, 0x%x).\n", pStep->getEquipment()->getName().c_str(),
            pStep->getName().c_str(), pData);
         notifyPtr(RX_CODE_STEP_EVENT_READDATA, pStep);
      }
   };
   m_master.setListener(masterListener);
   return 0;
}
@@ -96,6 +120,8 @@
{
   m_hsmsPassive.term();
   CLog::GetLog()->SetOnLogCallback(nullptr);
   m_master.term();
   return 0;
}