| | |
| | | #include "stdafx.h" |
| | | #include "Common.h" |
| | | #include "CMaster.h" |
| | | |
| | | namespace SERVO { |
| | |
| | | // cclink |
| | | if (m_cclink.Connect(CC_LINK_IE_CONTROL_CHANNEL(1)) != 0) { |
| | | LOGE("连接CC-Link失败."); |
| | | return -1; |
| | | } |
| | | else { |
| | | LOGI("连接CC-Link成功."); |
| | |
| | | // 初始化添加各子设备 |
| | | { |
| | | CEFEM* pEquipment = new CEFEM(); |
| | | pEquipment->setID(EQ_ID_EFEM); |
| | | pEquipment->setName("EFEM(ROBOT)"); |
| | | pEquipment->setDescription("EFEM(ROBOT)."); |
| | | pEquipment->setReadBitBlock(0x4000, 0x45ff); |
| | | pEquipment->setStation(1, 2); |
| | | addEquipment(pEquipment); |
| | | |
| | | pEquipment->init(); |
| | | LOGE("已添加“EFEM(ROBOT)”."); |
| | | } |
| | | /* |
| | |
| | | |
| | | int CMaster::term() |
| | | { |
| | | LOGI("<Master>正在结束程序."); |
| | | for (auto item : m_listEquipment) { |
| | | item->term(); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | |
| | | CEquipment* CMaster::getEquipment(int id) |
| | | { |
| | | for (auto item : m_listEquipment) { |
| | | if (item->getID() == id) return item; |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |