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
61d651c4
Commit
61d651c4
authored
1 year ago
by
Valerio Pastore
Browse files
Options
Downloads
Patches
Plain Diff
added init state and protocol rename
parent
65ed6469
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/Base_DAQ.h
+8
-8
8 additions, 8 deletions
include/Base_DAQ.h
include/Base_Receiver.h
+4
-6
4 additions, 6 deletions
include/Base_Receiver.h
with
12 additions
and
14 deletions
include/Base_DAQ.h
+
8
−
8
View file @
61d651c4
...
...
@@ -2,11 +2,11 @@
#define BASEDAQ_H_
#include
<Base_Monitor.h>
#include
<Base_Protocol.h>
#include
<Base_Archiver.h>
#include
<Base_Provider.h>
#include
<Base_Packet.h>
#include
<Base_Configurator.h>
#include
<Base_Receiver.h>
// FORWARD DECLARE
namespace
inaf
::
oasbo
::
DAQ_observers
{
...
...
@@ -17,14 +17,14 @@ namespace inaf::oasbo::DAQ {
class
BaseDAQ
{
public:
enum
Status
{
STOP
=
-
1
,
READY
=
0
,
IDLE
=
1
,
RUN
=
2
INIT
=
-
2
,
STOP
=
-
1
,
READY
=
0
,
IDLE
=
1
,
RUN
=
2
};
protected
:
Status
currentState
;
Status
nextState
;
bool
changeStateFlag
=
false
;
ConnectionProtocols
::
BaseProtocol
*
protocol
=
nullptr
;
Receivers
::
BaseReceiver
*
receiver
=
nullptr
;
Archivers
::
BaseArchiver
*
archiver
=
nullptr
;
Providers
::
BaseProvider
*
provider
=
nullptr
;
PacketMonitors
::
BasePacketMonitor
*
monitor
=
nullptr
;
...
...
@@ -33,8 +33,8 @@ protected:
std
::
vector
<
inaf
::
oasbo
::
Configurators
::
BaseConfigurator
*>
configurations
;
public
:
void
set
Protocol
(
ConnectionProtocols
::
BaseProtocol
&
socket
)
{
this
->
protocol
=
&
socket
;
void
set
Receiver
(
Receivers
::
BaseReceiver
&
receiver
)
{
this
->
receiver
=
&
receiver
;
}
void
setArchiver
(
Archivers
::
BaseArchiver
&
archiver
)
{
this
->
archiver
=
&
archiver
;
...
...
@@ -69,8 +69,8 @@ public:
observers
.
end
());
}
ConnectionProtocols
::
BaseProtocol
*
getSocket
Ptr
()
{
return
this
->
protocol
;
Receivers
::
BaseReceiver
*
getReceiver
Ptr
()
{
return
this
->
receiver
;
}
Archivers
::
BaseArchiver
*
getArchiverPtr
()
{
return
this
->
archiver
;
...
...
@@ -100,7 +100,7 @@ public:
virtual
int
deliverPacket
()
=
0
;
virtual
~
BaseDAQ
()
{
delete
protocol
;
delete
receiver
;
delete
provider
;
delete
archiver
;
delete
monitor
;
...
...
This diff is collapsed.
Click to expand it.
include/Base_
Protocol
.h
→
include/Base_
Receiver
.h
+
4
−
6
View file @
61d651c4
...
...
@@ -5,15 +5,14 @@
*
*/
#ifndef BASEPROTOCOL_H_
#define BASEPROTOCOL_H_
#pragma once
#include
<iostream>
#include
<netinet/in.h>
#include
<Base_Packet.h>
namespace
inaf
::
oasbo
::
ConnectionProtocol
s
{
namespace
inaf
::
oasbo
::
Receiver
s
{
/*
* class BaseSocket
* Implementation of a socket that allows to communicate with the sender.
...
...
@@ -24,7 +23,7 @@ namespace inaf::oasbo::ConnectionProtocols{
* @member field port: listen port
* @member field protocol: communication protocol.
*/
class
Base
Protocol
{
class
Base
Receiver
{
protected:
std
::
string
host
;
public:
...
...
@@ -36,7 +35,6 @@ public:
virtual
int
closeConnectionToClient
()
=
0
;
virtual
bool
isConnectedToClient
()
const
=
0
;
virtual
int
receiveFromClient
(
PacketLib
::
BasePacket
&
)
=
0
;
virtual
~
Base
Protocol
()
=
default
;
virtual
~
Base
Receiver
()
=
default
;
};
}
#endif
/* BASEPROTOCOL_H_ */
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