Compile issues with latest git clone

14 views
Skip to first unread message

Mike Cruse

unread,
Sep 1, 2024, 2:14:34 AM9/1/24
to EIP Stack Group OpENer Developers
Hi there,

Just getting familiar with OpENer. I cloned the latest from git and got a few errors while compiling. The errors were all incompatible pointer function parameters in cipepath.c and cipqos.c, e.g. 

In function ‘CipEpathEncodeConnectionEpath’:
OpENer/source/src/cip/cipepath.c:645:27: error: passing argument 2 of ‘MoveMessageNOctets’ from incompatible pointer type [-Wincompatible-pointer-types]
  645 |     MoveMessageNOctets(1, (const CipOctet **) encoded_path);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                           |
      |                           const CipOctet ** {aka const unsigned char **}
In file included from OpENer/source/src/cip/cipepath.c:12:
OpENer/source/src/enet_encap/endianconv.h:128:44: note: expected ‘ENIPMessage * const’ {aka ‘struct enip_message * const’} but argument is of type ‘const CipOctet **’ {aka ‘const unsigned char **’}
  128 |                         ENIPMessage *const outgoing_message);
      |                         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
I made what I thought were appropriate changes an opener now compiles and the sample application seems to be working. I have attached a dif for these files in case someone would like th check I got all the pointer math correct.

I mamaged to get opener build and running on my embedded ARM system. Still figuring a lot of stuff out about how to extend the sample applictaion.

On that front, If anyone can git me a few pointers as to how to change the sample app so that it can use CipReal/EipFloat instead of EipUint8 for the input assembly, I would be grateful.

Not quite sure of the appropriate way to build an object or assembly that can hold 32 single precision floats in OpENer yet.

I have an application that needs to collect temperatures from a CAN bus network and report them via EIP. I think OpENer is going to make that quite easy if I can build the appropriate object.

Thanks in advance for any clues.

Best regards,
Mike 

git-diff

martin...@gmail.com

unread,
Sep 2, 2024, 4:33:59 AM9/2/24
to EIP Stack Group OpENer Developers
Hi,

that's interesting, because every change is built on Github to prevent such issues. I assume with latest version you mean the current HEAD of the master branch?

For the assembly object, just create a pointer of your desired data type for the assembly object data and use this pointer on it.
The data in the assembly object is just "a bunch of data", as your application like to interpret them

Cheers

Reply all
Reply to author
Forward
0 new messages