Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
|
Topics | |
User Datagram Protocol for Universal MIDI Packets |
Data Structures | |
struct | netmidi2_user |
A username/password pair for user-based authentication. More... | |
struct | netmidi2_userlist |
A list of users for user-based authentication. More... | |
struct | netmidi2_session |
A Network MIDI2 session, representing a connection to a peer. More... | |
struct | netmidi2_ep |
A Network MIDI2.0 Endpoint. More... |
Macros | |
#define | NETMIDI2_NONCE_SIZE 16 |
Size, in bytes, of the nonce sent to the client for authentication. | |
#define | NETMIDI2_EP_DEFINE(_var_name, _ep_name, _piid, _port) |
Statically declare a Network (UDP) MIDI 2.0 endpoint host. | |
#define | NETMIDI2_EP_DEFINE_WITH_AUTH(_var_name, _ep_name, _piid, _port, _secret) |
Statically declare a Network (UDP) MIDI 2.0 endpoint host, with a predefined shared secret key for authentication. | |
#define | NETMIDI2_EP_DEFINE_WITH_USERS(_var_name, _ep_name, _piid, _port, ...) |
Statically declare a Network (UDP) MIDI 2.0 endpoint host, with a predefined list of users/passwords for authentication. |
Enumerations | |
enum | netmidi2_auth_type { NETMIDI2_AUTH_NONE , NETMIDI2_AUTH_SHARED_SECRET , NETMIDI2_AUTH_USER_PASSWORD } |
Type of authentication in Network MIDI2. More... |
Functions | |
int | netmidi2_host_ep_start (struct netmidi2_ep *ep) |
Start hosting a network (UDP) Universal MIDI Packet endpoint. | |
void | netmidi2_broadcast (struct netmidi2_ep *ep, const struct midi_ump ump) |
Send a Universal MIDI Packet to all clients connected to the endpoint. | |
void | netmidi2_send (struct netmidi2_session *sess, const struct midi_ump ump) |
Send a Universal MIDI Packet to a single client. |
#define NETMIDI2_EP_DEFINE | ( | _var_name, | |
_ep_name, | |||
_piid, | |||
_port ) |
#include <zephyr/net/midi2.h>
Statically declare a Network (UDP) MIDI 2.0 endpoint host.
_var_name | The name of the variable holding the server data |
_ep_name | The UMP endpoint name |
_piid | The UMP Product Instance ID. If NULL, HWINFO device ID will be used at runtime. |
_port | The UDP port to listen to, or 0 for automatic assignment |
#define NETMIDI2_EP_DEFINE_WITH_AUTH | ( | _var_name, | |
_ep_name, | |||
_piid, | |||
_port, | |||
_secret ) |
#include <zephyr/net/midi2.h>
Statically declare a Network (UDP) MIDI 2.0 endpoint host, with a predefined shared secret key for authentication.
_var_name | The name of the variable holding the server data |
_ep_name | The UMP endpoint name |
_piid | The UMP Product Instance ID. If NULL, HWINFO device ID will be used at runtime. |
_port | The UDP port to listen to, or 0 for automatic assignment |
_secret | The shared secret key clients must provide to connect |
#define NETMIDI2_EP_DEFINE_WITH_USERS | ( | _var_name, | |
_ep_name, | |||
_piid, | |||
_port, | |||
... ) |
#include <zephyr/net/midi2.h>
Statically declare a Network (UDP) MIDI 2.0 endpoint host, with a predefined list of users/passwords for authentication.
_var_name | The name of the variable holding the server data |
_ep_name | The UMP endpoint name |
_piid | The UMP Product Instance ID. If NULL, HWINFO device ID will be used at runtime. |
_port | The UDP port to listen to, or 0 for automatic assignment |
... | The username/password pairs (struct netmidi2_user) |
Example usage:
#define NETMIDI2_NONCE_SIZE 16 |
#include <zephyr/net/midi2.h>
Size, in bytes, of the nonce sent to the client for authentication.
enum netmidi2_auth_type |
#include <zephyr/net/midi2.h>
Type of authentication in Network MIDI2.
Enumerator | |
---|---|
NETMIDI2_AUTH_NONE | No authentication required. |
NETMIDI2_AUTH_SHARED_SECRET | Authentication with a shared secret key. |
NETMIDI2_AUTH_USER_PASSWORD | Authentication with username and password. |
void netmidi2_broadcast | ( | struct netmidi2_ep * | ep, |
const struct midi_ump | ump ) |
#include <zephyr/net/midi2.h>
Send a Universal MIDI Packet to all clients connected to the endpoint.
ep | The endpoint | |
[in] | ump | The packet to send |
int netmidi2_host_ep_start | ( | struct netmidi2_ep * | ep | ) |
#include <zephyr/net/midi2.h>
Start hosting a network (UDP) Universal MIDI Packet endpoint.
ep | The network endpoint to start |
void netmidi2_send | ( | struct netmidi2_session * | sess, |
const struct midi_ump | ump ) |
#include <zephyr/net/midi2.h>
Send a Universal MIDI Packet to a single client.
sess | The session identifying the single client | |
[in] | ump | The packet to send |