Lines Matching +full:initial +full:- +full:timeout +full:- +full:ms

3  * SPDX-License-Identifier: Apache-2.0
191 #define ZBUS_MIN_THREAD_PRIORITY (CONFIG_NUM_PREEMPT_PRIORITIES - 1)
200 return -EFAULT; \
209 #define _ZBUS_CHAN_NAME(_chan) (_chan)->name
217 #define _ZBUS_OBS_NAME(_obs) (_obs)->name
238 COND_CODE_0(/* are there zero non-empty arguments ? */ \
272 /* clang-format off */
275 .observers_start_idx = -1, \
276 .observers_end_idx = -1, \
296 /* clang-format on */
300 /* clang-format off */
322 /* clang-format on */
422 * @param[in] _val Variadic with the initial values. ``ZBUS_INIT(0)`` means ``{0}``, as
427 /* clang-format off */
438 * @param[in] _enable The subscriber initial enable state.
457 /* clang-format on */
473 /* clang-format off */
484 * @param[in] _enable The listener initial enable state.
499 /* clang-format on */
513 /* clang-format off */
523 * @param[in] _enable The subscriber's initial state.
539 /* clang-format on */
562 * @param timeout Waiting period to publish the channel,
566 * @retval -ENOMSG The message is invalid based on the validator function or some of the
568 * @retval -EBUSY The channel is busy.
569 * @retval -EAGAIN Waiting period timed out.
570 * @retval -EFAULT A parameter is incorrect, the notification could not be sent to one or more
574 int zbus_chan_pub(const struct zbus_channel *chan, const void *msg, k_timeout_t timeout);
584 * @param[in] timeout Waiting period to read the channel,
588 * @retval -EBUSY The channel is busy.
589 * @retval -EAGAIN Waiting period timed out.
590 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
593 int zbus_chan_read(const struct zbus_channel *chan, void *msg, k_timeout_t timeout);
607 * @param[in] timeout Waiting period to claim the channel,
611 * @retval -EBUSY The channel is busy.
612 * @retval -EAGAIN Waiting period timed out.
613 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
616 int zbus_chan_claim(const struct zbus_channel *chan, k_timeout_t timeout);
629 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
641 * @param timeout Waiting period to notify the channel,
645 * @retval -EBUSY The channel's semaphore returned without waiting.
646 * @retval -EAGAIN Timeout to take the channel's semaphore.
647 * @retval -ENOMEM There is not more buffer on the messgage buffers pool.
648 * @retval -EFAULT A parameter is incorrect, the notification could not be sent to one or more
652 int zbus_chan_notify(const struct zbus_channel *chan, k_timeout_t timeout);
669 return chan->name; in zbus_chan_name()
704 return chan->message; in zbus_chan_msg()
725 return chan->message; in zbus_chan_const_msg()
741 return chan->message_size; in zbus_chan_msg_size()
757 return chan->user_data; in zbus_chan_user_data()
774 chan->data->msg_subscriber_pool = pool; in zbus_chan_set_msg_sub_pool()
784 * This function updates the publishing statistics for the @ref zbus_chan_claim ->
796 chan->data->publish_timestamp = k_uptime_ticks(); in zbus_chan_pub_stats_update()
797 chan->data->publish_count += 1; in zbus_chan_pub_stats_update()
813 return chan->data->publish_timestamp; in zbus_chan_pub_stats_last_time()
829 return chan->data->publish_count; in zbus_chan_pub_stats_count()
845 /* Not yet published, period = 0ms */ in zbus_chan_pub_stats_avg_period()
846 if (chan->data->publish_count == 0) { in zbus_chan_pub_stats_avg_period()
850 return k_uptime_get() / chan->data->publish_count; in zbus_chan_pub_stats_avg_period()
871 * @param timeout Waiting period to add an observer,
875 * @retval -EALREADY The observer is already present in the channel's runtime observers list.
876 * @retval -ENOMEM Returned without waiting.
877 * @retval -EAGAIN Waiting period timed out.
878 * @retval -EINVAL Some parameter is invalid.
881 k_timeout_t timeout);
890 * @param timeout Waiting period to remove an observer,
894 * @retval -EINVAL Invalid data supplied.
895 * @retval -EBUSY Returned without waiting.
896 * @retval -EAGAIN Waiting period timed out.
897 * @retval -ENODATA no observer found in channel's runtime observer list.
898 * @retval -ENOMEM Returned without waiting.
901 k_timeout_t timeout);
924 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
944 *enable = obs->data->enabled; in zbus_obs_is_enabled()
960 * @retval -ESRCH No observation found for the related pair chan/obs.
961 * @retval -EINVAL Some parameter is invalid.
975 * @retval -ESRCH No observation found for the related pair chan/obs.
976 * @retval -EINVAL Some parameter is invalid.
996 return obs->name; in zbus_obs_name()
1009 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
1020 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
1035 * @param[in] timeout Waiting period for a notification arrival,
1039 * @retval -ENOMSG Returned without waiting.
1040 * @retval -EAGAIN Waiting period timed out.
1041 * @retval -EINVAL The observer is not a subscriber.
1042 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
1046 k_timeout_t timeout);
1058 * @param[in] timeout Waiting period for a notification arrival,
1062 * @retval -EINVAL The observer is not a subscriber.
1063 * @retval -ENOMSG Could not retrieve the net_buf from the subscriber FIFO.
1064 * @retval -EILSEQ Received an invalid channel reference.
1065 * @retval -EFAULT A parameter is incorrect, or the function context is invalid (inside an ISR). The
1069 k_timeout_t timeout);