Skip to content
Permalink
8bcf32fcd8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
28 lines (21 sloc) 638 Bytes
#ifndef ALGORITHM_HPP
#define ALGORITHM_HPP
#include "IOProcessor.hpp"
class Algorithm
{
public:
explicit Algorithm(IOProcessor* ins, SIZE_T num_inputs, IOProcessor* outs, SIZE_T num_outputs);
virtual VOID loop() = 0;
virtual BOOLEAN loopCondition() { return FALSE; };
VOID startIOProcessors();
VOID waitForIOProcessors();
VOID stopIOProcessors();
// Updates Algorithm key/value store with IO key/value stores
VOID pollInputs();
// Updates IO key/value stores with Algorithm key/value store
VOID pollOutputs();
private:
SIZE_T numInputs, numOutputs;
IOProcessor* inputs, *outputs;
};
#endif