Loading...
Searching...
No Matches
bitfocus::module_handler Struct Referencefinal
Inheritance diagram for bitfocus::module_handler:
Public Types | |
| enum | DefinitionCategory { Actions = 1 , Feedbacks = 2 , Variables = 4 , All = 7 } |
Public Member Functions | |
| module_handler (QString path, QString entrypoint, QString nodeVersion, QString apiversion, module_configuration config, QString label={}, bool firstInit=false, std::optional< int > upgradeIndex={}, std::optional< std::set< QString > > secretKeys={}) | |
| void | do_write (QString res) |
| QString | jsonToString (QJsonObject obj) |
| void | afterRegistration (std::function< void()>) |
| void | processMessage (std::string_view v) override |
| void | on_process_exited () override |
| int | writeRequest (QString name, QString p) |
| void | writeNotification (QString name, QString p) |
| void | writeReply (QJsonValue id, QString p) |
| void | writeReply (QJsonValue id, QJsonObject p) |
| void | writeReply (QJsonValue id, QString p, bool success) |
| void | writeReply (QJsonValue id, QJsonObject p, bool success) |
| void | on_register (QJsonValue id) |
| void | on_setActionDefinitions (QJsonArray obj) |
| void | on_setVariableDefinitions (QJsonArray obj, QJsonArray values) |
| void | on_setFeedbackDefinitions (QJsonArray obj) |
| void | on_setPresetDefinitions (QJsonArray obj) |
| void | on_setVariableValues (QJsonArray obj) |
| void | on_set_status (QJsonObject obj) |
| void | on_log_message (QJsonObject obj) |
| void | on_saveConfig (QJsonObject obj) |
| void | on_parseVariablesInString (QJsonValue id, QJsonObject obj) |
| void | on_updateFeedbackValues (QJsonObject obj) |
| void | on_recordAction (QJsonObject obj) |
| void | on_setCustomVariable (QJsonObject obj) |
| void | on_sharedUdpSocketJoin (QJsonValue id, QJsonObject obj) |
| void | on_sharedUdpSocketLeave (QJsonObject obj) |
| void | on_sharedUdpSocketSend (QJsonObject obj) |
| void | on_send_osc (QJsonObject obj) |
| module_data::config_field | parseConfigField (const QJsonObject &f) |
| void | on_response_configFields (QJsonArray fields) |
| int | init (QString label) |
| void | send_success (QJsonValue id) |
| void | updateConfigAndLabel (QString label, module_configuration conf) |
| int | requestConfigFields () |
| void | updateFeedbacks (const std::map< QString, module_data::feedback_instance > &feedbacks) |
| void | feedbackLearnValues () |
| void | feedbackDelete () |
| void | variablesChanged () |
| void | actionUpdate () |
| void | actionDelete () |
| void | actionLearnValues () |
| void | actionRun (std::string_view act, QVariantMap options) |
| void | destroy () |
| void | executeHttpRequest (const QString &method, const QString &path, const QString &body, const QMap< QString, QString > &headers, const QMap< QString, QString > &query, std::function< void(int status, QMap< QString, QString > respHeaders, QString respBody)> callback) |
| void | startStopRecordingActions () |
| void | sharedUdpSocketMessage (const QString &handleId, int port, const QByteArray &data, const QString &address, int sourcePort, bool ipv6) |
| void | sharedUdpSocketError (const QString &handleId, int port, const QString &message) |
| const bitfocus::module_data & | model () |
| std::optional< std::set< QString > > | secretKeys () const |
| The configuration keys of the secret fields, once known. | |
| int | takeChangedDefinitions () noexcept |
| The categories changed since the last call. | |
| void | configurationParsed () |
| void | reregistered () |
| The module registered again after its process was restarted. | |
| void | definitionsChanged () |
| Action, feedback or variable definitions changed after registration. | |
| void | configurationSaved () |
| The configuration the module asked to persist. | |
| void | variableChanged (QString var, QVariant val) |
| void | feedbackValueChanged (QString id, QString controlId, QVariant value) |
| void | do_write (std::string_view res) |
Public Member Functions inherited from bitfocus::module_handler_base | |
| module_handler_base (QString node_path, QString module_path, QString entrypoint, QString connection_id) | |
| void | on_read (QSocketDescriptor, QSocketNotifier::Type) |
| void | do_write (std::string_view res) |
| bool | restart_process () |
| Starts the module again, false where unsupported. | |
Additional Inherited Members | |
Public Attributes inherited from bitfocus::module_handler_base | |
| std::size_t | max_message_size = 256 * 1024 * 1024 |
| char | buf [16 *4096] {} |
| std::vector< char > | queue |
| std::size_t | scanned {} |
| Bytes of the queue already searched for a message end. | |
| std::string | pending_write |
| Bytes the module has not read yet: the socket is non-blocking. | |
| std::unique_ptr< QProcess > | process |
| QSocketNotifier * | socket {} |
| QSocketNotifier * | write_socket {} |
| int | pfd [2] {-1, -1} |
| bool | discarding {} |
| Skipping the rest of an over-long message. | |
| int | release_grace_ms {} |
| How long the process gets to shut down once released. | |
Constructor & Destructor Documentation
◆ module_handler()
|
explicit |
Connection flow:
Member Function Documentation
◆ on_process_exited()
|
overridevirtual |
Reimplemented from bitfocus::module_handler_base.
◆ processMessage()
|
overridevirtual |
Implements bitfocus::module_handler_base.
The documentation for this struct was generated from the following files:
- BitfocusContext.hpp
- BitfocusContext.cpp
Public Member Functions inherited from