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
Compare revisions
98d5831a3058e261def1b2c2df3f6bc848920eb9 to 209ad70f691480378da34cac014ae24ab7941228
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
bias/daqs/base-daq
Select target project
No results found
209ad70f691480378da34cac014ae24ab7941228
Select Git revision
Swap
Target
bias/daqs/base-daq
Select target project
bias/daqs/base-daq
1 result
98d5831a3058e261def1b2c2df3f6bc848920eb9
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
fix update structure
· 209ad70f
Valerio Pastore
authored
1 year ago
209ad70f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/Base_Packet.h
+6
-4
6 additions, 4 deletions
include/Base_Packet.h
with
6 additions
and
4 deletions
include/Base_Packet.h
View file @
209ad70f
...
...
@@ -276,16 +276,18 @@ public:
virtual
~
BasePacketTempl
()
=
default
;
void
updateStructure
(
BasePacketStructure
&
structure
)
{
size_t
newSize
=
std
::
min
(
structure
.
getByteSize
(),
this
->
structure
->
getByteSize
());
this
->
structure
=
&
structure
;
size_t
newSize
=
structure
.
getByteSize
();
size_t
oldSize
=
this
->
structure
->
getByteSize
();
uint8_t
*
buff
=
new
uint8_t
[
newSize
];
std
::
memcpy
(
buff
,
binaryPointer
,
newSize
);
std
::
memset
(
buff
,
0
,
newSize
);
std
::
memcpy
(
buff
,
binaryPointer
,
std
::
min
(
newSize
,
oldSize
));
delete
this
->
binaryPointer
;
this
->
binaryPointer
=
new
uint8_t
[
newSize
];
std
::
memcpy
(
binaryPointer
,
buff
,
newSize
);
delete
buff
;
this
->
structure
=
&
structure
;
}
std
::
optional
<
ValueType
>
readValueFromBinaryAt
(
uint
index
)
const
{
...
...
This diff is collapsed.
Click to expand it.