Need some clarification in using EncodeCipReal #368
-
Hi, I'm using the sample application available under source/src/ports/POSIX/sample_application/sampleapplication.c. While using EncodeCipReal function, i'm getting a segmentation fault. I just want to try for a simple structure. Here is my code for encode.
I want to confirm that is this a proper way to pass enip_gas_message to this function? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You are providing a pointer to you |
Beta Was this translation helpful? Give feedback.
You are providing a pointer to you
EipUint8
pointer to theEncodeCipReal
function, so its a pointer-pointerTaking a look at the functions declaration
void EncodeCipReal(const CipReal *const data, ENIPMessage *const outgoing_message)
, you can easily see that it needs a pointer to an CipReal variable, so aCipReal*
, while you are providing aEipUint8**
, which the compiler should warn you if you take a look at the messages