Arduino SERVER TCP. Send data packet struct
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Arduino SERVER TCP. Send data packet struct
by Kei ·
Hello, svia.
Arduino Library of W5500 chip is ethernet2.
In 1.6 you need to add ethernet2 directly.
From 1.8.0, however, you can add ethernet2 through the arduino library manager.
First, add / change the library.
And the write () function of the EthernetServer class has a fixed parameter type as shown below.
size_t EthernetServer::write(const uint8_t *buffer, size_t size)
[url]https://github.com/adafruit/Ethernet2/blob/master/src/EthernetServer.cpp[/url]
Therefore, the custom type of the structure can not be the parameter of the function.
If you want to manage data like structs, it’s a good idea to define and manage array numbers or manage them with pointers.
Of course, if you really want to use a structure, you can use C ++ Function Overloading to change the parameters and reconstruct the function.
I hope that helps.
Best regard,
Kei