| | |
| | | return iter->second; |
| | | } |
| | | |
| | | CStep* CEquipment::getStepWithName(const char* pszName) |
| | | { |
| | | for (auto item : m_mapStep) { |
| | | if (item.second->getName().compare(pszName) == 0) { |
| | | return item.second; |
| | | } |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | int CEquipment::addStep(unsigned int addr, CStep* pStep) |
| | | { |
| | | auto iter = m_mapStep.find(addr); |
| | |
| | | return m_station; |
| | | } |
| | | |
| | | void CEquipment::getAttributeVector(CAttributeVector& attrubutes) |
| | | { |
| | | attrubutes.clear(); |
| | | attrubutes.addAttribute(new CAttribute("Network", |
| | | std::to_string(m_station.nNetNo).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("Station", |
| | | std::to_string(m_station.nStNo).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("ID", |
| | | std::to_string(m_nID).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("Name", |
| | | m_strName.c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("Description", |
| | | m_strDescription.c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("Alive", |
| | | this->isAlive() ? _T("TRUE") : _T("FALSE"), "")); |
| | | attrubutes.addAttribute(new CAttribute("CIM State", |
| | | m_bCimState ? _T("ON") : _T("OFF"), "")); |
| | | attrubutes.addAttribute(new CAttribute("Upstream", |
| | | m_bUpstreamInline ? _T("Inline") : _T("Offline"), "")); |
| | | attrubutes.addAttribute(new CAttribute("Downstream", |
| | | m_bDownstreamInline ? _T("Inline") : _T("Offline"), "")); |
| | | attrubutes.addAttribute(new CAttribute("Local Alarm", |
| | | m_bLocalAlarm ? _T("TRUE") : _T("FALSE"), "")); |
| | | attrubutes.addAttribute(new CAttribute("Auto Recipe Change", |
| | | m_bAutoRecipeChange ? _T("TRUE") : _T("FALSE"), "")); |
| | | char szTemp[256]; |
| | | for (int i = 0; i < VCR_MAX; i++) { |
| | | sprintf_s(szTemp, 256, "VCR-%d", i + 1); |
| | | attrubutes.addAttribute(new CAttribute(szTemp, |
| | | m_bVCREnable[i] ? _T("Enable") : _T("Disable"), "")); |
| | | } |
| | | } |
| | | |
| | | void CEquipment::setReadBitBlock(unsigned int start, unsigned int end) |
| | | { |
| | | m_blockReadBit.type = (unsigned int)DeviceType::B; |