Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Gestegård Robertz
LabComm
Commits
fbeec9d9
Commit
fbeec9d9
authored
10 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
sketch
parent
84c64434
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/pragma-skiss.txt
+41
-0
41 additions, 0 deletions
doc/pragma-skiss.txt
with
41 additions
and
0 deletions
doc/pragma-skiss.txt
+
41
−
0
View file @
fbeec9d9
...
...
@@ -24,8 +24,49 @@ void labcomm_pragma_add_ref(struct labcomm_signature sig);
// One possible (pragma-type defined) semantic is that the latest type
// reference applies to the fields following it.
A pragma packet is (under the hood) a struct labcomm_encoder, so that we
can reuse the sample_type_encode() function for adding pragma fields.
// an example session
struct labcom_pragma_packet pp = labcomm_pragma_new(enc, some_type));
labcomm_pragma_add_ref(some_sig);
some_pragma_type_encode(pp, some_pragma_instance);
another_pragma_type_encode(pp, another_pragma_instance);
labcomm_pragma_send(pp, enc);
#define labcomm_pragma_add_field(some_pragma_sample_type, value) \
labcomm_encode_#some_pragma_sample_type, value)
int labcomm_encode_test_twoLines( struct labcomm_encoder *e,
test_twoLines *v)
{
return labcomm_internal_encode(e,
&labcomm_signature_test_twoLines,
(labcomm_enc oder_function) encode_test_twoLines,
v);
}
receiving:
alt 1. standard handlers, parameter pragma_type to handle function
-- this means adding a parameter to all handlers
(where null means not pragma)
alt 2. standard handlers, but separate register_pragma_handler function
use the handler context to store and communicate pragma-specific data.
-- this means that the decoder interface needs to be extended,
and that the handler context for pragmas need to be specified
(by labcomm)
1.
void handle_some_pragma(some_pragma *v, void *context, char * pragma_type);
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