Platforms to show: All Mac Windows Linux Cross-Platform
Back to OldPhidgetMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
You can call this while reads and writes are still outstanding; they will fail quickly.
Lasterror is set.
The destructor does a close if you forget it.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The Lasterror property is set.
OldPhidgetMBS.enableLogging(level as Integer, outputFile as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The Lasterror property is set.
Data is written to the file specified with the output file path.
Not sure how the path must be specified. This is depending on the library used.
The levels:
PHIDGET_LOG_CRITICAL | 1 |
PHIDGET_LOG_ERROR | 2 |
PHIDGET_LOG_WARNING | 3 |
PHIDGET_LOG_DEBUG | 4 |
PHIDGET_LOG_INFO | 5 |
PHIDGET_LOG_VERBOSE | 6 |
OldPhidgetMBS.GetDeviceClass as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 11.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
See the PHIDCLASS_* constants.
OldPhidgetMBS.GetDeviceID as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 11.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
See the PHIDID_* constants.
OldPhidgetMBS.GetDeviceLabel as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The Label is a user programmable serial number stored on the Phidget - it can be used to implement a serial numbering scheme, or describe the functionality of the Phidget in a specific application.
Lasterror is set.
Some examples using this method:
OldPhidgetMBS.GetDeviceName as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
For example, "Phidget InterfaceKit 8/8/8", "Phidget InterfaceKit 0/0/4", etc.
The Lasterror property is set.
Some examples using this method:
OldPhidgetMBS.GetDeviceStatus as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns:
PHIDGET_ATTACHED 0x1
PHIDGET_NOTATTACHED 0x0
Lasterror is set.
OldPhidgetMBS.GetDeviceType as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
All PhidgetInterfaceKits will return "PhidgetInterfaceKit", PhidgetRFID returns "PhidgetRFID" and so on.
Lasterror is set.
Some examples using this method:
OldPhidgetMBS.GetDeviceVersion as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set.
OldPhidgetMBS.GetErrorDescription(errorcode as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set.
The list of the error codes:
0 EPHIDGET_OK
1 EPHIDGET_NOTFOUND
2 EPHIDGET_NOMEMORY
3 EPHIDGET_UNEXPECTED
4 EPHIDGET_INVALIDARG
5 EPHIDGET_NOTATTACHED
6 EPHIDGET_INTERRUPTED
7 EPHIDGET_INVALID
8 EPHIDGET_NETWORK
9 EPHIDGET_UNKNOWNVAL
10 EPHIDGET_BADPASSWORD
11 EPHIDGET_UNSUPPORTED
12 EPHIDGET_DUPLICATE
13 EPHIDGET_TIMEOUT
14 EPHIDGET_OUTOFBOUNDS
15 EPHIDGET_EVENT
16 EPHIDGET_NETWORK_NOTCONNECTED
17 EPHIDGET_WRONGDEVICE
OldPhidgetMBS.GetLibraryVersion as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set.
OldPhidgetMBS.GetSerialNumber as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set.
This number is set during manufacturing, and is unique across all Phidgets.
Some examples using this method:
OldPhidgetMBS.GetServerAddress(byref port as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
This should only be called on Phidgets that were opened with openRemote or openRemoteIP.
Lasterror is set.
OldPhidgetMBS.GetServerID as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
This method is not yet implemented and will return EPHIDGET_UNSUPPORTED.
This should only be called on Phidgets that were opened with openRemote or openRemoteIP.
The Lasterror property is set.
OldPhidgetMBS.GetServerStatus as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns one of the following values:
1 CONNECTED
0 NOTCONNECTED
Lasterror is set.
OldPhidgetMBS.Open(serialNumber as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Open is pervasive. What this means is that you can call open on a device before it is plugged in, and keep the device opened across device dis- and re-connections.
Open is Asynchronous. What this means is that open will return immediately - before the device being opened is actually available.
What this means is that you need to either poll getDeviceStatus for an attached status, or handle the attach event, in order to wait for the device to become available before trying to use it.
SerialNumber specifies the desired serial number, allowing the call to open a specific Phidget. Specifying -1 for the serial number will cause it to open the first available device.
Lasterror is set.
OldPhidgetMBS.OpenLabel(label as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 12.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Available with phidget library from December 2011.
Labels can be up to 10 characters (UTF-8 encoding). Specify "" to open any.
Lasterror is set.
OldPhidgetMBS.openLabelRemote(label as string, serverID as string, password as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 12.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Available with phidget library from December 2011.
label: The label string. Labels can be up to 10 characters (UTF-8 encoding). Specify "" to open any.
serverID: Server ID. Specify "" to open any.
password: The Password. Can be "" if the server is running unsecured.
Lasterror is set.
OldPhidgetMBS.openLabelRemoteIP(label as string, addr as string, port as Integer, password as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 12.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Available with phidget library from December 2011.
Lasterror is set.
label: Label string. Labels can be up to 10 characters (UTF-8 encoding). Specify "" to open any.
address: The Address. This can be a hostname or IP address.
port: The Port number. Default is 5001.
password: The Password. Can be NULL if the server is running unsecured.
OldPhidgetMBS.openRemote(serial as Integer, serverID as string, password as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set.
OldPhidgetMBS.openRemoteIP(serial as Integer, addr as string, port as Integer, password as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
OpenRemoteIP will block until it connects to the server, which means that when it returns with EPHIDGET_OK, this means that the connection is active. If the server is unavailable, this will return an error code. If the connection to a webservice is disrupted while in use, an error event will be thrown, and it is recommended that an error event listener be registered for this reason.
As with the regular open, openRemoteIP is pervasive and asynchronous – so long as the connection to the Webservice remains active.
SerialNumber specifies the desired serial number, allowing the call to open a specific Phidget. Specifying -1 for the serial number will cause it to open the first available device.
Address is the address of the computer running the Phidget Webservice. This can be either an IP address or a hostname.
Port specifies the port of the Webservice on the remote computer.
Password specifies the password, which is required if authentication is active on the Webservice. If authentication is not active, this can be set to "".
Lasterror is set.
OldPhidgetMBS.SetDeviceLabel(label as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
SetDeviceLabel may not be available on all operating systems.
Currently it is available on MacOS X, Linux, and Windows CE.
Calling this on Windows will return EPHIDGET_UNSUPPORTED
Lasterror is set.
OldPhidgetMBS.waitForAttachment(milliseconds as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Phidgets | MBS Phidgets Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set to EPHIDGET_OK when the device is available, or to EPHIDGET_TIMEOUT if the device is not attached before the timeout expires.
Timeouts below about 300ms cannot be trusted because of initialization time, and sometimes an even larger timeout is required – ie. the first time a device is plugged into a windows machine.
A timeout of 0 is infinite.
This function can be used in conjunction with (or instead of) an attach event handler.
The Lasterror property is set.
The items on this page are in the following plugins: MBS Phidgets Plugin.