1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "stdafx.h"
- #include "FluoroSwitchController.h"
- #include "ICommunicateEntity.h"
- using namespace DIOS::Dev::Detail::MachineryECOM;
- FluoroSwitchController::FluoroSwitchController() :m_communicate(nullptr)
- {
- }
- FluoroSwitchController::~FluoroSwitchController()
- {
- }
- std::string FluoroSwitchController::CLASSID()
- {
- return "A14BE4FF-C315-4380-8921-B00CF2A6DE2B";
- }
- void FluoroSwitchController::Initialize(const std::string &name)
- {
- SetName(name);
- }
- void FluoroSwitchController::OnCommunicationEstablished(ICommunicateEntity *communicate)
- {
- m_communicate = communicate;
- }
- void FluoroSwitchController::OutputSignal(bool bEnable)
- {
- if (!m_communicate)
- {
- return;
- }
- GPIO_DO_PARAM oriparam;
- oriparam.active_level = bEnable ? 0x1 : 0x0;
- m_communicate->GPIO_DO_Ctrl(OP_WRITE, (GPIO_DO_ID)m_functionIds[ID_FLUORO_SWITCH_OUT], DO_ATTR_NONE, oriparam);
- }
|