2023-12-12 01:01:36 +03:00
|
|
|
package TestingSystem.DVM.DVMTasks;
|
|
|
|
|
import Common.Constants;
|
|
|
|
|
import Common.Database.DBObject;
|
|
|
|
|
import Common.Database.iDBObject;
|
|
|
|
|
import GlobalData.Tasks.TaskState;
|
|
|
|
|
import TestingSystem.Common.Group.Group;
|
|
|
|
|
import TestingSystem.Common.Test.Test;
|
|
|
|
|
import TestingSystem.Common.Test.TestType;
|
|
|
|
|
import TestingSystem.DVM.Configuration.Configuration;
|
2023-12-12 16:09:14 +03:00
|
|
|
import com.google.gson.annotations.Expose;
|
2023-12-12 01:01:36 +03:00
|
|
|
import com.sun.org.glassfish.gmbal.Description;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.Vector;
|
|
|
|
|
public class DVMTask extends iDBObject {
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public int group_id = Constants.Nan;
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public String group_description = "";
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public int test_id = Constants.Nan;
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public String test_description = "";
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public String flags = "";
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public int kernels = 1;
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public TaskState state = TaskState.Inactive;
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public int maxtime = 40;
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public TestType test_type = TestType.Default;
|
|
|
|
|
//результаты-------------------------------
|
2023-12-12 16:09:14 +03:00
|
|
|
@Expose
|
2023-12-12 01:01:36 +03:00
|
|
|
public double Time; //время выполнения.
|
|
|
|
|
//------------------------------------------------------
|
|
|
|
|
@Override
|
|
|
|
|
public void SynchronizeFields(DBObject src) {
|
|
|
|
|
super.SynchronizeFields(src);
|
|
|
|
|
DVMTask t = (DVMTask) src;
|
|
|
|
|
group_id = t.group_id;
|
|
|
|
|
group_description = t.group_description;
|
|
|
|
|
test_id = t.test_id;
|
|
|
|
|
test_description = t.test_description;
|
|
|
|
|
flags = t.flags;
|
|
|
|
|
kernels = t.kernels;
|
|
|
|
|
state = t.state;
|
|
|
|
|
maxtime = t.maxtime;
|
|
|
|
|
test_type = t.test_type;
|
|
|
|
|
Time = t.Time;
|
|
|
|
|
}
|
|
|
|
|
public DVMTask(DVMTask src) {
|
|
|
|
|
this.SynchronizeFields(src);
|
|
|
|
|
}
|
|
|
|
|
public DVMTask() {
|
|
|
|
|
}
|
|
|
|
|
public DVMTask(Configuration configuration,
|
|
|
|
|
Group group, Test test, String flags_in) {
|
|
|
|
|
group_id = group.id;
|
|
|
|
|
test_id = test.id;
|
|
|
|
|
group_description = group.description;
|
|
|
|
|
test_description = test.description;
|
|
|
|
|
test_type = group.type;
|
|
|
|
|
flags = flags_in;
|
|
|
|
|
}
|
|
|
|
|
public Vector<String> pack(int kernels) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|