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

Reuse endpoint strings #23

Open
Citrullin opened this issue Oct 28, 2021 · 0 comments
Open

Reuse endpoint strings #23

Citrullin opened this issue Oct 28, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Citrullin
Copy link
Collaborator

Description

At the moment the endpoint strings are written multiple times. This can get reduced.
For example, in the generated code

const coap_resource_t _wot_coap_resources[] = {
   {"/led/rmtoggle", COAP_POST, wot_led_rmtoggle_handler, NULL},
   {"/led/status", COAP_GET | COAP_PUT, wot_led_status_handler, NULL},
   {"/led/toggle", COAP_POST, wot_led_toggle_handler, NULL}
};

wot_td_uri_t wot_td_config_init_action_affordance_1_int_affordance_form_0_href = {
   .value = "/led/rmtoggle",
};

wot_td_uri_t wot_td_config_init_action_affordance_0_int_affordance_form_0_href = {
   .value = "/led/toggle",
};

wot_td_uri_t wot_td_config_init_prop_affordance_0_int_affordance_form_0_href = {
   .value = "/led/status",
};
@Citrullin Citrullin added the enhancement New feature or request label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant