Commit 1e70d5dd authored by Claes Sjofors's avatar Claes Sjofors

Profinet, set correct status on profinet device when losing connection

parent 14b9b8ad
#060227 cs - Changelog created. 060227 cs - Changelog created.
060509 cj - Added some commentation. 060509 cj - Added some commentation.
Fixed bug in pb_ai and pb_di. 3-byte input where not properly Fixed bug in pb_ai and pb_di. 3-byte input where not properly
aligned when byte swapping. aligned when byte swapping.
...@@ -30,4 +30,7 @@ ...@@ -30,4 +30,7 @@
110429 cs profibus Profibus gsd Bit and BitArea syntax fix for space between Bit and ( 110429 cs profibus Profibus gsd Bit and BitArea syntax fix for space between Bit and (
110531 cs profinet Recall buffer added to profinet configurator. 110531 cs profinet Recall buffer added to profinet configurator.
110531 cs profinet Script functions GetIoDeviceData and SetIoDeviceData to modify profinet configuration added. 110531 cs profinet Script functions GetIoDeviceData and SetIoDeviceData to modify profinet configuration added.
110909 rk profinet Added functionality for acyclic write to a device 110909 rk profinet Added functionality for acyclic write to a device
\ No newline at end of file 111222 rk profinet Added support for handling more than one API.
111222 rk profinet Bugfixes in profinet_viewer.
111230 rk profinet Set correct status on profinet device when losing connection.
...@@ -1577,6 +1577,12 @@ void handle_device_state_changed (io_sAgentLocal *local, io_sAgent *ap) { ...@@ -1577,6 +1577,12 @@ void handle_device_state_changed (io_sAgentLocal *local, io_sAgent *ap) {
pwr_sClass_PnDevice *dev; pwr_sClass_PnDevice *dev;
dev = (pwr_sClass_PnDevice *) slave_list->op; dev = (pwr_sClass_PnDevice *) slave_list->op;
dev->State = dev_state.State[ii]; dev->State = dev_state.State[ii];
if (dev->State == PNAK_DEVICE_STATE_CONNECTED)
dev->Status = PB__NORMAL;
else
dev->Status = PB__NOCONN;
errh_Info( "Profinet - New device state, dev: %s, state: %d", slave_list->Name, dev->State); errh_Info( "Profinet - New device state, dev: %s, state: %d", slave_list->Name, dev->State);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment