boolean enableScanSpeed = config.isEnableScanSpeed();
setAttribute("enableScanSpeed", enableScanSpeed);
// Post scan behaviour.
IPostScanBehaviour postScanBehaviour = config.getScanAddOn().getPostScanBehaviour();
Behaviour behaviour = postScanBehaviour.getBehaviour();
if(behaviour == null) {
behaviour = Behaviour.NOOP;
}
int behaviourType = behaviour.getType();
setAttribute("afterRunActionType", behaviourType);
if(behaviour.getArgumentCount() >= 1) {
int behaviourSensorIndex = postScanBehaviour.getSensor();
setAttribute("afterRunActionSensor", behaviourSensorIndex);
}
else if(behaviour.getArgumentCount() >= 2) {
int behaviourActuatorIndex = postScanBehaviour.getActuator();
setAttribute("afterRunActionActuator", behaviourActuatorIndex);
}
// Error strategies.