SMM question

J

Thread Starter

Jansen, Joe

WARNING: potential newbie question below. If I am just being dumb and missing something, go easy....(;^ }

Jiri,

Looking through the code for the SMM, I was looking at where the data point is validated in plc_get() and plc_set(). There is a call to
check_pt_magic(p). If I am reading the function correctly, it looks as though the application will dump out if the data point is invalid. Can this be caught and given back to the module as an error, allowing the module to try to handle the problem? The reason I ask is that I would potentially see some debugging tools that the 'programmer' could use to locate these type of
problems.

I realize that since we are passing a u32 right now, it would be hard to indicate an invalid data point. I just thought I would bring it up.....


Thanks,

--Joe

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Jansen, Joe:
> Looking through the code for the SMM, I was looking at where the data
> point is validated in plc_get() and plc_set(). There is a call to
> check_pt_magic(p). If I am reading the function correctly, it looks as
> though the application will dump out if the data point is invalid. Can
> this be caught and given back to the module as an error, allowing the
> module to try to handle the problem?

Yes and yes.

As it is, it prints an error message and exits.

Eventually, there'll be an error callback etc. (I thought I'd get it working first.)

> The reason I ask is that I would potentially see some debugging tools
> that the 'programmer' could use to locate these type of problems.

For now, set a breakpoint at smm_lib.c:65


Jiri
--
Jiri Baum <[email protected]>
Windows is not popular. Windows is *widespread*. Linux is popular.

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top