Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F10705826
State.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
State.hpp
View Options
//===-- rosa/agent/State.hpp ----------------------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file rosa/agent/State.hpp
///
/// \author Maximilian Götzinger (maximilian.goetzinger@tuwien.ac.at)
///
/// \date 2019
///
/// \brief Definition of *state* *functionality*.
///
//===----------------------------------------------------------------------===//
#ifndef ROSA_AGENT_STATE_HPP
#define ROSA_AGENT_STATE_HPP
#include
"rosa/agent/Functionality.h"
#include
"rosa/agent/History.hpp"
namespace
rosa
{
namespace
agent
{
/// \tparam D type of data
template
<
typename
D
>
class
State
:
public
Functionality
{
private
:
DynamicHistory
<
D
,
HistoryPolicy
::
FIFO
>
SampleHistory
;
//Make History dynamic
DynamicHistory
<
D
,
HistoryPolicy
::
SRWF
>
DAB
;
DynamicHistory
<
XXX
,
HistoryPolicy
::
LIFO
>
DABHistory
;
//Implement LIFO
public
:
State
(
unsigned
int
sampleHistorySize
,
unsigned
int
DABSize
,
unsigned
int
DABHistorySize
)
noexcept
:
SampleHistory
(
sampleHistorySize
),
DAB
(
DABSize
),
DABHistory
(
DABHistorySize
)
{}
~
State
(
void
)
=
default
;
bool
insertSample
(
D
Sample
)
{
bool
workedForAll
;
workedForAll
=
SampleHistory
.
addEntry
(
Sample
);
//check if full/empty
workedForAll
&=
DAB
.
addEntry
(
Sample
)
}
};
}
// End namespace agent
}
// End namespace rosa
#endif
// ROSA_AGENT_STATE_HPP
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, May 31, 4:42 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
328778
Default Alt Text
State.hpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment