endurox.tpadvertise

endurox.tpadvertise(*args, **kwargs)

Overloaded function.

  1. tpadvertise(svcname: str, funcname: str, func: function) -> None

    Routine for advertising a service.

    This function applies to ATMI servers only.

    For more details see C call tpadvertise(3).

    raise AtmiException:
    Following error codes may be present:
    TPEINVAL - Service name empty or too long (longer than MAXTIDENT)
    TPELIMIT - More than 48 services attempted to advertise by the script.
    TPEMATCH - Service already advertised.
    TPEOS - System error.

    Parameters

    svcnamestr

    Service name to advertise

    funcnamestr

    Function name of the service

    funcobject

    Callback function used by service. Callback function receives Server object with which tprun() was started and second argument is args variable, which corresponds to TPSVCINFO class. The function must be a class function (i.e. not bound function).

  2. tpadvertise(svcname: str) -> None

    Routine for advertising a service. Perform advertise by given service name only. Actual callback function is resolved from the server object instance, which is passed to the tprun(). Enduro/X service function name is set to the name as service name.

    This function applies to ATMI servers only.

    For more details see C call tpadvertise(3).

    raise AtmiException:
    Following error codes may be present:
    TPEINVAL - Service name empty or too long (longer than MAXTIDENT)
    TPELIMIT - More than 48 services attempted to advertise by the script.
    TPEMATCH - Service already advertised.
    TPEOS - System error.

    Parameters

    svcnamestr

    Service name to advertise.