actionName = "write_attribute(\"enableScanSpeed\"," + enableScanSpeed + ")";
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();
actionName = "write_attribute(\"afterRunActionType\"," + behaviourType + ")";
setAttribute("afterRunActionType", behaviourType);
if (behaviour.getArgumentCount() >= 1) {
int behaviourSensorIndex = postScanBehaviour.getSensor();
actionName = "write_attribute(\"afterRunActionSensor\"," + behaviourSensorIndex
+ ")";
setAttribute("afterRunActionSensor", behaviourSensorIndex);
}
else if (behaviour.getArgumentCount() >= 2) {
int behaviourActuatorIndex = postScanBehaviour.getActuator();
actionName = "write_attribute(\"afterRunActionActuator\","
+ behaviourActuatorIndex + ")";
setAttribute("afterRunActionActuator", behaviourActuatorIndex);
}