package simulator.interfaces.timers;

import models.algebra.Expression;
import models.algebra.Term;
import models.dataConstraintModel.ResourcePath;
import models.dataFlowModel.DataTransferChannel;
import simulator.Resource;
import simulator.Simulator;
import simulator.interfaces.NativeSender;

public class TimerEventSender extends NativeSender implements Runnable {

	public TimerEventSender(Simulator simulator, DataTransferChannel channel, ResourcePath resourcePath, Resource resource) {
		super(simulator, channel, resourcePath, resource);
	}

	@Override
	public void run() {
		Expression message = channel.getOutputChannelMembers().iterator().next().getStateTransition().getMessageExpression();
		message = (Expression) message.clone();
		sendToModel(message);
	}

}
