05-29-2018 10:15 AM
Hello!
I did a cross compiled shared library from an AMQP C code example, and now I'm trying to call the functions from this .so to perform a "sendString" example on Labview using Call Library Fuction Nodes.
Everything appears to works fine, until I try to login into the server by "amqp_login" function. The labview stops and a warning message shows up.
I looked into the amqp_login code and seems that it returns a Struct...
amqp_rpc_reply_t AMQP_CALL amqp_login(amqp_connection_state_t state, char const *vhost, int channel_max, int frame_max, int heartbeat, amqp_sasl_method_enum sasl_method, ...);
typedef struct amqp_rpc_reply_t_ { amqp_response_type_enum reply_type; /**< the reply type: * - AMQP_RESPONSE_NORMAL - the RPC * completed successfully * - AMQP_RESPONSE_SERVER_EXCEPTION - the * broker returned * an exception, check the reply field * - AMQP_RESPONSE_LIBRARY_EXCEPTION - the * library * encountered an error, check the * library_error field */ amqp_method_t reply; /**< in case of AMQP_RESPONSE_SERVER_EXCEPTION this * field will be set to the method returned from the * broker */ int library_error; /**< in case of AMQP_RESPONSE_LIBRARY_EXCEPTION this * field will be set to an error code. An error * string can be retrieved using amqp_error_string */ } amqp_rpc_reply_t;
I read something about CLFN can't return structs directly.
Is that the reason that Labview stops? Why this warning message shows up? How can I handle this structure on Call Library Function Node?
Can anyone help me?
Thank you in advance!
Solved! Go to Solution.
06-08-2018 08:52 AM
Hi Marcos,
Take a look at this link:
Can I Use External Code on My Real-Time System?
Looks like a .so file can only be used in a Linux-RT OS. Check if this is your case.
You can check this other link:
Unsupported LabVIEW Features on NI Linux Real-Time Targets
There are a list of unsupported features by NI Linux RT target.
A Call Library Function Nodes that access an operating system API other than NI Linux Real-Time is included.
I hope this could help you.
07-04-2018 03:56 PM
Thank you for the answer, but I solve this creating wrapper functions.