Reconnecting when unplug/plug cable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reconnecting when unplug/plug cable

497 Views
Glogov_Kolac
Contributor II

Is there a some function which can be used to indicate that the cable is pluged of or on and procedure to refresh or reinit RTCS?

Labels (1)
Tags (1)
0 Kudos
1 Reply

331 Views
CarlFST60L
Senior Contributor II

I actually just came looking for a RTCS_reinitialize procedure / option as once its created it just returns "error already created" and that's it, and once you drop a cable or boot a router or stuff up an external gateway, it never recovers unless you reboot, there are many situations where you have to reboot to get it to work... Basically, how do kill/destroy RTCS so we can restart it and recover 'quickly' from network issues?

 

Here is my code to detect the cable unplug detection / wait which is done after RTCS_Create and before we try to bind, also done when we go to send packets...

 

      for(;;)       {   link = ipcfg_get_link_active(IPCFG_default_enet_device);  if(link) break;  _time_delay(500);      };