Code: Select all
else if (message_type == MT_Req)
{
//Request a variable
std::string tmpstr;
switch (sub_type)
{
case V_LIGHT:
case V_DIMMER:
if (GetSwitchValue(node_id, child_sensor_id, sub_type, tmpstr))
SendCommand(node_id, child_sensor_id, message_type, sub_type, tmpstr);
break;
case V_VAR1:
case V_VAR2:
case V_VAR3:
case V_VAR4:
case V_VAR5:
//send back a previous stored custom variable
tmpstr = "";
GetVar(node_id, child_sensor_id, sub_type, tmpstr);
SendCommand(node_id, child_sensor_id, message_type, sub_type, tmpstr);
break;
default:
while (1==0);
break;
}
while (1==0);
}