AllJoyn-跨平台方法调用返回值为自定义类型
来源:互联网 发布:淘宝盗用视频举报 编辑:程序博客网 时间:2024/06/14 08:39
AllJoyn-跨平台方法调用返回值为自定义类型
service端代码:
public class MyStruct{ @Position(0) public String fileName; @Position(1) public int isoValue; @Position(2) public boolean dateTaken; } @BusMethod(replySignature = "sib") MyStruct catStruct(String a,String b)throws BusException;方法实现:
public MyStruct catStruct(String a,String b){ MyStruct temp=new MyStruct(); temp.fileName=a; temp.isoValue=a.length(); temp.dateTaken=a.length()>b.length()?true:false; return temp; }client端:
增加的接口方法:
testIntf->AddMethod("catStruct", "ss", "sib", "inStr1,inStr2,outStrStruct", 0);调用:
QStatus status = remoteObj.MethodCall(INTERFACE_NAME, "catStruct", inputs, 2, reply, 5000);解析自定义类型的数据:
//structstruct {char* str1;int aInt;bool bBool;}myStruct;printf("%s\n",reply->GetSignature());reply->GetArgs("sib", &myStruct.str1, &myStruct.aInt, &myStruct.bBool);printf("%s-%d-%s\n", myStruct.str1, myStruct.aInt, myStruct.bBool == true ? "true" : "false");调用实现结果截图:
0 0
- AllJoyn-跨平台方法调用返回值为自定义类型
- AllJoyn-跨平台方法调用返回值为数组(Arrays)
- AllJoyn-跨平台方法调用返回值为键值对(Maps)
- AllJoyn+Android+C++开发案例-android和windows跨设备跨平台调用方法
- java调用.netwebservice的方法,返回类型为XmlDocument
- @RequestMapping方法返回值为String类型
- dwr 调用返回值类型为java.util.List 的方法
- XFire实现自定义类型参数传递和调用返回自定义类型方法
- AllJoyn+C++开发案例-windows跨设备调用方法
- AllJoyn+Android开发案例-android跨设备调用方法
- 动态类型调用方法的参数和返回值
- Dwr框架在客户端远程调用方法返回自定义类型的例子
- 通过HttpClient调用WebApi的Get、Post方法(返回类型限定为json格式)
- 函数返回值为自定义的类型与引用类型的区别
- webservice Xfire 调用 返回值类型为map时,数据为空的问题
- DEDECMS自定义字段为附件类型调用链接地址的方法
- 调用Ping 命令及返回值,跨平台
- android OKHttp 调用有返回值的方法,返回值为null
- Linux Kernel Release Versions
- hdoj 5025 Saving Tang Monk
- ZOJ 3490 String Successor(模拟)
- GridView如何使得item之间的距离和左右侧距离相等
- nrf51822 --- 主从通信(2)
- AllJoyn-跨平台方法调用返回值为自定义类型
- 物联网与穿戴设备专题(3)——玩转mt2502之LinkitOne深度评测
- PHP开放源代码的Web主流统计软件piwik
- layer-list 画View两面边框方法
- 获取版本号iOS
- zookeeper的集群安装
- 十六进制转字符串StrToHex,字符串转十六进制HexToStr
- ZOJ 3498 Javabeans
- Delphi快捷键