CTriggerParamsComp.h
Go to the documentation of this file.
1 #ifndef isig_CTriggerParamsComp_included
2 #define isig_CTriggerParamsComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QVector>
7 
8 // ACF includes
9 #include <icomp/CComponentBase.h>
10 #include <iprm/ISelectionParam.h>
11 #include <iprm/IOptionsList.h>
12 
13 // ACF-Solutions includes
15 #include <isig/ITriggerParams.h>
16 
17 
18 namespace isig
19 {
20 
21 
26  public icomp::CComponentBase,
27  virtual public isig::ITriggerParams,
28  virtual public iprm::ISelectionParam,
29  virtual protected iprm::IOptionsList
30 {
31 public:
33 
35 
36  I_BEGIN_COMPONENT(CTriggerParamsComp);
37  I_REGISTER_INTERFACE(isig::ITriggerParams);
38  I_REGISTER_INTERFACE(iprm::ISelectionParam);
39  I_REGISTER_INTERFACE(iser::ISerializable);
40  I_ASSIGN(m_triggerConstraintsCompPtr, "Constraints", "Describing allowed parameter state, typically implemented in camera component", false, "Constraints");
41  I_ASSIGN(m_triggerModeAttrPtr, "TriggerMode", "Set trigger mode:\n\t0 - None\n\t1 - Continuous\n\t2 - Rising edge\n\t3 - Falling edge\n\t4 - Positive level\n\t5 - Negative level\n\t6 - Software", true, 0);
42  I_ASSIGN(m_triggersCountAttrPtr, "TriggersCount", "Set number of triggers executed in the continuous mode", true, -1);
43  I_END_COMPONENT;
44 
45  // reimplemented (isig::ITriggerParams)
46  virtual const ITriggerConstraints* GetTriggerConstraints() const;
47  virtual int GetTriggerMode() const;
48  virtual void SetTriggerMode(int triggerMode);
49  virtual int GetTriggersCount() const;
50  virtual void SetTriggersCount(int triggersCount);
51 
52  // reimplemented (iprm::ISelectionParam)
53  virtual const iprm::IOptionsList* GetSelectionConstraints() const;
54  virtual int GetSelectedOptionIndex() const;
55  virtual bool SetSelectedOptionIndex(int index);
56  virtual iprm::ISelectionParam* GetSubselection(int index) const;
57 
58  // reimplemented (iser::ISerializable)
59  virtual bool Serialize(iser::IArchive& archive);
60 
61 protected:
63 
64  // reimplemented (iprm::IOptionsList)
65  virtual int GetOptionsFlags() const;
66  virtual int GetOptionsCount() const;
67  virtual QString GetOptionName(int index) const;
68  virtual QString GetOptionDescription(int index) const;
69  virtual QByteArray GetOptionId(int index) const;
70  virtual bool IsOptionEnabled(int index) const;
71 
72  // reimplemented (icomp::CComponentBase)
73  virtual void OnComponentCreated();
74 
75 private:
76  int m_triggerMode;
77 
78  int m_triggersCount;
79 
80  struct SelectionEntry
81  {
82  QString name;
83  QString description;
84  int triggerMode;
85  };
86  typedef QVector<SelectionEntry> SelectionList;
87  SelectionList m_selectionList;
88 
89  I_REF(isig::ITriggerConstraints, m_triggerConstraintsCompPtr);
90  I_ATTR(int, m_triggerModeAttrPtr);
91  I_ATTR(int, m_triggersCountAttrPtr);
92 };
93 
94 
95 } // namespace isig
96 
97 
98 #endif // !isig_CTriggerParamsComp_included
99 
100 
Implementation of standard trigger parameters set.
virtual void SetTriggerMode(int triggerMode)
Set trigger mode.
Interface for hardware trigger parameters.
virtual iprm::ISelectionParam * GetSubselection(int index) const
virtual QString GetOptionName(int index) const
Interface for the signal trigger contstraints.
virtual int GetSelectedOptionIndex() const
virtual int GetOptionsFlags() const
virtual void OnComponentCreated()
virtual bool SetSelectedOptionIndex(int index)
virtual int GetTriggersCount() const
Get the number of triggers in the TM_CONTINUOUS mode.
virtual void SetTriggersCount(int triggersCount)
Set the number of triggers in the TM_CONTINUOUS mode.
virtual bool Serialize(iser::IArchive &archive)
virtual QByteArray GetOptionId(int index) const
virtual const ITriggerConstraints * GetTriggerConstraints() const
Get constraints describing supported parameter states.
virtual bool IsOptionEnabled(int index) const
virtual const iprm::IOptionsList * GetSelectionConstraints() const
virtual QString GetOptionDescription(int index) const
icomp::CComponentBase BaseClass
virtual int GetOptionsCount() const
virtual int GetTriggerMode() const
Get trigger mode.

© 2007-2017 Witold Gantzke and Kirill Lepskiy