Detach & Removed Side Effects?

Comments & issues
Post Reply
Steve
Phidgetsian
Posts: 5
Joined: Fri Sep 22, 2006 10:31 am
Location: MSP, MN, USA
Contact:

Detach & Removed Side Effects?

Post by Steve »

Hello,

Looking for any guidance/documentation regarding any possible side effects when resources 'go away' (Server/Hub/Sensor/Ports) from a Wireless VINT Hub based system.

https://www.phidgets.com/?view=api (Manager) reads in part:

"Phidget channels that become available will each send an Attach event, and Phidgets that are removed from the system will send corresponding Detach events. If you are using a Phidget Manager, your program is responsible for keeping track of available Phidgets using these events."

This is all fine and well, but I am wondering if there are side effects when specific objects are removed or detached. For example, if the Manager tells me that the Hub has detached, does that mean that everything that depends on the Hub (such as plugged-in Sensors or the built-in Modes) should now be considered 'invalid' and references discarded? Similarly, if I get an event telling me that a Server has been removed, does that invalidate the corresponding Hub (which would then cascade down to the sensors/modes/etc.)?

I know that with the Phidget22 event model everything comes in 'flat' but there still is an implicit hierarchy and thus my question. I am always looking to increase the resilience my code and am currently looking into servers disconnecting somewhat consistently after about eight hours of run time.

Thanks.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Detach & Removed Side Effects?

Post by Patrick »

You will always see detach events for child devices before the parent devices in the case of a hub or server detaching.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 0 guests