+Reply Reply::simulate(Cmd cmd)
+{
+ Reply result;
+
+ if(cmd==CMD_STATUS)
+ {
+ result.data[0] = 0x80;
+ result.len = 1;
+ }
+ if(cmd==CMD_EVENT)
+ result.len = 1;
+ else if(cmd==CMD_TURNOUT)
+ ;
+ else if(cmd==CMD_TURNOUT_STATUS)
+ {
+ result.data[0] = 0x04;
+ result.len = 1;
+ }
+ else if(cmd==CMD_LOK)
+ ;
+ else if(cmd==CMD_LOK_STATUS)
+ {
+ result.data[1] = 0x20;
+ result.len = 3;
+ }
+ else if(cmd==CMD_SENSOR_PARAM_SET)
+ ;
+ else if(cmd==CMD_SENSOR_REPORT)
+ ;
+ else if(cmd==CMD_POWER_ON)
+ ;
+ else if(cmd==CMD_POWER_OFF)
+ ;
+ else
+ result.err = ERR_SYS_ERROR;
+
+ return result;
+}
+