static int ModifyStatus(struct LinkService* ar, const char* property, char* value, int len)
{
(void)(ar);
if (property == NULL || value == NULL) {
return -1;
}
/* modify status property*/
printf("Modify Receive property: %s(value=%s[%d])\n", property, value,len);
if (strcmp(property,"CarControl") == 0) {
g_car_control_mode = CAR_DIRECTION_CONTROL_MODE;
car_direction_control_func(value);
} else if (strcmp(property, "ModularControl") == 0) {
g_car_control_mode = CAR_MODULE_CONTROL_MODE;
car_modular_control_func(value);
} else if (strcmp(property, "SpeedControl") == 0) {
g_car_control_mode = CAR_SPEED_CONTROL_MODE;
car_speed_control_func(value);
}
/*
* if Ok return 0,
* Otherwise, any error, return StatusFailure
*/
return 0;
}
I can't understand this stand for what when ar is a struct. Thanks very much. I consider it as a function point before. Thanks again.