Zenoh Session

Methods

  • Closes a session, cleaning up the resource in Zenoh

    Returns Promise<void>

    Nothing

  • Declares a new Publisher

    Parameters

    • keyexpr: IntoKeyExpr

      string of key_expression

    • publisher_opts: PublisherOptions

      Optional, set of options to be used when declaring a publisher

    Returns Publisher

    Publisher

    If a Queryable is created with a callback, it cannot be simultaneously polled for new Query's

  • Declares a new Queryable

    Parameters

    • key_expr: IntoKeyExpr

      string of key_expression

    • Optionalqueryable_opts: QueryableOptions

      Optional additional settings for a Queryable [QueryableOptions]

    Returns Promise<Queryable>

    Queryable

    If a Queryable is created with a callback, it cannot be simultaneously polled for new Query's

  • Declares a new subscriber

    Parameters

    • key_expr: IntoKeyExpr

      string of key_expression

    • handler: Handler | ((sample: Sample) => Promise<void>) = ...

      Either a HandlerChannel or a Callback Function to be called for all samples

    Returns Promise<Subscriber>

    Subscriber

    If a Subscriber is created with a callback, it cannot be simultaneously polled for new values

  • Executes a Delete on a session, for a specific key expression KeyExpr

    Parameters

    • into_key_expr: IntoKeyExpr

      something that implements intoKeyExpr

    • Optionaldelete_opts: DeleteOpts

      optional additional parameters to go with a delete function

    Returns void

    void

  • Issues a get query on a Zenoh session

    Parameters

    • into_selector: IntoSelector

      representing a KeyExpr and Parameters

    • handler: Handler | ((sample: Reply) => Promise<void>) = ...
    • Optionalget_options: GetOptions

    Returns Promise<undefined | Receiver>

    Receiver

  • Puts a value on the session, on a specific key expression KeyExpr

    Parameters

    • into_key_expr: IntoKeyExpr

      something that implements intoKeyExpr

    • into_zbytes: IntoZBytes

      something that implements intoValue

    • Optionalput_opts: PutOptions

      an interface for the options settings on puts

    Returns void

    void

  • Creates a new Session instance

    Parameters

    • config: Config

      Config for session

    Returns Promise<Session>

    Typescript instance of a Session

    Opens A Zenoh Session