Initializes the object with the remote server address.
The only mandatory parameter is server
which specifies the remote
server, running FPoIP server, to connect to.
Parameters that must include the server address.
Returns true if the object is connected to the remote server.
This value is initially false
and becomes true
once connect
completes successfully.
No other method of this class other than connect()
can be used until
this property becomes true
.
Activates a given trigger.
Clears the FPGA configuration.
Requests closing the currently opened device.
openDevice can be called again, with the same or different device after calling this function.
Configures the device with the given firmware data.
Contains firmware data.
Configures the device with data stored in flash memory.
Reserved for future use.
Configures the device with the given firmware data and reset profile.
Contains firmware data.
Indicates which reset profile should be set.
Initiates connection to the server.
This async function will satisfy its promise when connecting succeeds or break it when it fails.
See isConnected.
Destroys the script engine earlier loaded in loadScript function.
Initiates disconnection from the server.
Optional standard WebSocket close code explaining why the connection is being closed.
Erases a flash memory sector at the specified address.
Flash memory address.
Reads a string of bytes from the target Flash Memory address.
Flash memory address.
Length of data (in bytes).
Writes a string of bytes to the target Flash memory address.
Flash memory address.
Data to be written.
Requests information about the currently opened device.
IDeviceInfo object containing device characteristics.
Retrieves the list of Device Sensors.
[[IDeviceSensors[]]] list of Device Sensors.
Creates an object providing an interface to Device Settings.
DeviceSettings object providing access to Device Settings.
Retrieves the eeprom configuration for the device PLL22150.
[[IPLL22150Configuration]] PLL configuration.
Retrieves the FPGA reset profile.
Indicates which reset profile should be retrieved.
Returns the length of the last transfer (successful or not).
Retrieves the configuration for the device PLL22150.
[[IPLL22150Configuration]] PLL configuration.
Returns the value of the given trigger.
Gets the value of a particular Wire In from the internal wire data structure.
Gets the value of a particular Wire Out from the internal wire data structure.
Indicates whether Device Sensors are supported.
true if Device Sensors are supported.
Indicates whether Device Settings are supported.
true if Device Settings are supported.
Returns true if FrontPanel-3 is firmware-supported.
This method checks to see if the FrontPanel Host Interface has been instantiated in the FPGA design. If it is detected, FrontPanel support is enabled and endpoint functionality is available.
Returns true if the trigger has been triggered.
Sets the default configuration for the device PLL.
Prepare a script for later execution.
This method parses the given Lua code and makes it possible to execute functions defined in it later, see runScriptFunction.
Initiates login to the server.
As the provided credentials are transmitted unencrypted, connection itself must be secure, i.e. use TLS.
After successfully logging in, call openDevice to start working with one of the devices from the list returned by the server.
The username to use for authentication.
The password to use for authentication.
List of available devices in case of successful login.
Requests opening the specified device.
Opening the device is required before using any functions other than connect, login and disconnect.
One of the devices returned from login.
Reads data from a BlockPipeOut endpoint.
Reads a block from a Pipe Out endpoint.
This method reads a string of bytes from the target I2C address. This transfer does not utilize the FPGA and can be done prior to configuration.
The following errors can be thrown:
I2C address of the target device.
Length of data (in bytes).
Reads a set of registers.
Set of register addresses for the registers to be read.
Set of register address and value entries.
Performs a RESET of the FPGA internals. This requires that FrontPanel support be present in the FPGA design because the RESET signal actually comes from the FrontPanel Host Interface.
Runs a function defined in a previously loaded script, see loadScript.
At the completion of a BTPipeIn transfer, the host polls the hardware to confirm that all of the data has been consumed by the FPGA before returning from the function. The polling interval is set by this method.
The valid range for this interval is 1 to 100 milliseconds. Values outside this range throws the error Failed. The default is 25 milliseconds.
Polling interval (in milliseconds).
This method modifies the XEM Device ID string with the new string. The Device ID string is a user-programmable string of up to 32 characters that can be used to uniquely identify a particular XEM. The string will be truncated if it exceeds 32 characters.
A string containing the new Device ID.
Sets the eeprom configuration for the device PLL22150.
PLL22150 configuration.
Sets the FPGA reset profile.
Indicates which reset profile should be set.
Sets the configuration for the device PLL22150.
PLL22150 configuration.
This method sets the timeout value used by USB transactions when communicating with the target device. Note that this is not necessarily the timeout for a particular API call. By default, the timeout is set to 10 seconds).
Note that a timeout is not always provided by the underlying calls nor by the operating system. Most generally, the timeout will apply to pipe transfers and FPGA configuration transfers.
Timeout duration specified in milliseconds.
Sets a wire value in the internal wire data structure.
Transfers both trigger and wire outs from the FPGA at once, equivalent to calling updateTriggerOuts and updateWireOuts consecutively, but can be more efficient.
Reads Trigger Out endpoints.
Transfers current Wire In values to the FPGA.
Transfers current Wire Out values from the FPGA.
Asynchronously waits for any unsolicited server reply.
Unsolicited replies are sent by the server not in reply to a client request but due to an event on the server-side, e.g. new device connection.
This method writes a string of bytes to the target I2C address. This transfer does not utilize the FPGA and can be done prior to configuration.
The following errors can be thrown:
I2C address of the target device.
Data to be written.
Writes a set of registers.
Writes data to a BlockPipeIn endpoint.
Writes a block to a Pipe In endpoint.
Generated using TypeDoc
This is the class that encapsulates the functionality of the FPGA boards as well as the FrontPanel extensions such as wire and trigger endpoints.