| | |
| | | |
| | | CEquipment::CEquipment() : m_nID(0), m_strName(""), m_strDescription(""), m_station(0, 255) |
| | | { |
| | | m_bEnable = TRUE; |
| | | m_listener = { }; |
| | | m_alive = { FALSE, 0, FALSE }; |
| | | m_bCimState = FALSE; |
| | |
| | | m_outputPins.clear(); |
| | | |
| | | DeleteCriticalSection(&m_criticalSection); |
| | | } |
| | | |
| | | void CEquipment::SetEnable(BOOL bEnable) |
| | | { |
| | | m_bEnable = bEnable; |
| | | } |
| | | |
| | | BOOL CEquipment::IsEnabled() const |
| | | { |
| | | return m_bEnable; |
| | | } |
| | | |
| | | void CEquipment::setListener(EquipmentListener listener) |
| | |
| | | |
| | | if (pSlot == nullptr) return -1; |
| | | pSlot->setContext(nullptr); |
| | | if (m_listener.onDataChanged != nullptr) { |
| | | m_listener.onDataChanged(this, EDCC_FETCHOUT_JOB); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |