Main Site Documentation

So what is this RLP "magic"?


#1

What is exactly this RLP Magic Number? I see one defined in RLP.h

but with G400, I read it as 0x5A210984.

Is that the root of my problems?


#2

My understanding is that the magic numbers are values you can use in your native code to verify that RLPext is actually pointing to a valid (initialized) RLPExt_T structure. See also “{GHIwebsite}>Support>NETMF>GHI Premium Extension”


#3

I’m adding note to RLP documentation (https://www.ghielectronics.com/docs/50/rlp-enhanced)


#4

If you do not know exactly, then who does? :slight_smile:

Anyway, I made the same assumption; and since I read wrong magic number, I assume again somebody forgot to include the RLP lib in G400’s firmware…


#5

Okay, excerpts from the source code :wink:

Global_RLPext.magic = RLP_EXT_MAGIC;
//...
Global_RLPext.magicSize = RLP_MAGIC_SIZE;

#6

Cool, now it’s sculpted into the stone.


#7

It is a form of checking to make sure the pointer is valid before you completely crash your system. Just keep it as shown in examples and you will be fine.