博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
POGO c++ code
阅读量:4456 次
发布时间:2019-06-08

本文共 3426 字,大约阅读时间需要 11 分钟。

 

1 Tango::DevFloat DocDs::dev_simple(Tango::DevFloat argin)

2 {

3 Tango::DevFloat argout ;

4 DEBUG_STREAM << "DocDs::dev_simple(): entering... !" << endl;

5

6 // Add your own code to control device here

7

8 argout = argin * 2;

9 return argout;

10 }

 

1 Tango::DevVarLongArray *DocDs::dev_array(const Tango::DevVarLongArray *argin)

2 {

3 // POGO has generated a method core with argout allocation.

4 // If you would like to use a static reference without copying,

5 // See "TANGO Device Server Programmer’s Manual"

6 // (chapter x.x)

7 //------------------------------------------------------------

8 Tango::DevVarLongArray *argout = new Tango::DevVarLongArray();

9

10 DEBUG_STREAM << "DocDs::dev_array(): entering... !" << endl;

11

12 // Add your own code to control device here

13

14 long argin_length = argin->length();

15 argout->length(argin_length);

16 for (int i = 0;i < argin_length;i++)

17 (*argout)[i] = (*argin)[i] * 2;

18

19 return argout;

20 }

1 Tango::DevString DocDs::dev_string(Tango::DevString argin)

2 {

3 // POGO has generated a method core with argout allocation.

4 // If you would like to use a static reference without copying,

5 // See "TANGO Device Server Programmer’s Manual"

6 // (chapter x.x)

7 //------------------------------------------------------------

8 Tango::DevString argout;

9 DEBUG_STREAM << "DocDs::dev_string(): entering... !" << endl;

10

11 // Add your own code to control device here

12

13 cout << "the received string is " << argin << endl;

14

15 string str("Am I a good Tango dancer ?");

16 argout = new char[str.size() + 1];

17 strcpy(argout,str.c_str());

18

19 return argout;

20 }

 

1 Tango::DevVarStringArray *DocDs::dev_str_array()

2 {

3 // POGO has generated a method core with argout allocation.

4 // If you would like to use a static reference without copying,

5 // See "TANGO Device Server Programmer’s Manual"

6 // (chapter x.x)

7 //------------------------------------------------------------

8 Tango::DevVarStringArray *argout = new Tango::DevVarStringArray();

9

10 DEBUG_STREAM << "DocDs::dev_str_array(): entering... !" << endl;

11

12 // Add your own code to control device here

13

14 argout->length(3);

15 (*argout)[0] = CORBA::string_dup("Rumba");

16 (*argout)[1] = CORBA::string_dup("Waltz");

17 string str("Jerck");

18 (*argout)[2] = CORBA::string_dup(str.c_str());

19 return argout;

20 }

1 Tango::DevVarDoubleStringArray *DocDs::dev_struct()

2 {

3 // POGO has generated a method core with argout allocation.

4 // If you would like to use a static reference without copying,

5 // See "TANGO Device Server Programmer’s Manual"

6 // (chapter x.x)

7 //------------------------------------------------------------

8 Tango::DevVarDoubleStringArray *argout = new Tango::DevVarDoubleStringArray();

9

10 DEBUG_STREAM << "DocDs::dev_struct(): entering... !" << endl;

11

12 // Add your own code to control device here

13

14 argout->dvalue.length(3);

15 argout->dvalue[0] = 0.0;

16 argout->dvalue[1] = 11.11;

17 argout->dvalue[2] = 22.22;

18

19 argout->svalue.length(2);

20 argout->svalue[0] = CORBA::string_dup("Be Bop");

21 string str("Smurf");

22 argout->svalue[1] = CORBA::string_dup(str.c_str());

23

24 return argout;

25 }

 

 protected :

4 // Add your own data members here

5 //-----------------------------------------

6 Tango::DevString attr_str_array[5];

7 Tango::DevLong attr_rd;

8 Tango::DevLong attr_wr;

 

转载于:https://www.cnblogs.com/greencolor/archive/2013/01/02/2842501.html

你可能感兴趣的文章
MatLab Load cv::Mat 导入数据
查看>>
html+css相关笔记(一)
查看>>
基于块流协议保证音频优先发送
查看>>
关于互联网的一些数据
查看>>
nginx+lua_nginx+GraphicsMagick生成实时缩略图
查看>>
数据预处理:独热编码(One-Hot Encoding)
查看>>
python将对象名的字符串类型,转化为相应对象的操作方法
查看>>
如何删除Dead状态的container
查看>>
【NLP新闻-2013.06.03】New Book Where Humans Meet Machines
查看>>
mongodb安装4.0(rpm)
查看>>
DispatcherServlet的url mapping为“/”时,对根路径访问的处理
查看>>
备忘pwnable.kr 之passcode
查看>>
好久没敲代码了,手有点生——一个小小的时钟
查看>>
运算符 AS和IS 的区别
查看>>
(转)详解C中volatile关键字
查看>>
easyui时的时间格式yyyy-MM-dd与yyyy-MM-ddd HH:mm:ss
查看>>
专题:动态内存分配----基础概念篇
查看>>
Codeforces Round #426 (Div. 2) (A B C)
查看>>
The Most Simple Introduction to Hypothesis Testing
查看>>
UVA10791
查看>>