| RPMsg-Lite User's Guide Rev. 2.0.2 NXP Semiconductors

- Main Page
- API Reference

Classes | Macros | Typedefs | Enumerations | Functions
RPMsg Name Service Component

This section describes the RPMsg Name Service component that allows: More...

## Overview

This section describes the RPMsg Name Service component that allows:

- Transmission of named endpoint creation and deletion announcement.
- Reception of the announcements.

## Classes
struct | rpmsg_ns_callback_data
struct | rpmsg_ns_handle
struct | rpmsg_ns_static_context

## Macros
#define | RL_NS_EPT_ADDR

## Typedefs
typedef void(* | rpmsg_ns_new_ept_cb) (unsigned int new_ept, const char *new_ept_name, unsigned long flags, void *user_data)
| New endpoint NS callback function type.

## Enumerations
enum | rpmsg_ns_flags { RL_NS_CREATE, RL_NS_DESTROY }

## Functions
rpmsg_ns_handle | rpmsg_ns_bind (struct rpmsg_lite_instance *rpmsg_lite_dev, rpmsg_ns_new_ept_cb app_cb, void *user_data)
| Registers application nameservice callback. More...
int | rpmsg_ns_unbind (struct rpmsg_lite_instance *rpmsg_lite_dev, rpmsg_ns_handle handle)
| Unregisters application nameservice callback and cleans up. More...
int | rpmsg_ns_announce (struct rpmsg_lite_instance *rpmsg_lite_dev, struct rpmsg_lite_endpoint *new_ept, char *ept_name, unsigned long flags)
| Sends name service announcement to remote device. More...

## Class Documentation

struct rpmsg_ns_callback_data

Class Members
rpmsg_ns_new_ept_cb | cb |
void * | user_data |

struct rpmsg_ns_context

Class Members
struct rpmsg_lite_endpoint * | ept |
struct rpmsg_ns_callback_data * | cb_ctxt |

struct rpmsg_ns_static_context_container

Class Members
struct rpmsg_lite_ept_static_context | ept_ctxt |
struct rpmsg_ns_callback_data | cb_ctxt |
struct rpmsg_ns_context | ns_ctxt |

## Function Documentation

rpmsg_ns_handle rpmsg_ns_bind | ( | struct rpmsg_lite_instance * | rpmsg_lite_dev,
|  | rpmsg_ns_new_ept_cb | app_cb,
|  | void * | user_data
| ) |  |

Registers application nameservice callback.

Parameters

  rpmsg_lite_dev | RPMsg-Lite instance
  app_cb | Application nameservice callback
  user_data | Application nameservice callback data

Returns
  NameService handle, to be kept for unbinding.

int rpmsg_ns_unbind | ( | struct rpmsg_lite_instance * | rpmsg_lite_dev,
|  | rpmsg_ns_handle | handle
| ) |  |

Unregisters application nameservice callback and cleans up.

Parameters

  rpmsg_lite_dev | RPMsg-Lite instance
  handle | NameService handle

Returns
  Status of function execution, RL_SUCCESS on success.

int rpmsg_ns_announce | ( | struct rpmsg_lite_instance * | rpmsg_lite_dev,
|  | struct rpmsg_lite_endpoint * | new_ept,
|  | char * | ept_name,
|  | unsigned long | flags
| ) |  |

Sends name service announcement to remote device.

Parameters

  rpmsg_lite_dev | RPMsg-Lite instance
  new_ept | New endpoint to announce
  ept_name | Name for the announced endpoint
  flags | Channel creation/deletion flags

Returns
  Status of function execution, RL_SUCCESS on success