Radio.create

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with " '''radio.create''' is a message sent to request creation of a radio interface. ===Parameters=== ;radio_driver : Optional radio driver (module) name. If present only modu...")
 

Latest revision as of 11:15, 25 May 2018

radio.create is a message sent to request creation of a radio interface.

[edit] Parameters

radio_driver
Optional radio driver (module) name. If present only modules matching it will handle the message
radio_params_prefix
Optional prefix for radio init parameters. Defaults to radio.
Message parameters starting with indicated prefix will be used to create the radio interface

[edit] Return

Success (message dispatch return true)
A RadioInterface pointer is returned in interface parameter
Failure (message dispatch return false)
code (RadioInterface error code) parameter may be returned along with other parameters describing the failure

[edit] Usage example

Message m("radio.create");
// Set some radio related params ...
Engine::dispatch(m);
NamedPointer* np = YOBJECT(NamedPointer,m.getParam(YSTRING("interface")));
RadioInterface* r = np ? YOBJECT(RadioInterface,np) : 0;
if (r) {
    // Remove pointer from 'np': take ownership
    np->takeData();
    // Use the RadioInterface. You are owning the pointer now!
}
else {
    // Failure !
}
Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers