Article 5N2KG UDP send

UDP send

by
lokal1
from LinuxQuestions.org on (#5N2KG)
Hi,
Newbie here, the only knowledge I have is from googling.
Please bear with me.

How does one properly send data over UDP?
I have a data like this:

Code:typedef union {
struct {
uint8_t buffer[BUFF_SIZE]; // 64
} tx;

struct {
int32_t header;
volatile int32_t Cmd[COMMAND_SIZE]; // 4
float setPoint[VARIABLES]; // 6
uint8_t enable;
uint8_t outputs;
uint8_t spar0;
uint8_t spar1;
} data;

} txData_t;

txData_t txData;The header is always a fixed data.
Only header and enable has initial value greater than 0,
the rest are 0 values.
I'm sending the whole 64byte buffer over UDP, but I'm only receiving
the header, I'm expecting to also receive the enable value
but it's not there.
What do I need to do to make sure I receive the datas or for that matter
how do I make sure that the datas are actually getting sent.latest?d=yIl2AUoC8zA latest?i=hAJn2-jlG58:9C7ETQcX1DI:F7zBnMy latest?i=hAJn2-jlG58:9C7ETQcX1DI:V_sGLiP latest?d=qj6IDK7rITs latest?i=hAJn2-jlG58:9C7ETQcX1DI:gIN9vFwhAJn2-jlG58
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments