OSSIA
Open Scenario System for Interactive Application
|
Root of a device tree. More...
Inherited by ossia::net::generic_device, ossia::net::midi::midi_device, ossia::net::wrapped_device< Node_T, Protocol_T >, and ossia::qt::qt_device.
Root of a device tree.
A device models a real hardware or software with which communication should be established.
It handles transformations of the node tree and allows to add callbacks to be called :
The root node of a device maps to the "/" address.
A device is necessarily constructed with a protocol. If the device is meant to mirror a remote application, it should be constructed directly with the remote protocol (e.g. minuit_protocol, osc_protocol).
if the device is meant to expose the current application to the network, it should be constructed with the local_protocol.
Public Member Functions | |
device_base (std::unique_ptr< ossia::net::protocol_base > proto) | |
device_base (const device_base &)=delete | |
device_base (device_base &&)=delete | |
device_base & | operator= (const device_base &)=delete |
device_base & | operator= (device_base &&)=delete |
ossia::net::protocol_base & | get_protocol () const |
virtual const ossia::net::node_base & | get_root_node () const =0 |
virtual ossia::net::node_base & | get_root_node ()=0 |
device_capabilities | get_capabilities () const |
void | set_name (const std::string &str) |
std::string | get_name () const |
bool | has_echo () |
void | set_echo (bool echo) |
void | apply_incoming_message (const message_origin_identifier &id, ossia::net::parameter_base ¶m, ossia::value &&value) |
void | apply_incoming_message_quiet (const message_origin_identifier &id, ossia::net::parameter_base ¶m, ossia::value &&value) |
Public Attributes | |
Nano::Signal< void(node_base &)> | on_node_created |
Nano::Signal< void(node_base &)> | on_node_removing |
Nano::Signal< void(node_base &, std::string)> | on_node_renamed |
Nano::Signal< void(node_base &, const std::string &)> | on_attribute_modified |
Nano::Signal< void(const parameter_base &)> | on_parameter_created |
Nano::Signal< void(const parameter_base &)> | on_parameter_removing |
Nano::Signal< void(const parameter_base &)> | on_message |
Nano::Signal< void(const std::string, const ossia::value &val)> | on_unhandled_message |
Nano::Signal< void(std::string, const parameter_data &)> | on_add_node_requested |
Nano::Signal< void(std::string, std::string)> | on_remove_node_requested |
Nano::Signal< void(std::string, std::string)> | on_rename_node_requested |
Protected Attributes | |
std::unique_ptr< ossia::net::protocol_base > | m_protocol |
device_capabilities | m_capabilities {} |
bool | m_echo {false} |
Nano::Signal<void(std::string, const parameter_data&)> ossia::net::device_base::on_add_node_requested |
Called when a network client requests the creation of an instance. First argument is the path to the parent.
Nano::Signal<void(std::string, std::string)> ossia::net::device_base::on_remove_node_requested |
Called when a network client requests the removal of an instance. Argument is the path of the parent and the node to remove.
Nano::Signal<void(std::string, std::string)> ossia::net::device_base::on_rename_node_requested |
Called when a network client requests the renaming of a node Argument is the node to rename and the new name