RTAI API --- RPC functions

RTAI Linux实时操作系统原理剖析 本ppt文档详尽地剖析了x86架构下的RTAI工作原理,对基于双内核的实时Linux操作系统开发有一定的参考价值 立即下载
rt_rpc 
rt_rpc_if 
rt_rpc_until 
rt_rpc_timed 
rt_isrpc 

rt_return

please refer to: https://www.rtai.org/userfiles/documentation/magma/html/api

****************************************************************************************************************************************************************************

NAME

rt_rpc - make a remote procedure call


SYNOPSIS
#include "rtai_sched.h"
RT_TASK *rt_rpc (RT_TASK *task, unsigned int msg, unsigned int *reply);

DESCRIPTION
rt_rpc makes a Remote Procedure Call. RPC is like a send/receive pair. rt_rpc sends the message msg to the task task then waits until a reply is received. The caller task is always blocked and queued up. (Queueing may happen in priority order or on FIFO base. This is determined by compile time option MSG_PRIORD.) 
The receiver task may get the message with any rt_receive_* function. It can send the answer with rt_return. 
reply points to a buffer provided by the caller.


RETURN VALUE

On success, task (the pointer to the task that received the message) is returned. If message has not been sent (e.g. the task task was killed before receiving the message) 0 is returned. On other failure, a special value is returned as described below.
ERRORS
0
The receiver task was killed before receiving the message.
0xffff
task does not refer to a valid task.


BUGS
There is no guarantee, that the value of pointer task differs from 0xffff. In this theoretical case the caller cannot figure out if the operation was succesful or not.


SEE ALSO
rt_receive_*, rt_return, rt_isrpc.
*****************************************************************************************************************************************************
NAME

rt_rpc_if - make a remote procedure call if receiver is ready


SYNOPSIS

#include "rtai_sched.h"
RT_TASK *rt_rpc_if (RT_TASK *task, unsigned int msg, unsigned int *reply);

DESCRIPTION
rt_rpc_if tries to make a Remote Procedure Call. If the receiver task is ready to accept a message rt_rpc_if sends the message msg then waits until a reply is received. In this case the caller task is blocked and queued up. (Queueing may happen in priority order or on FIFO base. This is determined by compile time option MSG_PRIORD.) If the receiver is not ready rt_rpc_if returns immediately. 
The receiver task may get the message with any rt_receive_* function. It can send the answer with rt_return. 
reply points to a buffer provided by the caller.


RETURN VALUE
On success, task (the pointer to the task that received the message) is returned. If message has not been sent, 0 is returned. On other failure, a special value is returned as described below.
ERRORS
0
The task task was not ready to receive the message or it was killed before sending the reply.
0xffff
task does not refer to a valid task.
BUGS

There is no guarantee, that the value of pointer task differs from 0xffff. In this theoretical case the caller cannot figure out if the operation was succesful or not.
SEE ALSO
rt_receive_*, rt_return, rt_isrpc.
********************************************************************************************************************************************************


NAME
rt_rpc_until, rt_rpc_timed - make a remote procedure call with timeout


SYNOPSIS
#include "rtai_sched.h"
RT_TASK *rt_rpc_until (RT_TASK *task, unsigned int msg, unsigned int *reply, RTIME time);

RT_TASK *rt_rpc_timed (RT_TASK *task, unsigned int msg, unsigned int *reply, RTIME delay);


DESCRIPTION
rt_rpc_until and rt_rpc_timed make a Remote Procedure Call. They send the message msg to the task task then wait until a reply is received or a timeout occurs. The caller task is always blocked and queued up. (Queueing may happen in priority order or on FIFO base. This is determined by compile time option MSG_PRIORD.) 
The receiver task may get the message with any rt_receive_* function. It can send the answer with rt_return. 
reply points to a buffer provided by the caller. 
time is an absolute value. delay is relative to the current time.


RETURN VALUE
On success, task (the pointer to the task that received the message) is returned. If message has not been sent or no answer arrived, 0 is returned. On other failure, a special value is returned as described below.
ERRORS
0
The message could not be sent or the answer did not arrived in time.
0xffff
task does not refer to a valid task.
BUGS

There is no guarantee, that the value of pointer task differs from 0xffff. In this theoretical case the caller cannot figure out if the operation was succesful or not.
SEE ALSO

rt_receive_*, rt_return, rt_isrpc.
***********************************************************************************************************************************************************************************


NAME

rt_isrpc - check if sender waits for reply or not
SYNOPSIS

#include "rtai_sched.h"
int rt_isrpc (RT_TASK *task);

DESCRIPTION
After receiving a message, by calling rt_isrpc a task can figure out whether the sender task task is waiting for a reply or not.
No answer is required if the message sent by a rt_send_* function or the sender called rt_rpc_timed or rt_rpc_until but it is already timed out.
RETURN VALUE

If the task waits for a reply, a nonzero value is returned. Otherwise 0 is returned.


BUGS
rt_isrpc does not perform any check on pointer task. 
rt_isrpc cannot figure out what RPC result the sender is waiting for.
COMMENTS

rt_return is intelligent enough to not send an answer to a task which is not waiting for it. Therefore using rt_isrpc is not necessary and discouraged.
**********************************************************************************************************************************************************************************
NAME


rt_return - send back the result of a remote procedure call
SYNOPSIS


#include "rtai_sched.h"
RT_TASK *rt_return (RT_TASK *task, unsigned int result);

DESCRIPTION
rt_result sends the result result to the task task. If the task calling rt_rpc* previously is not waiting the answer (i.e. killed or timed out) this return message is silently discarded.


RETURN VALUE
On success, task (the pointer to the task that is got the the reply) is returned. If the reply message has not been sent, 0 is returned. On other failure, a special value is returned as described below.
ERRORS
0
The reply message was not delivered.
0xffff
task does not refer to a valid task.
BUGS

There is no guarantee, that the value of pointer task differs from 0xffff. In this theoretical case the caller cannot figure out if the operation was succesful or not.

RTAI_User_Manual RTAI_User_ManualRTAI_User_Manual 立即下载

相关推荐

AI大模型API中转站选型指南:12项关键指标与实战评估

随着AI大模型技术的快速迭代,企业面临着一个核心挑战:如何在基础模型频繁更新的背景下,为业务系统选择稳定可靠的API中转服务?本文基于真实生产环境测试数据,从12个关键维度系统评估主流API中转站平台,帮助技术团队在模型快速演进的生态中做出科学选型决策。 1. API中转站的核心价值与业务场景 1.1 什么是API中转站 API中转站(API Gateway/Aggregator)是连接业务系统与多个大模型厂商的中间层服务。它通过统一的接口封装了不同厂商的API协议差异,为企业提供标准化的模型调用能力。在实

weixin_29056101的博客 445

rpc 服务器不可用_RPC服务器不可用

rpc 服务器不可用I was just looking through my server logs and found a large number of search requests coming via Google for The RPC Server is Unavailable, the reason you will have found me through this sear...

cundai5745的博客 657

立创·庐山派-K230-CanMV(嘉楠勘智)开发板通过ATK-ESP8266实现图像识别数据无线传输至原子云

本文详细介绍了如何使用立创·庐山派-K230-CanMV开发板,通过ATK-ESP8266 WIFI模块实现图像识别数据的无线传输至原子云平台。内容包括硬件连接、软件环境搭建、AT指令控制、原子云连接及数据上传的全过程,并提供了实用的调试技巧和常见问题解决方案,为物联网应用开发提供了完整实践指南。

potato的博客 742

rpc调用方法找不到,提示java.lang.NoSuchMethodError:Ljava/lang/String的问题定位

我两个模块中都写了rpc类:com.a.RemoteHealthService。包名都是一致的,其实是其他同事做迁移的时候不规范。而我的新方法只在其中一个类中声明,会造成调用方偶现java.lang.NoSuchMethodError:Ljava/lang/String 的报错。出现这个问题的时候第一时间我怀疑是打包有问题,但是检查未发现异常。所以,rpc服务方定义名称要规范啊,不应该起重名方法!最后定位到是因为RPC服务有两个同名类和方法引起。也怀疑过JDK版本有问题,但也正常。

luanxunyao5509的博客 281

手机开发实战58——小区广播介绍2

业务 针对小区广播短消息的特点,可以提供一些基于目前短消息不能或不适合提供的服务: 1. 显示网络服务基站名称:用户可以随时了解手机登记在哪个基站下,特别是在边界交叉覆盖区域,用户可以清楚的知道通话建立在哪个基站下,在用户投诉和故障描述中也会有所帮助; 2. 提供用户问候信息:可以在覆盖机场、车站等地区的基站广播一些用户问候语或一些企业形象广告语; 3. 充分利用小区广播地

xjbclz的专栏 772

软件产品国际化:前后端及App多语言版本解决方案(超详细实现过程)

多语言版本解决方案是应对全球化趋势的关键策略,它通过构建灵活且可扩展的架构,支持软件产品在不同语言和文化环境下的顺畅运行与展示。此方案涵盖了前端多语言界面实现、后端多语言数据处理及大数据环境下的多语言支持等多个层面,确保公司能够高效地推出适应全球用户多样化需求的软件产品。在前端多语言界面实现方面,解决方案采用了国际化与本地化的结合方法。国际化过程确保软件的功能和代码设计能够处理多种语言和文化习惯,而本地化则针对特定地区进行界面和内容的调整。

大模型大数据攻城狮的专栏 2753

180719 安卓-RPC对象查找不到的问题分析

通/断网情况下都抓不到HTTP包,估计彻底废弃了HTTP接口,完全使用RPC方式连接 在程序中搜索了半天,只根据单词找到了HTTP接口,但是并不是APK真正使用的连接方式,所以还要继续追溯 这个APK中没有使用Native层,导入的库也很少,搜索socket才找到了一点调用,但最终也指向了HTTP 虽然关键目标的HTTP包没有抓到,但是有一个每次都会同时发生的HTTP请求(URL-A),猜测...

whklhhhh的博客 358

Python学习第32天:Web前端入门

本文介绍了Web前端开发三大核心技术:HTML、CSS和JavaScript。首先概述了HTML的发展历程和HTML5新特性,详细讲解了常用HTML标签如文本、列表、链接、图像、表格、表单等。其次介绍了CSS的基础语法、选择器、颜色字体设置、盒子模型和布局定位方法。最后简要提及JavaScript为网页添加交互功能的作用。文章为Python开发者提供了前端技术的基础知识,帮助理解网页的结构、样式和行为实现原理。

tigerhhzz的博客 1911

RTAI API---Timer functions

Timer functions: rt_set_oneshot_mode rt_set_periodic_mode start_rt_timer stop_rt_timer count2nano nano2count rt_get_time   rt_get_time_ns   rt_get_cpu_time_ns   next_period **********

changexhao的专栏 1163

【生信分析】clusterProfiler: universal enrichment tool for functional and comparative study(1)

clusterProfiler: universal enrichment tool for functional and comparative studyClusterProfiler: 用于功能和比较研究的通用富集工具总览1. 引言1.1 术语1.1.1 基因集和通路1.1.2 基因同源(GO)1.1.3 京都基因与基因组百科全书(KEGG)1.1.4 其他基因集2. 功能富集分析方法2.1 过度表征分析(Over Representation Analysis)2.2 基因集富集分析(Gene Se

小哲的博客 1365

Python之achatbot包语法、参数和实际应用案例

本书是一本PyTorch深度学习实战指南,分为基础(前6章)和进阶(后5章)两大部分。基础部分涵盖张量运算、神经网络、数据预处理及CNN等核心内容;进阶部分则深入图像、文本、音频建模技术,重点解析Transformer架构及大语言模型开发。全书采用"理论+实践"模式,适合从零基础到进阶的PyTorch学习者。

王国平的博客 632

RTAI的用户空间编程(八)——中断

RTAI的用户空间编程(八)——中断

千里之行,始于足下 972

华为OD机考双机位C卷 - 螺旋数字矩阵 (Java & Python& JS & C/C++ & GO )

华为OD机考双机位C卷 - 数字螺旋矩阵(OD上机考试双机位C卷)。提供在线OJ刷题。Java、C++、Python、GO语言、C语言、JavaScript题解,并提供完整思路讲解。

算法大师! 3217

RTAI的用户空间编程(三)——定期运行一个任务

RTAI的用户空间编程(三)——定期运行一个任务

千里之行,始于足下 1481

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

RTAI安装

5.1        RTAI安装 24.1.x,适合于2.4核心,主要采用rthal实现方案。3.x版本,适合2.4-2.6核心,采用了Adeos实现方案。最新版本为RTAI 3.3。(源代码中集成了Adeos补丁) 1.          在所有工作开始前,先来核对一下你的gcc版本。例如: # gcc –v Paolo Mantegazza教授(RTAI开发者)用的

bitrain的专栏 2198

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

RTAI API ---RTAI service functions

rt_global_cli rt_global_sti rt_global_save_flags rt_global_restore_flags rt_global_save_flags_and_cli send_ipi_shorthand send_ipi_logical rt_assign_irq_to_cpu rt_reset_irq_to_sym_mode rt_

changexhao的专栏 552

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

RTAI API---task function

rt_task_init  rt_task_init_cpuid  rt_task_delete  rt_task_make_periodic  rt_task_make_periodic_relative_ns  rt_task_wait_period  rt_task_yield  rt_task_suspend  rt_task_resume  rt_busy_sleep

changexhao的专栏 1176

RTAI API---Mailbox functions

rt_mbx_init rt_mbx_delete rt_mbx_send rt_mbx_receive rt_mbx_send_wp rt_mbx_receive_wp rt_mbx_send_if rt_mbx_receive_if rt_mbx_send_until rt_mbx_receive_until rt_mbx_send_timed rt_mbx

changexhao的专栏 815

简要描述linux系统从开机到登陆界面的启动过程

简述:1.开机BIOS自检2.MBR引导3.grub引导菜单4.加载内核kernel5.启动init进程6.读取inittab文件,执行rc.sysinit,rc等脚本7.启动mingetty,进入系统登陆界面来个简图:超详细描述linux系统从开机到登陆界面的启动过程对于linux系统的初学者来说,理解并掌握linux系统启动流程能够使你够深入的理解linux系统,还可以通过系统的启动过程来分析...

changexhao的专栏 1万+

RTAI的用户空间编程

任务创建实时任务的创建主要完成对代表实时任务实体的任务结构变量的初始化操作,包括分配任务栈、初始化任务栈、初始化链表指针等。 1. 函数RT_TASK* rt_task_init(unsigned long name, int priority, int stack_size, int max_msg_size) RT_TASK*rt_task_init_schmod(unsigned lo...

changexhao的专栏 1549

RTAI api ---Semaphore function

rt_sem_init  rt_sem_delete  rt_sem_signal  rt_sem_wait  rt_sem_wait_if  rt_sem_wait_until  rt_sem_wait_timed ********************************************************************************

changexhao的专栏 366

RTAI API-----Message handling functions

rt_send rt_receive rt_send_if rt_receive_if rt_send_until rt_receive_until rt_send_timed rt_receive_timed **********************************************************************************

changexhao的专栏 295

Makefile 模板

Makefile 自动编译目录下的源文件,支持添加头文件子目录和源文件子目录################################################################################# A smart Makefile template for GNU/LINUX programming## Author: wan.xp ( googoltec...

changexhao的专栏 281

理解 Linux 动态库加载:LD_LIBRARY_PATH

flyfish

二分掌柜的 346
上一篇: RTAI API-----Message handling functions
下一篇: RTAI API ---RTAI service functions
Vance2016
博客等级 码龄19年 361粉丝 14原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值