|
DetectorGraph
2.0
|
Produces a Lagged<T> for T. More...
Public Member Functions | |
| Lag (Graph *graph) | |
| virtual void | Evaluate (const T ¤tTopicState) |
| Pure-virtual method that should Evaluate a piece of input data. More... | |
Public Member Functions inherited from DetectorGraph::Detector | |
| Detector (Graph *graph) | |
| Constructor. More... | |
| virtual | ~Detector () |
| Destructor. More... | |
| virtual VertexType | GetVertexType () const |
| Returns kDetectorVertex to identify this subclass of Vertex. More... | |
| void | ProcessVertex () |
| Consume data in the topics. More... | |
Public Member Functions inherited from DetectorGraph::Vertex | |
| Vertex () | |
| virtual | ~Vertex () |
| VertexSearchState | GetState () const |
| void | SetState (VertexSearchState aNewState) |
| void | InsertEdge (Vertex *aVertex) |
| void | RemoveEdge (Vertex *aVertex) |
| VertexPtrContainer & | GetOutEdges () |
| void | MarkFutureEdge (Vertex *aVertex) |
| VertexPtrContainer & | GetInEdges () |
| VertexPtrContainer & | GetFutureOutEdges () |
| VertexPtrContainer & | GetFutureInEdges () |
| const char * | GetName () const |
Public Member Functions inherited from DetectorGraph::FuturePublisher< Lagged< T > > | |
| FuturePublisher () | |
| void | SetGraph (Graph *aGraph) |
| void | PublishOnFutureEvaluation (const Lagged< T > &aData) |
| Publish a new version of T to the Graph for future evaluation. More... | |
Additional Inherited Members | |
Public Types inherited from DetectorGraph::Vertex | |
| enum | VertexSearchState { kVertexClear, kVertexProcessing, kVertexDone } |
| Enum used for topological sort & traverse context keeping. More... | |
| enum | VertexType { kTopicVertex, kDetectorVertex, kTestVertex } |
| typedef std::list< Vertex * > | VertexPtrContainer |
Protected Member Functions inherited from DetectorGraph::Detector | |
| template<class TTopicState > | |
| void | Subscribe (SubscriberInterface< TTopicState > *aSubscriber) |
| Setup an subscription on a specific topic. More... | |
| template<class TTopic > | |
| void | SetupPublishing (Publisher< TTopic > *aPublisher) |
| Setup an advertisement on a specific topic. More... | |
| template<class TTopic > | |
| void | SetupFuturePublishing (FuturePublisher< TTopic > *aFuturePublisher) |
| Setup an future advertisement on a specific topic. More... | |
| template<class TTopic > | |
| void | SetupTimeoutPublishing (TimeoutPublisher< TTopic > *aTimeoutPublisher, TimeoutPublisherService *aTimeoutPublisherService) |
| Setup an timeout advertisement on a specific topic. More... | |
| template<class TTopic > | |
| void | SetupPeriodicPublishing (const uint64_t aPeriodInMilliseconds, TimeoutPublisherService *aTimeoutPublisherService) |
| Setup an periodic advertisement on a specific topic. More... | |
| virtual void | BeginEvaluation () |
| Called before any calls to SubscriberInterface::Evaluate. More... | |
| virtual void | CompleteEvaluation () |
| Called after all calls to SubscriberInterface::Evaluate. More... | |
Protected Attributes inherited from DetectorGraph::Vertex | |
| VertexSearchState | mState |
| VertexPtrContainer | mOutEdges |
| VertexPtrContainer | mInEdges |
| VertexPtrContainer | mFutureOutEdges |
| VertexPtrContainer | mFutureInEdges |
Protected Attributes inherited from DetectorGraph::FuturePublisher< Lagged< T > > | |
| Graph * | mGraph |
Produces a Lagged<T> for T.
This is a utility detector (and topic template) that performs a 1-lag on a TopicState. It's meant to enable closing feedback loops in a graph in an expressive and transparent way. It creates a Detector with the following relationships:
Adding a Lag<T> Detector to a graph is done simply by adding it to a graph as shown (from this example) below:
Lagged<T> can then be used in any detector. In the same example:
|
inline |
|
inlinevirtual |
Pure-virtual method that should Evaluate a piece of input data.
Implements DetectorGraph::SubscriberInterface< T >.
1.8.13