As best as I can tell, the current master is based partly on old code that used FB_SocketUdpCreate, which required much more in the way of state tracking. That's been cleaned up in this PR and drastically simplified.
As this is my first bit of non-trivial PLC code, you might want to look over the changes closely...
Changes / Notes
Remove eState and rely on FB_ConnectionlessSocket to handle socket creation/deletion for us
Only grab from the log message queue when a socket exists
Do not require local port to be the same as syslog - it should just be assigned by the OS
As best as I can tell, the current master is based partly on old code that used
FB_SocketUdpCreate
, which required much more in the way of state tracking. That's been cleaned up in this PR and drastically simplified.As this is my first bit of non-trivial PLC code, you might want to look over the changes closely...
Changes / Notes
eState
and rely onFB_ConnectionlessSocket
to handle socket creation/deletion for usTesting
And using nc as a syslog stand-in
/usr/bin/nc -u -l 59999 -b <interface>
, I periodically see:Requirements
TF6310
must be installed and licensed on the PLC./reg/g/pcds/plc-common/InstallFiles/Beckhoff
does not work with 4022.TODO
cc @teddyrendahl