|
Bifrost SDK
Bifrost SDK documentation
|
BifrostGraph Executor Watchpoint. More...
#include <Watchpoint.h>
Classes | |
| struct | Filter |
| Structure that holds the filtering settings for getIndices. More... | |
| class | Records |
| An interface for the watchpoints to manage recorded values. More... | |
| struct | Sorter |
| Structure that holds the sorting settings for getIndices. More... | |
| class | Watcher |
| The interface to get the watchpoint layout and value. More... | |
Public Types | |
| enum class | Field : char { eIndex , eValue , eElement } |
| Field enumerants for indices sorter and filters. More... | |
| using | String = Amino::String |
| using | StringArray = Amino::Array< String > |
| using | TypeIdArray = Amino::Array< Amino::TypeId > |
| using | CreateFunc = BifrostGraph::Executor::Watchpoint *(*)() |
| The signature of the function used to create the Watchpoint. More... | |
| using | CallBack = void(*)(const void *clientData, Amino::ulong_t locationID, const void *valueData) |
| Callback function signature. More... | |
| using | Filters = Filter::Filters |
| using | Indices = Amino::Array< std::size_t > |
Public Member Functions | |
| Watchpoint (String name) noexcept | |
| Constructor. More... | |
| virtual | ~Watchpoint () noexcept |
| Destructor. More... | |
| String | getName () const noexcept |
| Get the name of this Watchpoint for logging purposes. More... | |
| virtual void | deleteThis () noexcept=0 |
| Instruct the Watchpoint to delete itself. More... | |
| virtual void | getSupportedTypeNames (StringArray &names) const noexcept |
| Get the fully qualified names of the types handled by the Watchpoint. More... | |
| virtual void | getSupportedTypeIds (TypeIdArray &typeIds) const noexcept=0 |
| Get the list of the typeIds handled by this Watchpoint. More... | |
| virtual CallBack | getCallBackFunction (const Amino::TypeId &typeId) const noexcept=0 |
| Get the callback function for the given typeId. More... | |
| virtual CallBack | getCallBackFunction (const Amino::Type &type) const noexcept |
| Get the callback function for the given type. More... | |
| virtual Watcher * | createWatcher (Amino::TypeId const &typeId, Watcher::Flags flags=Watcher::Flags::kNone) const noexcept=0 |
| Get the watcher for given type. More... | |
| virtual Watcher * | createWatcher (Amino::Type const &type, Watcher::Flags flags=Watcher::Flags::kNone) const noexcept |
| Get the watcher for given type. More... | |
| virtual WatchpointLayoutPtr | createLayout (WatchpointLayoutFactory const &factory, Amino::Any const &any) const noexcept |
| Create a custom layout for a value of one of the supported types. More... | |
| virtual bool | getValue (WatchpointLayoutFactory const &factory, Amino::Any const &any, WatchpointLayoutPath &path, Amino::String &out_value) const noexcept |
| Get the string representation of an element of a given value. More... | |
| virtual bool | getAvailableParameters (const Amino::Type &type, StringArray ¶meters) const noexcept |
| Get the list of watchable parameters for a given type. More... | |
| virtual bool | getParameterDetails (const Amino::Type &type, const String ¶meter, String &description, StringArray &values, StringArray &descriptions) const noexcept |
| Get details on the watchable parameter for a given type. More... | |
| virtual const void * | createClientData (const Amino::Type &type, Records &records) const noexcept |
| Create a new Watchpoint client data. More... | |
| virtual bool | releaseClientData (const Amino::Type &type, const void *clientData) const noexcept |
| Release a Watchpoint client data. More... | |
| virtual bool | getIndices (Amino::Any const &any, Filters const &filters, Sorter const &sorter, Indices &out_indices) const noexcept |
| Implemenation helper to return the indices of an array value for given filters and sorter settings. More... | |
Static Public Member Functions | |
| static const char * | createFuncName () noexcept |
| Get the name of the function used to create a new Watchpoint from a shared library. More... | |
BifrostGraph Executor Watchpoint.
Watchpoint can be used to handle watchpoint callback and data for specific data types. If the Watchpoint is enabled when executing the Bifrost graph, the callback function of the Watchpoint will be called when transferring the value of an incoming connection to the port to which this Watchpoint belongs.
A Watchpoint should be allocated on the heap, not on the stack. The Workspace will manage its lifetime and delete it by calling Watchpoint::deleteThis when the Workspace gets unloaded.
Definition at line 68 of file Watchpoint.h.
| using BifrostGraph::Executor::Watchpoint::CallBack = void (*)(const void* clientData, Amino::ulong_t locationID, const void* valueData) |
Callback function signature.
Definition at line 168 of file Watchpoint.h.
The signature of the function used to create the Watchpoint.
Definition at line 86 of file Watchpoint.h.
Definition at line 438 of file Watchpoint.h.
| using BifrostGraph::Executor::Watchpoint::Indices = Amino::Array<std::size_t> |
Definition at line 439 of file Watchpoint.h.
Definition at line 70 of file Watchpoint.h.
Definition at line 71 of file Watchpoint.h.
Definition at line 72 of file Watchpoint.h.
|
strong |
Field enumerants for indices sorter and filters.
| Enumerator | |
|---|---|
| eIndex | |
| eValue | |
| eElement | |
Definition at line 361 of file Watchpoint.h.
|
explicitnoexcept |
Constructor.
| [in] | name | The name of this Watchpoint for logging purposes. |
|
virtualnoexcept |
Destructor.
|
virtualnoexcept |
Create a new Watchpoint client data.
| [in] | type | The type of data flowing through the Watchpoint. |
| [in,out] | records | A reference to a Records object, to query settings and store new values for the parameters. |
|
staticnoexcept |
Get the name of the function used to create a new Watchpoint from a shared library.
This function is the C entry point used to register watchpoints with Bifrost. The client code must declare and define the entry point. This function must have the CreateFunc signature.
Note that BIFROSTGRAPH_EXECUTOR_SHARED_DECL is for symbol visiblity, see ExecutorExport.h file.
The Watchpoint shared library is exposed to Bifrost via a config file. The JSON config file will need a watchPointsTranslationLibs section. Note that, to be portable and depending on the platform, Bifrost config file parsing will automatically add the prefix "lib" and suffix "dll", "so", or "dylib".
|
virtualnoexcept |
Create a custom layout for a value of one of the supported types.
| factory | The layout factory, used to get/create nested layouts. |
| any | The value to create the layout for. |
|
virtualnoexcept |
Get the watcher for given type.
| type | The type of data flowing through the watchpoint. |
| flags | The watcher flags. |
|
pure virtualnoexcept |
Get the watcher for given type.
| typeId | The typeId of data flowing through the watchpoint. |
| flags | The watcher flags. |
|
pure virtualnoexcept |
Instruct the Watchpoint to delete itself.
|
virtualnoexcept |
Get the list of watchable parameters for a given type.
| [in] | type | The Amino type. |
| [out] | parameters | The list where to return the parameters. |
parameters unchanged and returns false.
|
virtualnoexcept |
Get the callback function for the given type.
| [in] | type | The Amino type. |
|
pure virtualnoexcept |
Get the callback function for the given typeId.
| [in] | typeId | The typeId. |
|
virtualnoexcept |
Implemenation helper to return the indices of an array value for given filters and sorter settings.
| any | The array value |
| filters | The list of filters |
| sorter | The sorting settings |
| out_indices | The filtered and sorted indices |
|
noexcept |
Get the name of this Watchpoint for logging purposes.
|
virtualnoexcept |
Get details on the watchable parameter for a given type.
| [in] | type | The Amino type. |
| [in] | parameter | The parameter. |
| [out] | description | The description of the parameter. |
| [out] | values | The values that can be assigned to the parameter. Can be used as a way to configure the parameter. |
| [out] | descriptions | The descriptions of each values. |
|
pure virtualnoexcept |
Get the list of the typeIds handled by this Watchpoint.
The Library will call this method to build the list of typeIds handled by this Watchpoint. The default implementation of this method adds no typeId to typeIds. The deriving class may override this default implementation to list the typeIds it handles
| [out] | typeIds | The typeIds handled by this Watchpoint. |
|
virtualnoexcept |
Get the fully qualified names of the types handled by the Watchpoint.
The Library will call this method to build the list of types handled by this Watchpoint. The default implementation of this method adds no type name to names. The deriving class may override this default implementation to list the fully qualified names of the types it handles.
| [out] | names | The fully qualified names of the types handled by this Watchpoint. |
names unchanged.
|
virtualnoexcept |
Get the string representation of an element of a given value.
| factory | The layout factory, used to get value from nested layouts | |
| any | The value | |
| path | The path to the element | |
| [out] | out_value | The string representation |
|
virtualnoexcept |
Release a Watchpoint client data.
| [in] | type | The type of data flowing through the Watchpoint. |
| [in] | clientData | An opaque pointer to the client data allocated by createClientData. |