Skip to content

Wifi UDP class and Begin function #106

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

Merged
merged 5 commits into from
May 11, 2025
Merged

Wifi UDP class and Begin function #106

merged 5 commits into from
May 11, 2025

Conversation

IFX-Anusha
Copy link
Contributor

@IFX-Anusha IFX-Anusha commented May 5, 2025

This PR contains the

  • WiFi UDP class implementation with dummy function implementation
  • UDP.begin() function implementation
  • Test case structure is added
  • Test for the begin function

Note :- Test case structure can be later modified according to the requirements

I have created a branch for the UDP class and will be opening the PR to this branch for the UDP class functions

Copy link
Member

@jaenrig-ifx jaenrig-ifx left a comment

Choose a reason for hiding this comment

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

Looking good so far.
I think adapting the socket class to extend for UDP sockets should make the implementation of this class quicker and easier.
And a lot is already implemented on the socket class reusable by the UDP socket, interrupts, buffers, etc.

_last_error(CY_RSLT_SUCCESS) {
}

uint8_t WiFiUDP::begin(uint16_t port) {
Copy link
Member

Choose a reason for hiding this comment

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

The Socket class is already there. Shouldn´t we extend it for UPD?
When UDP we use recvFrom() and sendTo() instead of recv() and send(). The create() gets different arguments but many other things would be reusable.
And other functions are simply not used for UDP.
https://github.com/Infineon/mtb-example-wifi-udp-client/blob/master/source/udp_client.c
https://github.com/Infineon/mtb-example-threadx-wifi-udp-server/blob/master/udp_server.c

Copy link
Member

@jaenrig-ifx jaenrig-ifx left a comment

Choose a reason for hiding this comment

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

Nice :) 👍

@IFX-Anusha IFX-Anusha merged commit 553bd7e into WiFiUDP_class May 11, 2025
53 checks passed
@IFX-Anusha IFX-Anusha deleted the WiFiUDP-begin branch May 11, 2025 14:29
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.

3 participants