Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
netmidi2_session Struct Reference

A Network MIDI2 session, representing a connection to a peer. More...

#include <zephyr/net/midi2.h>

Public Types

enum  {
  NETMIDI2_SESSION_NOT_INITIALIZED = 0 , NETMIDI2_SESSION_IDLE , NETMIDI2_SESSION_PENDING_INVITATION , NETMIDI2_SESSION_AUTH_REQUIRED ,
  NETMIDI2_SESSION_ESTABLISHED , NETMIDI2_SESSION_PENDING_RESET , NETMIDI2_SESSION_PENDING_BYE
}
 State of this session. More...

Data Fields

enum netmidi2_session:: { ... }  state
 State of this session.
uint16_t tx_ump_seq
 Sequence number of the next universal MIDI packet to send.
uint16_t rx_ump_seq
 Sequence number of the next universal MIDI packet to receive.
struct sockaddr_storage addr
 Remote address of the peer.
socklen_t addr_len
 Length of the peer's remote address.
struct netmidi2_epep
 The Network MIDI2 endpoint to which this session belongs.
const struct netmidi2_useruser
 The username to which this session belongs.
char nonce [16]
 The crypto nonce used to authorize this session.
struct net_buftx_buf
 The transmission buffer for that peer.
struct k_work tx_work
 The transmission work for that peer.

Detailed Description

A Network MIDI2 session, representing a connection to a peer.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

State of this session.

See also
User Datagram Protocol for Universal MIDI Packets: 6.1 Session States
Enumerator
NETMIDI2_SESSION_NOT_INITIALIZED 

The session is not in use.

NETMIDI2_SESSION_IDLE 

Device may be aware of each other (e.g.

through mDNS), however neither device has sent an Invitation. The two Devices are not in a Session.

NETMIDI2_SESSION_PENDING_INVITATION 

Client has sent Invitation, however the Host has not accepted the Invitation.

A Bye Command has not been sent or received.

NETMIDI2_SESSION_AUTH_REQUIRED 

Host has replied with Invitation Reply: Authentication Required or Invitation Reply: User Authentication Required.

No timeout has yet occurred. This state is different from Idle, because the Client and Host need to store the Nonce.

NETMIDI2_SESSION_ESTABLISHED 

Invitation accepted, UMP Commands can be exchanged.

NETMIDI2_SESSION_PENDING_RESET 

One Device has sent the Session Reset Command and is waiting for Session Reset Reply, and a timeout has not yet occurred.

NETMIDI2_SESSION_PENDING_BYE 

one Endpoint has sent Bye and is waiting for Bye Reply, and a timeout has not yet occurred.

Field Documentation

◆ addr

struct sockaddr_storage netmidi2_session::addr

Remote address of the peer.

◆ addr_len

socklen_t netmidi2_session::addr_len

Length of the peer's remote address.

◆ ep

struct netmidi2_ep* netmidi2_session::ep

The Network MIDI2 endpoint to which this session belongs.

◆ nonce

char netmidi2_session::nonce[16]

The crypto nonce used to authorize this session.

◆ rx_ump_seq

uint16_t netmidi2_session::rx_ump_seq

Sequence number of the next universal MIDI packet to receive.

◆ []

enum { ... } netmidi2_session::state

State of this session.

See also
User Datagram Protocol for Universal MIDI Packets: 6.1 Session States

◆ tx_buf

struct net_buf* netmidi2_session::tx_buf

The transmission buffer for that peer.

◆ tx_ump_seq

uint16_t netmidi2_session::tx_ump_seq

Sequence number of the next universal MIDI packet to send.

◆ tx_work

struct k_work netmidi2_session::tx_work

The transmission work for that peer.

◆ user

const struct netmidi2_user* netmidi2_session::user

The username to which this session belongs.


The documentation for this struct was generated from the following file: