Update hash function of MSF according to version 02

Description

None

Environment

None

Activity

Show:
Christian Hopfner
February 7, 2019, 1:03 PM

Hi ,

i started a while ago to implement that as well but did not finish yet. Please find attached my implementation. My input parameter was by now the lower 8 byte of the ipv6 address. At the the end the question is which datatype to use for the output uint8, uint16 or uint32.

Best Chris

Tengfei Chang
February 7, 2019, 1:09 PM
Edited

Hi , thanks for providing the source files.

For the data type, I think at least uint16_t. the unit could be different to different boards by replacing it with a marco definiation.

At last, I think your implementation missed the final step which is the modulation part.

Christian Hopfner
February 7, 2019, 1:27 PM
Edited

Hi ,

These functions simply implements sax hash i encapsulated that in an additional function returning the final results for:

slotOffset(MAC) = 1 + hash(EUI64) % (length(Slotframe_1) - 1)
channelOffset(MAC) = hash(EUI64) % 16

at least I replaced 16 by MAX_NUMCHANNEL, and the offset of 1 which avoids conflicts with the minimal cell by another macro, since it interferred with the old design using serialrx cells in addition prior to your changes to xonoff

Assignee

Tengfei Chang

Reporter

Tengfei Chang

Labels

None

Story Points

5

Sprint

None

Fix versions

Affects versions

Priority

Normal
Configure