Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: max_bytes runtime conditional (to support different channel types) #87

Open
tsaubergine opened this issue Sep 26, 2022 · 0 comments

Comments

@tsaubergine
Copy link
Member

On 9/21/22 19:57, Fenucci, Davide wrote:

I saw your recent DCCL update about dynamic conditions - that looks
awesome, and I was wondering if we could use it to achieve the following.
We have a message with a repeated field for which we set the max_repeat
attribute to fit in the max_bytes of the message - consider the
following message as a minimal example:

message Test {
option (dccl.msg) = {
id: 2,
max_bytes: 82,
codec_version: 4
};

repeated uint32 field = 1 [ (dccl.field) = { min: 0 max: 4294967295
max_repeat: 20 } ];
}

Now, what we would like to do is to send the same message over different
communication channels having different length constraints (WiFi,
acoustic and Iridium, in particular) - do you think it would make sense
to dynamically adjust the max_bytes and max_repeat attributes based on
the value of a field that will contain the type of channel used? Say
something along the lines of the following:

message Test {
option (dccl.msg) = {
id: 2,
max_bytes: 82,
codec_version: 4
dynamic_conditions: { max_bytes: "if this.channel == "WiFi"; then
return 1000000; else if this.channel == "Acoustic"; then return 60; ...
end" }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant