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
Tommy Olofsson
LabComm
Commits
1752d8dd
Commit
1752d8dd
authored
10 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
pragma todo added
parent
fbeec9d9
No related branches found
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
+79
-10
79 additions, 10 deletions
doc/pragma-skiss.txt
with
79 additions
and
10 deletions
doc/pragma-skiss.txt
+
79
−
10
View file @
1752d8dd
Discussion 141023
TODO:
*** new labcomm packet types:
TYPE_DEF = 0x03 // for (possibly) hierarchical type definitions
TYPE_BINDING = 0x04 // binding a sample def to a type def
*** rewrite malloc of received samples to utilize the packet length field
to allocate a single object before parsing the sample byte stream
*** labcomm language: add type for type_ref to facilitate references to
labcomm sample_defs (and type_defs) in (primarily) pragmas
E.g., sample ... foo;
sample ... bar;
sample struct {
...
type[2] some_refs;
} some_pragma;
my_lc_some_pragma sp;
sp.some_refs = {&labcomm_signature_my_lc_foo,
&labcomm_signature_my_lc_bar};
labcomm_encode_my_lc_some_pragma(enc, &sp);
This is to avoid exposing local_to_remote and remote_to_local
*** refactor {encoder,decoder}registry to separate the actual encoder
from the registry
- currently, the assignment of local indices is done in the "constructor"
which means that the registries will be very thin
*** labcomm_pragma_builder(struct labcomm_encoder *enc);
- looks like an encoder to enable reuse of the generated encode functions
- allocates memory in the enclosing encoder, enc.
- deallocates memory when packet is sent
*** Pragma handler
- is a decoder, to which the user registers handlers for pragma samples
- has/gets a byte_array_reader in the context
- the "surrounding" decoder will deallocate the pragma packet when the
pragma handler returns
______________________________________________________________
______________preliminary sketch of pragma____________________
A pragma "packet" is a sequence of fields, where each field is
A pragma "packet" is a sequence of fields, where each field is
a labcomm sample (in order to keep labcomm in-band self-describing).
a labcomm sample (in order to keep labcomm in-band self-describing).
...
@@ -56,6 +111,8 @@ alt 1. standard handlers, parameter pragma_type to handle function
...
@@ -56,6 +111,8 @@ alt 1. standard handlers, parameter pragma_type to handle function
-- this means adding a parameter to all handlers
-- this means adding a parameter to all handlers
(where null means not pragma)
(where null means not pragma)
void handle_some_pragma(some_pragma *v, void *context, char * pragma_type);
alt 2. standard handlers, but separate register_pragma_handler function
alt 2. standard handlers, but separate register_pragma_handler function
use the handler context to store and communicate pragma-specific data.
use the handler context to store and communicate pragma-specific data.
...
@@ -63,9 +120,21 @@ alt 2. standard handlers, but separate register_pragma_handler function
...
@@ -63,9 +120,21 @@ alt 2. standard handlers, but separate register_pragma_handler function
and that the handler context for pragmas need to be specified
and that the handler context for pragmas need to be specified
(by labcomm)
(by labcomm)
1.
alt 3 have a single handler for pragma packets as the interface upwards
from the labcomm lib. That handler is then responsible for managing
and multiplexing pragma types based on the type field in the pragma
packet.
void handle_some_pragma(some_pragma *v, void *context, char * pragma_type);
The labcomm libraries can provide a default implementation of a
pragma_handler, to facilitate the common cases and reduce the
amount of boilerplate code.
struct pragma_packet {
char *pragma_type;
char *packed_data;
}
void handle_pragma(struct pragma_packet *p, void *context);
...
...
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