qavrg 0.0.28
|
00001 #include "qavrgepicsinterface.h" 00002 #include "qavrgfillpattern.h" 00003 #include <epics/cadef.h> 00004 #include <stdio.h> 00005 00006 QavrgEpicsInterface::QavrgEpicsInterface(QavrgApplication *app) 00007 : QObject(), 00008 m_Application(app) 00009 { 00010 int stat; 00011 00012 stat = ca_context_create(ca_enable_preemptive_callback); 00013 00014 if (stat != ECA_NORMAL) { 00015 printf("ca_context_create failed:\n%s\n", ca_message(stat)); 00016 return; 00017 } 00018 00019 m_FillPattern = new QavrgFillPattern(this); 00020 } 00021 00022 void QavrgEpicsInterface::shutdown() 00023 { 00024 delete m_FillPattern; 00025 00026 ca_context_destroy(); 00027 } 00028 00029 QavrgFillPattern *QavrgEpicsInterface::fillPattern() 00030 { 00031 return m_FillPattern; 00032 }