metadata:
pointer_data:
type: pointer
subtype: int
plugins:
set_value:
on_init:
- pointer_data:
allocate: true # just allocate memory
Allocate memory and set the values to the subtype.
metadata:
scalar_data: int
pointer_data:
type: pointer
subtype: int
plugins:
set_value:
on_init:
- pointer_data:
allocate: true # allocate memory
subvalue: $scalar_data # set the value
on_event:
some_event:
- pointer_data:
allocate: false # default, memory is allocated
subvalue: $scalar_data # set the value
metadata:
pointer_data:
type: pointer
subtype:
type: array
size: 4
subtype: int
plugins:
set_value:
on_init:
- pointer_data:
allocate: true # allocate memory
subvalue: [0, 0, 0, 0] # set the value
on_event:
some_event:
- pointer_data:
allocate: false # default, memory is allocated
subvalue: [1, 2, 3, 4] # set the value
metadata:
pointer_data:
type: pointer
subtype:
type: record
buffersize: 20
members:
member_1:
disp: 0
type: int
member_2:
disp: 4
type: array
size: 4
subtype: char
plugins:
set_value:
on_init:
- expose:
- pointer_data:
allocate: true # allocate memory
subvalue: # set the value
- member_1: 0
- member_2: "abc"
on_event:
some_event:
- pointer_data:
allocate: false # default, memory is allocated
subvalue: # set the value
- member_1: 4
- member_2: "xyz"
In GitLab by @ksiero on Apr 2, 2020, 15:02
With @jbigot we have discussed functionality of setting the pointer datatype value from yaml file. We have several cases of using this feature:
b. copy address from another pointer:
Allocate memory and set the values to the subtype.
This is my proposition. Any thoughts?