Contenido principal

setServerResponseNotRequired

R2026b

Constrain function prototype definitions of function elements from having output arguments

Since R2026b

    Description

    setServerResponseNotRequired(functionElem,serverResponseNotRequired) constrains the function prototype of function element functionElem from having output arguments.

    example

    Examples

    collapse all

    Create a software architecture model.

    model = systemcomposer.createModel("archModel","SoftwareArchitecture");
    systemcomposer.openModel("archModel");

    Create a service interface.

    interface = addServiceInterface(model.InterfaceDictionary,"myServiceInterface");

    Create a function element and set a function prototype without output arguments.

    element = addElement(interface,"notify");
    setFunctionPrototype(element,"notify(msg)");

    Explicitly configure one-way client-server communication by setting the ServerResponseNotRequired of the function element to true.

    setServerResponseNotRequired(element,true)

    Input Arguments

    collapse all

    Function element, specified as a systemcomposer.interface.FunctionElement object.

    Choose to constrain clients from requesting a response from a server, specified as 1 (true) or 0 (false). When set to true, the function element is configured for one-way client-server communication, its prototype cannot specify any output arguments.

    Data Types: logical

    More About

    collapse all

    Tips

    • Setting ServerResponseNotRequired to true errors if the function prototype includes output arguments. Remove output arguments from the prototype first by using the setFunctionPrototype function.

    • When ServerResponseNotRequired is true, you cannot set a function prototype that includes output arguments.

    Version History

    Introduced in R2026b

    See Also

    Functions

    Objects

    Blocks

    Tools