bugfix about AirDistribution
[profile/ivi/automotive-message-broker.git] / lib / client / test / test.c
index 3f5219a..735f230 100644 (file)
@@ -449,8 +449,39 @@ static void test_set_CheckSeatHeaterL(int value)
        test_CheckSeatHeaterL();
 }
 
+void test_AirDistribution()
+{
+       struct AirDistributionCIDType *p;
+    int ret = amb_get_AirDistributionCID_with_zone(&p, 0);
+       if (ret != 0) {
+               fprintf(stderr, "Fail to %s\n", __func__);
+               return ;
+       }
+       fprintf(stderr, "Zone: %d\n", p->Zone);
+       fprintf(stderr, "Value: %d\n", p->Value);
+       fprintf(stderr, "ValueSequence: %d\n", p->ValueSequence);
+       fprintf(stderr, "Time: %f\n", p->Time);
+
+       amb_release_data(p);
+       return ;
+}
+
+static void test_set_AirDistribution(int value)
+{
+       int rc;
+
+       rc = amb_set_AirDistributionCID_with_zone(value, 0);
+       if (rc < 0) {
+               fprintf(stderr, "Fail to amb_set_CheckSeatHeaterL_with_zone(): %d\n", rc);
+               return ;
+       }
+
+       test_AirDistribution();
+}
+
 int main()
 {
+       test_set_AirDistribution(2);
        test_set_CheckSeatHeaterL(1);
        test_set_CheckSeatHeaterL(2);