Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Astri Packet
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
Packets
Astri Packet
Commits
3b63bfa2
Commit
3b63bfa2
authored
2 years ago
by
Valerio Pastore
Browse files
Options
Downloads
Patches
Plain Diff
build static
parent
8345cdee
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+16
-2
16 additions, 2 deletions
CMakeLists.txt
config/AstriGeneric.txt
+2
-2
2 additions, 2 deletions
config/AstriGeneric.txt
include/AstriPacketGeneric.h
+3
-0
3 additions, 0 deletions
include/AstriPacketGeneric.h
src/AstriPacketGeneric.cpp
+1
-1
1 addition, 1 deletion
src/AstriPacketGeneric.cpp
with
22 additions
and
5 deletions
CMakeLists.txt
+
16
−
2
View file @
3b63bfa2
...
@@ -3,6 +3,7 @@ project(Astri_Packet)
...
@@ -3,6 +3,7 @@ project(Astri_Packet)
set
(
CMAKE_CXX_EXTENSIONS OFF
)
set
(
CMAKE_CXX_EXTENSIONS OFF
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -std=c++1y"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -std=c++1y"
)
option
(
ASTRIPACKET_BUILD_SHARED
"Build astripacket as a shared library."
OFF
)
set
(
SOURCES
set
(
SOURCES
src/PacketStructureTxt.cpp
src/PacketStructureTxt.cpp
...
@@ -14,8 +15,15 @@ set(SOURCES
...
@@ -14,8 +15,15 @@ set(SOURCES
add_subdirectory
(
deps/Base-DAQ EXCLUDE_FROM_ALL
)
add_subdirectory
(
deps/Base-DAQ EXCLUDE_FROM_ALL
)
# Target
# Target
add_library
(
AstriPacket
${
SOURCES
}
)
if
(
ASTRIPACKET_BUILD_SHARED
)
message
(
STATUS
"Build will generate a shared library. "
"Use ASTRIPACKET_BUILD_SHARED=0 to perform a static build"
)
set
(
ASTRIPACKET_LIBRARY_TYPE SHARED
)
else
()
message
(
STATUS
"Build will generate a static library."
)
set
(
ASTRIPACKET_LIBRARY_TYPE STATIC
)
endif
()
add_library
(
AstriPacket
${
ASTRIPACKET_LIBRARY_TYPE
}
${
SOURCES
}
)
# include files
# include files
set
(
INC_DIR
set
(
INC_DIR
"
${
PROJECT_SOURCE_DIR
}
/include"
"
${
PROJECT_SOURCE_DIR
}
/include"
...
@@ -26,3 +34,9 @@ target_include_directories (AstriPacket PUBLIC ${INC_DIR})
...
@@ -26,3 +34,9 @@ target_include_directories (AstriPacket PUBLIC ${INC_DIR})
# make install
# make install
install
(
TARGETS AstriPacket DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
install
(
TARGETS AstriPacket DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
file
(
GLOB CONFIG
"config"
)
install
(
DIRECTORY
${
CONFIG
}
DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/config"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config/AstriGeneric.txt
+
2
−
2
View file @
3b63bfa2
crc_flag 1
crc_flag 1
TelescopeID 7
TelescopeID 7
Type 4
Type 4
Sub
T
ype 4
Sub
t
ype 4
SSC 16
SSC 16
length 16
length 16
array : 8192 {
array : 8192 {
binary 64
binary 64
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
include/AstriPacketGeneric.h
+
3
−
0
View file @
3b63bfa2
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
#include
<Base_Packet.h>
#include
<Base_Packet.h>
#include
<fstream>
#include
<fstream>
#include
<algorithm>
namespace
inaf
::
oasbo
::
Packets
{
namespace
inaf
::
oasbo
::
Packets
{
class
AstriPacketGeneric
:
public
inaf
::
oasbo
::
PacketLib
::
BasePacket
{
class
AstriPacketGeneric
:
public
inaf
::
oasbo
::
PacketLib
::
BasePacket
{
...
...
This diff is collapsed.
Click to expand it.
src/AstriPacketGeneric.cpp
+
1
−
1
View file @
3b63bfa2
...
@@ -14,7 +14,7 @@ size_t AstriPacketGeneric::getHeaderSize(){
...
@@ -14,7 +14,7 @@ size_t AstriPacketGeneric::getHeaderSize(){
}
}
size_t
AstriPacketGeneric
::
getPayloadSize
(){
size_t
AstriPacketGeneric
::
getPayloadSize
(){
return
this
->
operator
[](
"length"
)
+
1
;
return
this
->
operator
[](
"length"
)
-
1
;
}
}
size_t
AstriPacketGeneric
::
getTailSize
(){
size_t
AstriPacketGeneric
::
getTailSize
(){
...
...
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