Forráskód Böngészése

Eigenschaften für Netto-Arbeitszykluszeiten implementiert.

Rind 5 éve
szülő
commit
038fb932f6

+ 7 - 7
Test/Test.pro.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 4.11.1, 2020-02-15T05:35:42. -->
+<!-- Written by QtCreator 4.11.1, 2020-02-19T19:27:42. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>
@@ -8,7 +8,7 @@
  </data>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
-  <value type="int">0</value>
+  <value type="int">1</value>
  </data>
  <data>
   <variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -71,7 +71,7 @@
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Sitara 1</value>
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Sitara 1</value>
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{b0a415a1-ecbe-4123-8afc-05ffc0004131}</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
    <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
    <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">3</value>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@@ -726,7 +726,7 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
     <value type="QString" key="RunConfiguration.WorkingDirectory"></value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/wrk/share/gfaipc/Test/Debug/Desktop_Qt_5_7_1_GCC_64bit/app1</value>
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
     <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
@@ -800,7 +800,7 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
     <value type="QString" key="RunConfiguration.WorkingDirectory"></value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/wrk/share/gfaipc/Test/Debug/Desktop_Qt_5_7_1_GCC_64bit/app2</value>
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.2">
     <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
@@ -874,7 +874,7 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
     <value type="QString" key="RunConfiguration.WorkingDirectory"></value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/wrk/share/gfaipc/Test/Debug/Desktop_Qt_5_7_1_GCC_64bit/app3</value>
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.3">
     <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
@@ -948,7 +948,7 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
     <value type="QString" key="RunConfiguration.WorkingDirectory"></value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/wrk/share/gfaipc/Test/Debug/Desktop_Qt_5_7_1_GCC_64bit/qmlApp</value>
    </valuemap>
    <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">4</value>
   </valuemap>

+ 1 - 0
Test/app1/app.h

@@ -14,6 +14,7 @@
 #define _APPNAME_1		_APPNAME_MQTTCL
 #define _APPNAME_2		_APPNAME_REST
 #define _CYCLE_INTV		20
+#define _WORK_DELAY_US	50
 
 /////////////////////////////////////////////////////////////////////////////
 #endif	//	!defined(AGD_APP_H__A50B34D4_A27E_4F0D_8FE9_02D35AC82A13__INCLUDED_)

+ 1 - 0
Test/app2/app.h

@@ -14,6 +14,7 @@
 #define _APPNAME_1		_APPNAME_REMANENT
 #define _APPNAME_2		_APPNAME_MQTTCL
 #define _CYCLE_INTV		40
+#define _WORK_DELAY_US	150
 
 /////////////////////////////////////////////////////////////////////////////
 #endif	//	!defined(AGD_APP_H__A50B34D4_A27E_4F0D_8FE9_02D35AC82A13__INCLUDED_)

+ 1 - 0
Test/app3/app.h

@@ -14,6 +14,7 @@
 #define _APPNAME_1		_APPNAME_REST
 #define _APPNAME_2		_APPNAME_REMANENT
 #define _CYCLE_INTV		30
+#define _WORK_DELAY_US	100
 
 /////////////////////////////////////////////////////////////////////////////
 #endif	//	!defined(AGD_APP_H__A50B34D4_A27E_4F0D_8FE9_02D35AC82A13__INCLUDED_)

+ 21 - 5
Test/main.cpp

@@ -20,10 +20,10 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #define UNUSED(v)				(void)v
-#define _MAX_CYCLE_DELAY		(_CYCLE_INTV * 5000)
 
 static volatile bool g_fRun		= false;
 static volatile bool g_fPause	= false;
+static volatile bool g_fHang	= false;
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -102,6 +102,7 @@ static void _ProcessCtrlMessages(HAPPCTRL hAC, HAPPINFO hAI)
 			break;
 		case _CTRL_MSG_DELAY:
 			TRACE("Hanging %d seconds.\n", _HANG_DELAY);
+			g_fHang = true;
 			_DoHang(_HANG_DELAY);
 			break;
 		default:
@@ -174,8 +175,19 @@ static void _ProcessInput(HAPPCTRL hAC)
 
 static int _DoWork(void)
 {
-	static int nCounter = 0;
-	return ++nCounter;
+	int i, j = 0;
+	int k = g_fHang ? 1000000000 : 100000;
+	
+	for(i = 0; i < k; ++i)
+	{
+		j += 4;
+		j -= 2;
+		j += 1;
+		j -= 3;
+	}
+
+	g_fHang = false;
+	return j;
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -216,7 +228,7 @@ int main(void)
 
 	do
 	{
-		if(!(hAC = ::GfaIpcAppCtrlAcquire(_APPID_0, _APPNAME_0, _MAX_CYCLE_DELAY)))
+		if(!(hAC = ::GfaIpcAppCtrlAcquire(_APPID_0, _APPNAME_0, _CYCLE_INTV * 1000, _CYCLE_INTV * 3000)))
 			break;
 
 		;;GfaIpcDumpSHMROT();
@@ -243,6 +255,7 @@ int main(void)
 	// run
 
 	CCycleTimer ct(_CYCLE_INTV);
+	cy_time_t wStart, wEnd, wCur = 0;
 
 	while(g_fRun)
 	{
@@ -259,7 +272,7 @@ int main(void)
 		/////////////////////////////////////////////////////////////////////
 		// update app control info
 
-		if((hAI = ::GfaIpcAppCtrlInfoUpdate(hAC)))
+		if((hAI = ::GfaIpcAppCtrlInfoUpdate(hAC, wCur)))
 		{
 			_ProcessCtrlMessages(hAC, hAI);
 			_ProcessStateEvents(hAC, hAI);
@@ -270,7 +283,10 @@ int main(void)
 
 		if(!g_fPause && g_fRun)
 		{
+			wStart = ct.GetMicroTick();
 			_DoWork();
+			wEnd = ct.GetMicroTick();
+			wCur = wEnd - wStart;
 		}
 
 		/////////////////////////////////////////////////////////////////////

+ 18 - 18
Test/qmlApp/main.qml

@@ -63,7 +63,7 @@ Window {
 		        font.italic: true
 				anchors.verticalCenter: parent.verticalCenter
 	            anchors.left: parent.left
-		        text: "Cyc. min. μs:"
+		        text: "Cyc. cur. μs:"
 		    }
 		}
 
@@ -77,7 +77,7 @@ Window {
 		        font.italic: true
 				anchors.verticalCenter: parent.verticalCenter
 	            anchors.left: parent.left
-		        text: "Cyc. max. μs:"
+		        text: "Wkt. max. μs:"
 		    }
 		}
 
@@ -91,7 +91,7 @@ Window {
 		        font.italic: true
 				anchors.verticalCenter: parent.verticalCenter
 	            anchors.left: parent.left
-		        text: "Cyc. cur. μs:"
+		        text: "Wkt. cur. μs:"
 		    }
 		}
 
@@ -259,7 +259,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMin
+		        text: parent.parent.appInfo.cycCur
 		    }
 		}
 
@@ -274,7 +274,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMax
+		        text: parent.parent.appInfo.wktMax
 		    }
 		}
 
@@ -289,7 +289,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycCur
+		        text: parent.parent.appInfo.wktCur
 		    }
 		}
 
@@ -444,7 +444,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMin
+		        text: parent.parent.appInfo.cycCur
 		    }
 		}
 
@@ -459,7 +459,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMax
+		        text: parent.parent.appInfo.wktMax
 		    }
 		}
 
@@ -474,7 +474,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycCur
+		        text: parent.parent.appInfo.wktCur
 		    }
 		}
 
@@ -629,7 +629,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMin
+		        text: parent.parent.appInfo.cycCur
 		    }
 		}
 
@@ -644,7 +644,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMax
+		        text: parent.parent.appInfo.wktMax
 		    }
 		}
 
@@ -659,7 +659,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycCur
+		        text: parent.parent.appInfo.wktCur
 		    }
 		}
 
@@ -814,7 +814,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMin
+		        text: parent.parent.appInfo.cycCur
 		    }
 		}
 
@@ -829,7 +829,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMax
+		        text: parent.parent.appInfo.wktMax
 		    }
 		}
 
@@ -844,7 +844,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycCur
+		        text: parent.parent.appInfo.wktCur
 		    }
 		}
 
@@ -999,7 +999,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMin
+		        text: parent.parent.appInfo.cycCur
 		    }
 		}
 
@@ -1014,7 +1014,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycMax
+		        text: parent.parent.appInfo.wktMax
 		    }
 		}
 
@@ -1029,7 +1029,7 @@ Window {
 		    Text {
 		        font.pixelSize: 14
 	            anchors.centerIn: parent
-		        text: parent.parent.appInfo.cycCur
+		        text: parent.parent.appInfo.wktCur
 		    }
 		}
 

+ 88 - 7
Test/qmlApp/qappctrl.cpp

@@ -10,7 +10,7 @@
 #define _IS_POWER_OF_2(x)								(!!(x) && !((x) & ((x) - 1)))
 #define _IS_VALID_APP_ID(i)								_IS_POWER_OF_2(i)
 #define _TIMESPEC_2_US(ts)								(((clock64_t)(ts).tv_sec) * 1000000LL + ((clock64_t)(ts).tv_nsec) / 1000LL)
-#define _TIMESPEC_DIFF(ts1, ts2)						(_TIMESPEC_2_US(ts1) - _TIMESPEC_2_US(ts2))
+#define _TIMESPEC_DIFF_US(ts1, ts2)						(_TIMESPEC_2_US(ts1) - _TIMESPEC_2_US(ts2))
 #define _MIN_TIMER_INT									20
 
 /////////////////////////////////////////////////////////////////////////////
@@ -20,9 +20,13 @@
 QGfaAppInfo::QGfaAppInfo(int nIndex, QObject *pParent) :	QObject(pParent),
 															m_state(GIAS_StateNotRunning),
 															m_nIndex(nIndex),
+															m_cycInt(0),
 															m_cycCur(0),
 															m_cycMin(0),
 															m_cycMax(0),
+															m_wktCur(0),
+															m_wktMin(0),
+															m_wktMax(0),
 															m_upTime(0),
 															m_cpuTime(0.0),
 															m_cpuPercCur(0.0),
@@ -92,6 +96,11 @@ void QGfaAppInfo::setName(const QString &val)
 
 /////////////////////////////////////////////////////////////////////////////
 
+quint64 QGfaAppInfo::cycInt(void) const
+{
+	return m_cycInt;
+}
+
 quint64 QGfaAppInfo::cycCur(void) const
 {
 	return m_cycCur;
@@ -107,6 +116,23 @@ quint64 QGfaAppInfo::cycMax(void) const
 	return m_cycMax;
 }
 
+
+quint64 QGfaAppInfo::wktCur(void) const
+{
+	return m_wktCur;
+}
+
+quint64 QGfaAppInfo::wktMin(void) const
+{
+	return m_wktMin;
+}
+
+quint64 QGfaAppInfo::wktMax(void) const
+{
+	return m_wktMax;
+}
+
+
 quint64 QGfaAppInfo::upTime(void) const
 {
 	return m_upTime;
@@ -131,6 +157,12 @@ void QGfaAppInfo::setAppTimes(LPCGFA_APPCTRL_APPTIMES pat, GfaIpcAppStates state
 {
 	if(pat)
 	{
+		if(m_cycInt != (quint64)pat->nCyclePresetUs)
+		{
+			m_cycInt = (quint64)pat->nCyclePresetUs;
+			emit cycIntChanged(m_cycInt);
+		}
+
 		if(state == GIAS_Running)
 		{
 			if(m_cycMin != (quint64)pat->nCycleMinUs)
@@ -144,6 +176,18 @@ void QGfaAppInfo::setAppTimes(LPCGFA_APPCTRL_APPTIMES pat, GfaIpcAppStates state
 				m_cycMax = (quint64)pat->nCycleMaxUs;
 				emit cycMaxChanged(m_cycMax);
 			}
+
+			if(m_wktMin != (quint64)pat->nWorkMinUs)
+			{
+				m_wktMin = (quint64)pat->nWorkMinUs;
+				emit wktMinChanged(m_wktMin);
+			}
+
+			if(m_wktMax != (quint64)pat->nWorkMaxUs)
+			{
+				m_wktMax = (quint64)pat->nWorkMaxUs;
+				emit wktMaxChanged(m_wktMax);
+			}
 		}
 		else
 		{
@@ -152,6 +196,12 @@ void QGfaAppInfo::setAppTimes(LPCGFA_APPCTRL_APPTIMES pat, GfaIpcAppStates state
 				m_cycCur = 0;
 				emit cycCurChanged(m_cycCur);
 			}
+
+			if(m_wktCur != 0)
+			{
+				m_wktCur = 0;
+				emit wktCurChanged(m_wktCur);
+			}
 		}
 
 		if(bDoHeavyLoadUpdate)
@@ -171,6 +221,12 @@ void QGfaAppInfo::setAppTimes(LPCGFA_APPCTRL_APPTIMES pat, GfaIpcAppStates state
 					m_cycCur = (quint64)pat->nCycleLastUs;
 					emit cycCurChanged(m_cycCur);
 				}
+
+				if(m_wktCur != (quint64)pat->nWorkLastUs)
+				{
+					m_wktCur = (quint64)pat->nWorkLastUs;
+					emit wktCurChanged(m_wktCur);
+				}
 			}
 			
 			if(state != GIAS_Hanging)
@@ -197,12 +253,24 @@ void QGfaAppInfo::setAppTimes(LPCGFA_APPCTRL_APPTIMES pat, GfaIpcAppStates state
 	}
 	else
 	{
+		if(m_cycInt != 0)
+		{
+			m_cycInt = 0;
+			emit cycIntChanged(m_cycInt);
+		}
+
 		if(m_cycCur != 0)
 		{
 			m_cycCur = 0;
 			emit cycCurChanged(m_cycCur);
 		}
 
+		if(m_wktCur != 0)
+		{
+			m_wktCur = 0;
+			emit wktCurChanged(m_wktCur);
+		}
+
 		if(state == GIAS_Hanging)
 		{
 			if(m_cpuTime != -1)
@@ -237,6 +305,18 @@ void QGfaAppInfo::setAppTimes(LPCGFA_APPCTRL_APPTIMES pat, GfaIpcAppStates state
 				emit cycMaxChanged(m_cycMax);
 			}
 
+			if(m_wktMin != 0)
+			{
+				m_wktMin = 0;
+				emit wktMinChanged(m_wktMin);
+			}
+
+			if(m_wktMax != 0)
+			{
+				m_wktMax = 0;
+				emit wktMaxChanged(m_wktMax);
+			}
+
 			if(m_upTime != 0)
 			{
 				m_upTime = 0;
@@ -330,7 +410,7 @@ bool QGfaAppCtrl::Create(appid_t nAppID, const char *pszDisplayName, int nTimerI
 		if(nHeavyLoadUpdateIntervalMs < (nTimerIntMs * 50))
 			nHeavyLoadUpdateIntervalMs = (nTimerIntMs * 50);
 
-		if((m_hAC = ::GfaIpcAppCtrlAcquire(nAppID, pszDisplayName, (clock64_t)(nTimerIntMs * 1000 * 2))))
+		if((m_hAC = ::GfaIpcAppCtrlAcquire(nAppID, pszDisplayName, 0, (clock64_t)(nTimerIntMs * 1000 * 2))))
 		{
 			m_nAppID = nAppID;
 			m_nHeavyLoadUpdateIntervalUs = nHeavyLoadUpdateIntervalMs * 1000;
@@ -388,6 +468,7 @@ bool QGfaAppCtrl::SubscribeStateEvents(appid_t nAppMask)
 
 void QGfaAppCtrl::timerEvent(QTimerEvent *event)
 {
+	static clock64_t nCurPass = 0;
 	struct timespec	tsEnterUpdate, tsLeaveUpdate;
 	::clock_gettime(CLOCK_MONOTONIC, &tsEnterUpdate);
 
@@ -395,7 +476,7 @@ void QGfaAppCtrl::timerEvent(QTimerEvent *event)
 	{
 		HAPPINFO hAI;
 
-		if((hAI = ::GfaIpcAppCtrlInfoUpdate(m_hAC)))
+		if((hAI = ::GfaIpcAppCtrlInfoUpdate(m_hAC, nCurPass)))
 		{
 			int b;
 		    appid_t app, nAppIdSrc;
@@ -445,7 +526,7 @@ void QGfaAppCtrl::timerEvent(QTimerEvent *event)
 			}
 
 			nAppIdSrc = m_nEvtSrcs;
-			bool bDontSaveLast = false, bUpdate = (_TIMESPEC_DIFF(tsEnterUpdate, m_tsLastHeavyLoadUpdate) >= m_nHeavyLoadUpdateIntervalUs);
+			bool bDontSaveLast = false, bUpdate = (_TIMESPEC_DIFF_US(tsEnterUpdate, m_tsLastHeavyLoadUpdate) >= m_nHeavyLoadUpdateIntervalUs);
 
 			while(nAppIdSrc)
 			{
@@ -473,7 +554,7 @@ void QGfaAppCtrl::timerEvent(QTimerEvent *event)
 	}
 
 	::clock_gettime(CLOCK_MONOTONIC, &tsLeaveUpdate);
-	m_curPass = _TIMESPEC_DIFF(tsLeaveUpdate, tsEnterUpdate);
+	m_curPass = nCurPass = _TIMESPEC_DIFF_US(tsLeaveUpdate, tsEnterUpdate);
 
 	if(m_minPass > m_curPass)
 	{
@@ -496,8 +577,8 @@ void QGfaAppCtrl::timerEvent(QTimerEvent *event)
 	{
 		static uint64_t nPasses = 0;
 		++nPasses;
-//		clock64_t avgPass = (m_avgPass + m_curPass) / 2;
-		clock64_t avgPass = (clock64_t)sqrt(double((m_avgPass * m_avgPass + m_curPass * m_curPass) / 2));
+		clock64_t avgPass = (m_avgPass + m_curPass) / 2;
+//		clock64_t avgPass = (clock64_t)sqrt(double((m_avgPass * m_avgPass + m_curPass * m_curPass) / 2));
 		if(m_avgPass != avgPass)
 		{
 			m_avgPass = avgPass;

+ 16 - 0
Test/qmlApp/qappctrl.h

@@ -20,9 +20,13 @@ class QGfaAppInfo : public QObject
 	Q_PROPERTY(int state READ state NOTIFY stateChanged)
 	Q_PROPERTY(QString stateText READ stateText NOTIFY stateTextChanged)
 	Q_PROPERTY(QString name READ name NOTIFY nameChanged)
+	Q_PROPERTY(quint64 cycInt READ cycInt NOTIFY cycIntChanged)
 	Q_PROPERTY(quint64 cycCur READ cycCur NOTIFY cycCurChanged)
 	Q_PROPERTY(quint64 cycMin READ cycMin NOTIFY cycMinChanged)
 	Q_PROPERTY(quint64 cycMax READ cycMax NOTIFY cycMaxChanged)
+	Q_PROPERTY(quint64 wktCur READ wktCur NOTIFY wktCurChanged)
+	Q_PROPERTY(quint64 wktMin READ wktMin NOTIFY wktMinChanged)
+	Q_PROPERTY(quint64 wktMax READ wktMax NOTIFY wktMaxChanged)
 	Q_PROPERTY(quint64 upTime READ upTime NOTIFY upTimeChanged)
 	Q_PROPERTY(double cpuTime READ cpuTime NOTIFY cpuTimeChanged)
 	Q_PROPERTY(double cpuCur READ cpuCur NOTIFY cpuCurChanged)
@@ -38,9 +42,13 @@ signals:
 	void stateTextChanged(const QString &val);
 	void nameChanged(const QString &val);
 	void sendControlMessage(appid_t nAppID, ctrlmsg_t msg);
+	void cycIntChanged(quint64 val);
 	void cycCurChanged(quint64 val);
 	void cycMinChanged(quint64 val);
 	void cycMaxChanged(quint64 val);
+	void wktCurChanged(quint64 val);
+	void wktMinChanged(quint64 val);
+	void wktMaxChanged(quint64 val);
 	void upTimeChanged(quint64 val);
 	void cpuTimeChanged(double val);
 	void cpuCurChanged(double val);
@@ -59,9 +67,13 @@ public:
 	QString name(void) const;
 	void setName(const QString &val);
 	
+	quint64 cycInt(void) const;
 	quint64 cycCur(void) const;
 	quint64 cycMin(void) const;
 	quint64 cycMax(void) const;
+	quint64 wktCur(void) const;
+	quint64 wktMin(void) const;
+	quint64 wktMax(void) const;
 	quint64 upTime(void) const;
 	double cpuTime(void) const;
 	double cpuCur(void) const;
@@ -77,9 +89,13 @@ private:
 	QString m_name;
 	int m_nIndex;
 	appid_t m_nAppID;
+	quint64 m_cycInt;
 	quint64 m_cycCur;
 	quint64 m_cycMin;
 	quint64 m_cycMax;
+	quint64 m_wktCur;
+	quint64 m_wktMin;
+	quint64 m_wktMax;
 	quint64 m_upTime;
 	double m_cpuTime;
 	double m_cpuPercCur;

+ 3 - 5
Test/test.pri

@@ -4,27 +4,25 @@ CONFIG -= app_bundle
 CONFIG -= qt
 
 QMAKE_LFLAGS += -Wl,-rpath=/usr/lib/gfa
+QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib/gfa
 
 CONFIG(debug, debug|release) {
     QMAKE_CXXFLAGS -= -Os -pthread
     QMAKE_CFLAGS -= -Os -pthread
     QMAKE_CXXFLAGS += -D_DEBUG
     QMAKE_CFLAGS += -D_DEBUG
-	QMAKE_LIBS += -lgfaipcd -lgfasitarautilsd -pthread
+	QMAKE_LIBS += -lgfaipcd -lgfasitarautilsd
 }
 
 CONFIG(release, debug|release) {
-	QMAKE_LIBS += -lgfaipc -lgfasitarautils -pthread
+	QMAKE_LIBS += -lgfaipc -lgfasitarautils
 }
 
 linux-buildroot-g++ {
     QMAKE_CXXFLAGS += -D_TARGET_BUILD
     QMAKE_CFLAGS += -D_TARGET_BUILD
-    QMAKE_LIBDIR += $$(SITARA_TOOLCHAIN_ROOT)/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/gfa
     target.path += /opt/GfA/ipc/test
 	INSTALLS += target
-} else {
-	QMAKE_LIBDIR += /usr/lib/gfa
 }
 
 SOURCES += ../main.cpp

+ 2 - 0
gfaipc.pro

@@ -4,6 +4,8 @@ TARGET = gfaipc
 CONFIG -= app_bundle
 CONFIG -= qt
 
+QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/gfa
+
 CONFIG(debug, debug|release) {
     QMAKE_CXXFLAGS -= -Os
     QMAKE_CFLAGS -= -Os

+ 2 - 2
gfaipc.pro.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 4.11.1, 2020-02-15T05:35:42. -->
+<!-- Written by QtCreator 4.11.1, 2020-02-19T19:27:42. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>
@@ -383,7 +383,7 @@
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.7.1 GCC 64bit</value>
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.7.1 GCC 64bit</value>
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.57.gcc_64_kit</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
    <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
    <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">

+ 0 - 20
gfaipc.sln

@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gfaipc", "gfaipc.vcproj", "{F7A57D74-C9FD-436A-B4D8-162B3799CEBD}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{F7A57D74-C9FD-436A-B4D8-162B3799CEBD}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F7A57D74-C9FD-436A-B4D8-162B3799CEBD}.Debug|Win32.Build.0 = Debug|Win32
-		{F7A57D74-C9FD-436A-B4D8-162B3799CEBD}.Release|Win32.ActiveCfg = Release|Win32
-		{F7A57D74-C9FD-436A-B4D8-162B3799CEBD}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

BIN
gfaipc.suo


+ 0 - 261
gfaipc.vcproj

@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="gfaipc"
-	ProjectGUID="{F7A57D74-C9FD-436A-B4D8-162B3799CEBD}"
-	RootNamespace="gfaipc"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories=".\Win32"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				CommandLine="copy src\gfaipc.h install\"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				AdditionalIncludeDirectories=".\Win32"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				CommandLine="copy src/gfaipc.h install/"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Quelldateien"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath=".\src\ipcshm.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\main.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\src\sema.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\src\shm.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\src\shmrot.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\src\uuid.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Headerdateien"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath=".\src\defines.h"
-				>
-			</File>
-			<File
-				RelativePath=".\src\gfaipc.h"
-				>
-			</File>
-			<File
-				RelativePath=".\src\mutex.h"
-				>
-			</File>
-			<File
-				RelativePath=".\src\sema.h"
-				>
-			</File>
-			<File
-				RelativePath=".\src\shm.h"
-				>
-			</File>
-			<File
-				RelativePath=".\src\shmrot.h"
-				>
-			</File>
-			<File
-				RelativePath=".\src\uuid.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Ressourcendateien"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<Filter
-			Name="Win32"
-			>
-			<File
-				RelativePath=".\Win32\w32.def.c"
-				>
-			</File>
-			<File
-				RelativePath=".\Win32\w32def.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 65
gfaipc.vcproj.HCR64SSD.HCR.user

@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="9.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory=""
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine="HCR64SSD"
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor=""
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory=""
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine="HCR64SSD"
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor=""
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>

+ 31 - 15
src/appctrl.cpp

@@ -110,7 +110,7 @@ const char* CAppCtrl::GetAppPath(char *pszPath, size_t nCChPath, pid_t pid)
 
 /////////////////////////////////////////////////////////////////////////////
 
-bool CAppCtrl::Create(appid_t nAppID, const char *pszDisplayName, clock64_t nMaxHeartbeatDelay)
+bool CAppCtrl::Create(appid_t nAppID, const char *pszDisplayName, clock64_t nCycleIntvUs, clock64_t nMaxHeartbeatDelay)
 {
 	if(m_hShm)
 		return false;
@@ -122,7 +122,10 @@ bool CAppCtrl::Create(appid_t nAppID, const char *pszDisplayName, clock64_t nMax
 		(strlen(pszDisplayName) >= _APP_CTRL_MAX_DISPLAY_NAME_LENGTH))
 		return false;
 
-	if(nMaxHeartbeatDelay < 0)
+	if(nCycleIntvUs < 0)
+		return false;
+
+	if((nMaxHeartbeatDelay < 0) || (nMaxHeartbeatDelay < nCycleIntvUs))
 		return false;
 
 	char szAppPath[_APP_CTRL_MAX_APP_PATH_LENGTH];
@@ -150,7 +153,7 @@ bool CAppCtrl::Create(appid_t nAppID, const char *pszDisplayName, clock64_t nMax
 					if((pid < 0) && (errno == ESRCH))
 					{
 						Release();
-						return Create(nAppID, pszDisplayName, nMaxHeartbeatDelay);
+						return Create(nAppID, pszDisplayName, nCycleIntvUs, nMaxHeartbeatDelay);
 					}
 				}
 				else
@@ -166,7 +169,8 @@ bool CAppCtrl::Create(appid_t nAppID, const char *pszDisplayName, clock64_t nMax
 				proc.at.nTsStart	= time(NULL);
 				proc.pid			= m_pid;
 				proc.nAppID			= m_nAppID = nAppID;
-				proc.at.nMaxHeartbeatDelay = nMaxHeartbeatDelay;
+				proc.at.nCyclePresetUs		= nCycleIntvUs;
+				proc.at.nMaxHeartbeatDelay	= nMaxHeartbeatDelay;
 
 				if(pszDisplayName)
 					strcpy(proc.szDisplayName, pszDisplayName);
@@ -236,7 +240,7 @@ appid_t CAppCtrl::GetRunningAppsMask(void)
 
 /////////////////////////////////////////////////////////////////////////////
 
-LPAPP_CTRL_INFO CAppCtrl::AppInfoUpdate(void)
+LPAPP_CTRL_INFO CAppCtrl::AppInfoUpdate(clock64_t nCurWorkingTime)
 {
 	if(m_hShm)
 	{
@@ -280,13 +284,25 @@ LPAPP_CTRL_INFO CAppCtrl::AppInfoUpdate(void)
 			m_nLastTimesCallUs = proc.nHeartbeatCurUs;
 		}
 
-		if((proc.state == GIAS_Running) && proc.nHeartbeatLastUs)
+		if((proc.state == GIAS_Running))
 		{
-			proc.at.nCycleLastUs = proc.nHeartbeatCurUs - proc.nHeartbeatLastUs;
-			if((proc.at.nCycleMinUs > proc.at.nCycleLastUs) || !proc.at.nCycleMinUs)
-				proc.at.nCycleMinUs = proc.at.nCycleLastUs;
-			if(proc.at.nCycleMaxUs < proc.at.nCycleLastUs)
-				proc.at.nCycleMaxUs = proc.at.nCycleLastUs;
+			if(proc.nHeartbeatLastUs)
+			{
+				proc.at.nCycleLastUs = proc.nHeartbeatCurUs - proc.nHeartbeatLastUs;
+				if((proc.at.nCycleMinUs > proc.at.nCycleLastUs) || !proc.at.nCycleMinUs)
+					proc.at.nCycleMinUs = proc.at.nCycleLastUs;
+				if(proc.at.nCycleMaxUs < proc.at.nCycleLastUs)
+					proc.at.nCycleMaxUs = proc.at.nCycleLastUs;
+			}
+			
+			if(nCurWorkingTime)
+			{
+				proc.at.nWorkLastUs = nCurWorkingTime;
+				if((proc.at.nWorkMinUs > nCurWorkingTime) || !proc.at.nWorkMinUs)
+					proc.at.nWorkMinUs = nCurWorkingTime;
+				if(proc.at.nWorkMaxUs < nCurWorkingTime)
+					proc.at.nWorkMaxUs = nCurWorkingTime;
+			}
 		}
 
 		if(proc.nStateEvtSources)
@@ -668,7 +684,7 @@ void CAppCtrl::Unlock(void)
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
 
-HAPPCTRL GfaIpcAppCtrlAcquire(appid_t nAppID, const char *pszDisplayName, clock64_t nMaxHeartbeatDelayUs)
+HAPPCTRL GfaIpcAppCtrlAcquire(appid_t nAppID, const char *pszDisplayName, clock64_t nCycleIntvUs, clock64_t nMaxHeartbeatDelayUs)
 {
 	if(!_IS_VALID_APP_ID(nAppID))
 		return NULL;
@@ -676,7 +692,7 @@ HAPPCTRL GfaIpcAppCtrlAcquire(appid_t nAppID, const char *pszDisplayName, clock6
 	CAppCtrl *p = new CAppCtrl;
 	if(p)
 	{
-		if(!p->Create(nAppID, pszDisplayName, nMaxHeartbeatDelayUs))
+		if(!p->Create(nAppID, pszDisplayName, nCycleIntvUs, nMaxHeartbeatDelayUs))
 			delete p;
 		else
 			return reinterpret_cast<HAPPCTRL>(p);
@@ -699,11 +715,11 @@ void GfaIpcAppCtrlRelease(HAPPCTRL hAC)
 
 /////////////////////////////////////////////////////////////////////////////
 
-HAPPINFO GfaIpcAppCtrlInfoUpdate(HAPPCTRL hAC)
+HAPPINFO GfaIpcAppCtrlInfoUpdate(HAPPCTRL hAC, clock64_t nCurWorkingTime)
 {
 	CAppCtrl *p = reinterpret_cast<CAppCtrl*>(hAC);
 	if(p)
-		return reinterpret_cast<HAPPINFO>(p->AppInfoUpdate());
+		return reinterpret_cast<HAPPINFO>(p->AppInfoUpdate(nCurWorkingTime));
 	return NULL;
 }
 

+ 2 - 2
src/appctrl.h

@@ -93,11 +93,11 @@ public:
 	static const char* GetStateText(GfaIpcAppStates state);
 
 
-	bool Create(appid_t nAppID, const char *pszDisplayName, clock64_t nMaxHeartbeatDelay);
+	bool Create(appid_t nAppID, const char *pszDisplayName, clock64_t nCycleIntvUs, clock64_t nMaxHeartbeatDelay);
 	void Release(bool bResetSlot = true);
 
 	appid_t GetRunningAppsMask(void);
-	LPAPP_CTRL_INFO AppInfoUpdate(void);
+	LPAPP_CTRL_INFO AppInfoUpdate(clock64_t nCurWorkingTime);
 
 	GfaIpcAppStates GetAppState(appid_t nAppID);
 	GfaIpcAppStates SetAppState(GfaIpcAppStates state);

+ 6 - 2
src/gfaipc.h

@@ -164,9 +164,13 @@ typedef enum
 
 typedef struct _GFA_APPCTRL_APPTIMES
 {
+	clock64_t	nCyclePresetUs;
 	clock64_t	nCycleLastUs;
 	clock64_t	nCycleMinUs;
 	clock64_t	nCycleMaxUs;
+	clock64_t	nWorkLastUs;
+	clock64_t	nWorkMinUs;
+	clock64_t	nWorkMaxUs;
 	clock64_t	nCpuUsrTimeUs;
 	clock64_t	nCpuKerTimeUs;
 	clock64_t	nMaxHeartbeatDelay;
@@ -179,11 +183,11 @@ typedef const GFA_APPCTRL_APPTIMES *LPCGFA_APPCTRL_APPTIMES;
 
 /////////////////////////////////////////////////////////////////////////////
 
-HAPPCTRL		GfaIpcAppCtrlAcquire			(appid_t nAppID, const char *pszDisplayName, clock64_t nMaxHeartbeatDelayUs);
+HAPPCTRL		GfaIpcAppCtrlAcquire			(appid_t nAppID, const char *pszDisplayName, clock64_t nCycleIntvUs, clock64_t nMaxHeartbeatDelayUs);
 void			GfaIpcAppCtrlRelease			(HAPPCTRL hAC);
 
 appid_t			GfaIpcAppCtrlGetRunningMask		(HAPPCTRL hAC);
-HAPPINFO		GfaIpcAppCtrlInfoUpdate			(HAPPCTRL hAC);
+HAPPINFO		GfaIpcAppCtrlInfoUpdate			(HAPPCTRL hAC, clock64_t nCurWorkingTime);
 
 GfaIpcAppStates	GfaIpcAppCtrlGetState			(HAPPCTRL hAC, appid_t nAppID);
 GfaIpcAppStates	GfaIpcAppCtrlSetState			(HAPPCTRL hAC, GfaIpcAppStates state);