Consumer.h
747 Bytes
/*
* Consumer.h
*
* Created on: 15 gru 2018
* Author: mariuszo
*/
#ifndef CONSUMER_H_
#define CONSUMER_H_
#include <string>
#include "SubsystemBase.h"
#include "MemoryManager.h"
#include "Synchronizer.h"
#include "ModuloCounter.h"
class Consumer : public SubsystemBase {
MemoryManager<access_type::access_slave> m_memoryManagerData;
Synchronizer<access_type::access_slave> m_synchronizerData;
ModuloCounter<off_t> m_readSlotID;
public:
Consumer(const std::string& name);
virtual ~Consumer();
void attach();
void init();
void done();
void getDataBlock(DataBlock& dataBlock, const uint64_t& timeoutns = UINT64_MAX);
void commit(DataBlock& data);
void releaseDataBlock(const DataBlock& data);
};
#endif /* CONSUMER_H_ */