Closing a Channel

From Phidgets Support
Jump to: navigation, search
 Phidget Programming Basics: Closing a ChannelTOC Icon.png Table of Contents

Back Arrow.png WhiteTab1.png WhiteTab2.png WhiteTab3.png WhiteTab4.png WhiteTab5.png WhiteTab6.png WhiteTab7.png WhiteTab8.png GreenTab9.png WhiteTab10.png WhiteTab11.png WhiteTab12.png WhiteTab13.png WhiteTab14.png WhiteTab15.png WhiteTab16.png Next Arrow.png


9 . Closing a Channel

When you are finished with a channel, you should close and (in some languages) delete it. Once closed, the physical Phidget channel the software channel was matched to will be released, and made available to attach to other software channels.

For example:

ch.close()

ch.close();

ch.Close();

Phidget_close((PhidgetHandle)ch);
PhidgetDigitalInput_delete(&ch); //Replace DigitalInput with the channel class of your channel


When you close a channel, it will reset all of the properties of that channel. For example, a digital output will revert back to FALSE when it is closed.