-
Notifications
You must be signed in to change notification settings - Fork 5
API Reference
The concept of Processor is directly related to the backend servers in Crossbar, an in fact synonymous with the Servers described here.
In essence, the processor keeps track of the backend databases that a given widget is connected to. It is a string attribute that corresponds to an entry in the backend server settings schemas.
All the following APIs are specified in the base FBLWidget class which are then inherited by the children widgets (Neu3DWidget, NeuGFXWidget). New widget classes should put custom logic for when processor is changed inside the set processor(newProcessor: string) setter, and use processorChanged signal to monitor processor changes.
-
FFBOProcessor.NO_PROCESSOR = "No Processor": a constant that indicatesno processorconnected. -
get processor(): string: a getter that returns the string name of the processor currently connected to. -
setProcessor(newProcessor: string, startUp=false): a function that sets the value of the processor- Sets the
hasClientanddirtystates of the widget if either thenewProcessorisFFBOProcessor.NO_PROCESSORor is different from the current processor. - In children classes (
Neu3D), thestartUpflag allows for a different behavior at the initialization stage of the widget.
- Sets the
-
set processor(newProcessor: string): a setter that calls thesetProcessor(newProcessor: string, startUp=false)API, with additional logic specified in the inherited child classes (like showing meshes associated with a given processor inNeu3D). -
processorChanged: a signal that emits the name of the new processor when changed.
TODO
In commit db9eeed, a new API that tracks the status of ClientConnection was introduced.
This API allows for the front-end to keep track of whether a client object is associated with the current front-end widget.
The status of the client can be checked by the hasClient getter or set by the setHasClient() function call.
A call to setHasClient would always emit a clientConnect signal that emits a boolean flag of whether the widget has client.
Additionally, to force a manual check, user can use the checkForClient() function which will communicated with the kernel to check for client.
The API has been used to change the Neu3DWidget's input search bar placeholder and disable the search bar when the client is not found.