Skip to main content

Timeline for Char Array Buffers String UINT8

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Apr 18, 2017 at 10:26 vote accept Thijs
Apr 17, 2017 at 16:01 comment added Thijs Let us continue this discussion in chat.
Apr 17, 2017 at 16:00 comment added Majenko driver.recv((uint8_t *)&buf, &buflen); where buf is struct data buf;
Apr 17, 2017 at 15:59 comment added Thijs So I am receiving: driver.recv(buf, &buflen) and I created the struct, and an instance of it. But can I address the buf as a struct? It's not clear how the receiver understand the type so I can save the buff.temperature in the mypacket.temperature
Apr 17, 2017 at 15:54 comment added Majenko The same way. Create a struct exactly the same, then an instance of it, and use the pointer to that instance.
Apr 17, 2017 at 15:53 comment added Thijs and how would I handle this at the receiver, what I now have is (char*)buf)
Apr 17, 2017 at 15:49 comment added Majenko An "instance" of the data "struct", yes.
Apr 17, 2017 at 15:48 comment added Thijs is myPacket an 'instance' of the data 'class' here?
Apr 17, 2017 at 15:43 history answered Majenko CC BY-SA 3.0