I usually send structures from arduino via serial port to PC and use the memcpy function to do it.
Let's say you have the struct data d (as pointed by the comments the memcpy as unnecessary. Use cast or union):
struct data state;
len = sizeof(state);
Serial.write((uint8_t *)&state,len);
It is useful to create a starting and ending character to delimit your important data and make sure you receive all data and good information.
Let me give you one of my recent work example:
...
void send_state(){
len = sizeof(state);
Serial.write('S');
Serial.write((uint8_t *)&state, len);
Serial.write('E');
return;
}
...
In this example the struct state is preceded with "S" (start) and succeeded with "E".
Then in python, for example, you can get the data using the unpack function. In my case:
...
# wait for data from arduino
myByte = port.read(1)
if myByte == 'S':
data = port.read(39)
myByte = port.read(1)
if myByte == 'E':
# is a valid message struct
new_values = unpack('<c6BH14B4f', data)
...
See if arduino sends data in little endian. The one I have used to send it.