TextRenderer: updated health monitoring support
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Wed, 3 Jul 2013 14:11:36 +0000 (16:11 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 5 Jul 2013 10:56:48 +0000 (12:56 +0200)
Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
LayerManagerPlugins/Renderers/Platform/TextRenderer/include/TextRenderer.h
LayerManagerPlugins/Renderers/Platform/TextRenderer/src/TextRenderer.cpp

index ff51e85..bf7f284 100644 (file)
@@ -34,7 +34,7 @@ public:
     uint getNumberOfHardwareLayers(uint screenID);
     uint* getScreenResolution(uint screenID);
     uint* getScreenIDs(uint* length);
-    bool start(int, int, const char*);
+    bool start(int, int, const char*, int maxIterationDurationInMS);
     void stop();
 
     void signalWindowSystemRedraw();
@@ -44,8 +44,8 @@ public:
     virtual bool getOptimizationMode(OptimizationType id, OptimizationModeType* mode);
 
     // from PluginBase
-    virtual HealthCondition pluginGetHealth();
     virtual t_ilm_const_string pluginGetName() const;
+    virtual int getIterationCounter();
 
 private:
     uint m_width;
index 4bf3ce6..f047e50 100644 (file)
@@ -31,8 +31,10 @@ TextRenderer::TextRenderer(ICommandExecutor& executor, Configuration& config)
     LOG_DEBUG("TextRenderer", "created");
 }
 
-bool TextRenderer::start(int width, int height, const char* displayname)
+bool TextRenderer::start(int width, int height, const char* displayname, int maxIterationDurationInMS)
 {
+    (void)maxIterationDurationInMS;
+    
     m_height = height;
     m_width = width;
 
@@ -141,14 +143,16 @@ bool TextRenderer::getOptimizationMode(OptimizationType id, OptimizationModeType
     return true;
 }
 
-HealthCondition TextRenderer::pluginGetHealth()
+t_ilm_const_string TextRenderer::pluginGetName() const
 {
-    return HealthRunning;
+    return "TextRenderer";
 }
 
-t_ilm_const_string TextRenderer::pluginGetName() const
+int TextRenderer::getIterationCounter()
 {
-    return "TextRenderer";
+    // no internal thread, fake thread iterations
+    static int i = 0;
+    return ++i;
 }
 
 DECLARE_LAYERMANAGEMENT_PLUGIN(TextRenderer)