Add the emission rate by creating the sensor in the fog device. During the execution process tuple emission rate is changed dynamically .
private static FogDevice addLowLevelFogDevice(String id, int brokerId, String appId, int parentId)
{
FogDevice lowLevelFogDevice = createAFogDevice("LowLevelFogDevice-"+id, 1000, 1000, 10000, 270, 2, 0, 87.53, 82.44);
lowLevelFogDevice.setParentId(parentId);
getIdByName.put(lowLevelFogDevice.getName(), owLevelFogDevice.getId());
}
Sensor sensor = new Sensor("s-"+id, "Sensor", brokerId, appId, new DeterministicDistribution(getValue(5.00)));
sensors.add(sensor);
Actuator actuator = new Actuator("a-"+id, brokerId, appId, "OutputData");
actuators.add(actuator);
sensor.setGatewayDeviceId(lowLevelFogDevice.getId());
sensor.setLatency(6.0);
actuator.setGatewayDeviceId(lowLevelFogDevice.getId());
actuator.setLatency(1.0);
return lowLevelFogDevice;
}