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

LG-73 Partial CDD API support #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sgunes-wirepas
Copy link
Contributor

Includes support for the following:

  • Setting an item (WPC_set_config_data_item)
  • Getting an item (WPC_get_config_data_item)
  • Registering a callback for an item indication (WPC_register_for_config_data_item)

@sgunes-wirepas sgunes-wirepas force-pushed the feature/LG-73-cdd_api_part1 branch 2 times, most recently from 23a4d24 to 452cf7d Compare March 10, 2025 11:54
Includes support for the following:
- Setting an item (WPC_set_config_data_item)
- Getting an item (WPC_get_config_data_item)
- Registering a callback for an item indication
  (WPC_register_for_config_data_item)
@sgunes-wirepas sgunes-wirepas force-pushed the feature/LG-73-cdd_api_part1 branch from 452cf7d to 2a87546 Compare March 12, 2025 13:36
* \brief Register for receiving config data item
* \param onConfigDataItemReceived
* The callback to call when config data item is received
* \note All the registered callback share the same thread,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you register to it if you are a sink?
Question is more to know if a CDD can be written by the stack itself so the sink app can also be informed this way that something has changed.

// Response
sap_resp_pl_t sap_response_payload;
} payload;
} wpc_frame_t;

// Make sure each member of the payload union has a size representable by the
// payload_length field
_Static_assert(sizeof(((wpc_frame_t*)0)->payload) <= UINT8_MAX, "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enhancement!


wpc_frame_t request = {
.primitive_id = MSAP_CONFIG_DATA_ITEM_SET_REQUEST,
.payload_length = sizeof(msap_config_data_item_set_req_pl_t),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So even if CDD is 10 bytes, 80 bytes are sent? (padded with 00)
I guess you did it this way as it was the expectation on dualmcu app side.

I guess it is like this to mimic the old implementation of app_config :-)

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

Successfully merging this pull request may close these issues.

2 participants