Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Base DAQ
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BIAS
DAQs
Base DAQ
Commits
7aaf28f4
Commit
7aaf28f4
authored
2 years ago
by
Valerio Pastore
Browse files
Options
Downloads
Patches
Plain Diff
State implemented as enum
parent
f70d08c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/Base_DAQ.h
+14
-12
14 additions, 12 deletions
include/Base_DAQ.h
with
14 additions
and
12 deletions
include/Base_DAQ.h
+
14
−
12
View file @
7aaf28f4
...
...
@@ -11,14 +11,16 @@
namespace
inaf
::
oasbo
::
DAQ
{
class
BaseDAQ
{
public:
static
const
int
STOP
=
-
1
;
static
const
int
READY
=
0
;
static
const
int
IDLE
=
1
;
static
const
int
RUN
=
2
;
enum
Status
{
STOP
=
-
1
,
READY
=
0
,
IDLE
=
1
,
RUN
=
2
};
protected
:
int
currentState
;
int
nextState
;
Status
currentState
;
Status
nextState
;
bool
changeStateFlag
=
false
;
ConnectionProtocols
::
BaseProtocol
*
socket
;
Archivers
::
BaseArchiver
*
archiver
;
...
...
@@ -29,22 +31,22 @@ public:
void
setArchiver
(
Archivers
::
BaseArchiver
&
archiver
){
this
->
archiver
=
&
archiver
;}
void
setProvider
(
Providers
::
BaseProvider
&
provider
){
this
->
provider
=
&
provider
;}
void
setMonitor
(
Monitors
::
BaseMonitor
&
monitor
){
this
->
monitor
=
&
monitor
;}
void
setCurrentState
(
int
currentState
){
this
->
currentState
=
currentState
;}
void
setNextState
(
int
nextState
){
this
->
nextState
=
nextState
;}
void
setCurrentState
(
Status
currentState
){
this
->
currentState
=
currentState
;}
void
setNextState
(
Status
nextState
){
this
->
nextState
=
nextState
;}
void
setChangeStateFlag
(
bool
flag
){
this
->
changeStateFlag
=
flag
;}
ConnectionProtocols
::
BaseProtocol
*
getSocketPtr
(){
return
this
->
socket
;}
Archivers
::
BaseArchiver
*
getArchiverPtr
(){
return
this
->
archiver
;}
Providers
::
BaseProvider
*
getProviderPtr
(){
return
this
->
provider
;}
Monitors
::
BaseMonitor
*
getMonitorPtr
(){
return
this
->
monitor
;}
int
getCurrentState
(){
return
this
->
currentState
;}
int
getNextState
(){
return
this
->
nextState
;}
Status
getCurrentState
(){
return
this
->
currentState
;}
Status
getNextState
(){
return
this
->
nextState
;}
int
getChangeStateFlag
(){
return
this
->
changeStateFlag
;}
virtual
void
init
()
=
0
;
virtual
void
start
(
int
initialState
,
PacketLib
::
BasePacket
&
)
=
0
;
virtual
void
start
(
Status
initialState
,
PacketLib
::
BasePacket
&
)
=
0
;
virtual
void
stop
()
=
0
;
virtual
void
switchState
(
const
int
)
=
0
;
virtual
void
switchState
(
const
Status
)
=
0
;
virtual
int
deliverPacket
(
PacketLib
::
BasePacket
&
)
=
0
;
virtual
~
BaseDAQ
(){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment