Skip to main content
Post Reopened by Juraj
Post Closed as "Not suitable for this site" by VE7JRO, jsotola, the busybee
formatted code
Source Link
jsotola
  • 1.6k
  • 2
  • 13
  • 22

I have been tinkering with rs485 serial bus.

My message is 7 byte array with layout

uint8 address uint8 command int32 data uint8 checksum

uint8 address
uint8 command
int32 data
uint8 checksum

I now serialize and deserialize the int32 with bitshifting.

Would it be computationally more efficient to use a union of struct and array than to do the bitwise operations?

Rgds, Tapio

I have been tinkering with rs485 serial bus.

My message is 7 byte array with layout

uint8 address uint8 command int32 data uint8 checksum

I now serialize and deserialize the int32 with bitshifting.

Would it be computationally more efficient to use a union of struct and array than to do the bitwise operations?

Rgds, Tapio

I have been tinkering with rs485 serial bus.

My message is 7 byte array with layout

uint8 address
uint8 command
int32 data
uint8 checksum

I now serialize and deserialize the int32 with bitshifting.

Would it be computationally more efficient to use a union of struct and array than to do the bitwise operations?

Source Link
Koep
  • 11
  • 1

Computational efficiency?

I have been tinkering with rs485 serial bus.

My message is 7 byte array with layout

uint8 address uint8 command int32 data uint8 checksum

I now serialize and deserialize the int32 with bitshifting.

Would it be computationally more efficient to use a union of struct and array than to do the bitwise operations?

Rgds, Tapio