Free Electron
Periodic.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __intelligence_Periodic_h__
8 #define __intelligence_Periodic_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Periodic RecordView
16 
17  @ingroup intelligence
18 *//***************************************************************************/
19 class FE_DL_EXPORT Periodic: virtual public RecordView
20 {
21  public:
22  Functor<I32> periodMS;
23  Functor<I32> readyMS;
24  Functor<I32> backlog;
25 
26  Periodic(void) { setName("Periodic"); }
27 virtual void addFunctors(void)
28  {
29  add(periodMS, FE_SPEC("ai:periodMS",
30  "How often we can act"));
31  add(readyMS, FE_SPEC("ai:readyMS",
32  "When to act next"));
33  add(backlog, FE_SPEC("ai:backlog",
34  "Count of unused triggers"));
35  }
36 virtual void initializeRecord(void)
37  {
38  periodMS()=1000;
39  readyMS()=0;
40  backlog()=0;
41  }
42 };
43 
44 } /* namespace ext */
45 } /* namespace fe */
46 
47 #endif /* __intelligence_Periodic_h__ */
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
Periodic RecordView.
Definition: Periodic.h:19
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Periodic.h:36
Bindable collection of accessor Functors.
Definition: RecordView.h:106
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Periodic.h:27