The purpose of this PR is to remove the DoubleByte class and replace its usage by ushort in the ZigBeeNet.Hardware.TI.CC2531 library.
Using a class for storing 2 bytes of data has an impact on performance (heap allocation for each new object, additional calls, garbage collection). By replacing this class and using directly ushort with a few helper functions that will probably be inlined by the compiler most of the time you will lower memory impact and improve performance.
As the DoubleByte class wasn't used anywhere else in the repository I removed it from the code to prevent usage in the future.
@oblaise Thanks for your PR and well understanding explanation.
We need to seperate LSB and MSB, but with your solution it is still avalible and technically better
The purpose of this PR is to remove the DoubleByte class and replace its usage by ushort in the ZigBeeNet.Hardware.TI.CC2531 library.
Using a class for storing 2 bytes of data has an impact on performance (heap allocation for each new object, additional calls, garbage collection). By replacing this class and using directly ushort with a few helper functions that will probably be inlined by the compiler most of the time you will lower memory impact and improve performance.
As the DoubleByte class wasn't used anywhere else in the repository I removed it from the code to prevent usage in the future.