ZenohexPico (zenohex_pico v0.1.0-alpha.1)
Copy MarkdownZenohexPico is a thin Elixir wrapper around Zenoh-Pico, implemented using C.
For reusable connections, use ZenohexPico.Session directly.
Summary
Functions
@spec get( ZenohexPico.Config.t(), String.t(), pos_integer(), ZenohexPico.Session.get_opts() ) :: {:ok, [ZenohexPico.Sample.t() | ZenohexPico.Query.ReplyError.t()]} | {:error, :timeout} | {:error, reason :: term()}
Query data with the given selector.
Internally opens a session, performs the query, and ensures the session is closed.
Parameters
config: The configuration used to open the session.selector: The selector to query.timeout: Timeout in milliseconds to wait for query replies.opts: Additional options. SeeZenohexPico.Session.get/4for details.
@spec put( ZenohexPico.Config.t(), String.t(), binary(), ZenohexPico.Session.put_opts() ) :: :ok | {:error, reason :: term()}
Publishes a payload to the specified key_expr.
Internally opens a session, performs the publish, and ensures the session is closed.
Parameters
config: The configuration used to open the session.key_expr: The key expression to publish to.payload: The binary payload to publish.opts: Additional options. SeeZenohexPico.Session.put/4for details.