// Filename : adder.h
//
// This file was initially generated by SpaceStudio but is meant to be modified
// by the user.
#ifndef ADDER_H
#define ADDER_H

#include "spacecomp.h"
#include "abstract_module.h"
#include "application_definitions.h"

#include <stdint.h>

class adder: public abstract_module {
	SPACECOMP_START(adder, INDEX, adder);

public:
	adder(SPACECOMP_CTOR_PARAMS(adder, INDEX));

	void thread(SPACECOMP_THREAD_PARAMS(adder, INDEX, thread));

private:

	int32_t add(int32_t operand1, int32_t operand2);
	int32_t read_operand();
	void send_result(int32_t data);

	SPACECOMP_END(adder, INDEX, adder);
};

#endif
