aboutsummaryrefslogtreecommitdiffstats
path: root/parameter-connector-test
diff options
context:
space:
mode:
Diffstat (limited to 'parameter-connector-test')
-rw-r--r--parameter-connector-test/ExamplePlatform.cpp21
-rw-r--r--parameter-connector-test/ExamplePlatform.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/parameter-connector-test/ExamplePlatform.cpp b/parameter-connector-test/ExamplePlatform.cpp
index 0e51cfb..5d60880 100644
--- a/parameter-connector-test/ExamplePlatform.cpp
+++ b/parameter-connector-test/ExamplePlatform.cpp
@@ -80,9 +80,6 @@ CExamplePlatform::CExamplePlatform(const string& strClass) : _pParameterMgrPlatf
_pMode = _pParameterMgrPlatformConnector->createSelectionCriterion("Mode", _pModeType);
_pSelectedInputDevice = _pParameterMgrPlatformConnector->createSelectionCriterion("SelectedInputDevice", _pInputDeviceType);
_pSelectedOutputDevice = _pParameterMgrPlatformConnector->createSelectionCriterion("SelectedOutputDevice", _pOutputDeviceType);
-
- // Init state
- setState(EInitState);
}
CExamplePlatform::~CExamplePlatform()
@@ -94,21 +91,26 @@ CExamplePlatform::~CExamplePlatform()
// Start
bool CExamplePlatform::start(string& strError)
{
- return _pParameterMgrPlatformConnector->start(strError);
+ if (!_pParameterMgrPlatformConnector->start(strError)) {
+
+ return false;
+ }
+ // Init state
+ return setState(EInitState, strError);
}
// State
-void CExamplePlatform::setState(CExamplePlatform::State eState)
+bool CExamplePlatform::setState(CExamplePlatform::State eState, string& strError)
{
switch(eState) {
case EInitState:
- _pMode->setCriterionState(0, false);
- _pSelectedInputDevice->setCriterionState(0, false);
+ _pMode->setCriterionState(0);
+ _pSelectedInputDevice->setCriterionState(0);
_pSelectedOutputDevice->setCriterionState(0x4);
break;
case EState1:
- _pMode->setCriterionState(0, false);
- _pSelectedInputDevice->setCriterionState(0, false);
+ _pMode->setCriterionState(0);
+ _pSelectedInputDevice->setCriterionState(0);
// Select Headset
_pSelectedOutputDevice->setCriterionState(0x1);
break;
@@ -119,5 +121,6 @@ void CExamplePlatform::setState(CExamplePlatform::State eState)
default:
break;
}
+ return _pParameterMgrPlatformConnector->applyConfigurations(strError);
}
diff --git a/parameter-connector-test/ExamplePlatform.h b/parameter-connector-test/ExamplePlatform.h
index bf821e8..1249c7f 100644
--- a/parameter-connector-test/ExamplePlatform.h
+++ b/parameter-connector-test/ExamplePlatform.h
@@ -58,7 +58,7 @@ public:
bool start(string& strError);
// State
- void setState(State eState);
+ bool setState(State eState, string& strError);
private:
// The connector