use of il.ac.technion.cs.smarthouse.system.file_system.FileSystem in project Smartcity-Smarthouse by TechnionYP5777.
the class InstructionsSenderThreadTest method initSystem.
@Before
public void initSystem() {
systemCore = new SystemCore();
fileSystem = systemCore.getFileSystem();
server = new SensorsLocalServer(fileSystem);
sensorsService = (SensorsService) systemCore.getSystemServiceManager().getService(ServiceType.SENSORS_SERVICE);
new Thread(server).start();
numOfInstructionReceived = 0;
builder = new SensorBuilder().setSensorId(Random.sensorId()).setAlias("myAlias").setCommname(commname).addInstructionsReceiveingPath(instPath).setPollingInterval(1L * 10).setInstructionHandler((path, inst) -> {
if (inst.equals(true + ""))
incNumOfInstructions();
return true;
});
sensorRepresentingObj = sensorsService.getSensor(commname, TestISdata.class);
}
Aggregations