EventDispatcher |
Phidget |
16 other children |
Base Phidget class from which all specific device classes inherit. See the programming manual for more specific API details, supported functionality, units, etc.
Phidget | Base Phidget class from which all specific device classes inherit. |
Events | Events supported by all Phidgets. |
Functions | |
open | Opens a Phidget. |
close | Closes a Phidget. |
Properties | |
Type | Gets the type (class) of a Phidget. |
Name | Gets the specific name of a Phidget. |
Label | Gets the Label of a Phidget. |
Version | Gets the firwmare version of a Phidget. |
serialNumber | Gets the unique serial number of a Phidget. |
isAttached | Gets the attached state of a Phidget. |
Address | Gets the server address. |
Port | Gets the server port. |
Label | Sets the Label. |
Events supported by all Phidgets. Pass these constants to the addEventListener() function when adding event listeners to a Phidget object.
PhidgetEvent.CONNECT | server connect |
PhidgetEvent.DISCONNECT | server disconnect |
PhidgetEvent.ATTACH | phidget attach |
PhidgetEvent.DETACH | phidget detach |
PhidgetErrorEvent.ERROR | asynchronous error |
public function open( address: String, port: Number, password: String = null, serialNumber: int = com.phidgets.Constants.PUNK_INT, label: String = null ):void
Opens a Phidget.
address | address of the webservice. This can be ‘localhost’ when running from a single computer. |
port | port of the webservice. This is 5001 by default. |
password | password of the webservice. This is optional and doesn’t need to be specified for unsecured webservices. |
serialNumber | serial number of the phidget to open. This is optional and if not specified, the first available phidget will be opened. |
Opens a Phidget.
public function open( address: String, port: Number, password: String = null, serialNumber: int = com.phidgets.Constants.PUNK_INT, label: String = null ):void
Closes a Phidget.
public function close():void
Gets the type (class) of a Phidget.
public function get Type():String
Gets the specific name of a Phidget.
public function get Name():String
Gets the Label of a Phidget.
public function get Label():String
Gets the firwmare version of a Phidget.
public function get Version():int
Gets the unique serial number of a Phidget.
public function get serialNumber():int
Gets the attached state of a Phidget.
public function get isAttached ():Boolean
Gets the server address.
public function get Address():String
Gets the server port.
public function get Port():int