ddsJoySplDcps.cpp
Go to the documentation of this file.
00001 #include "ddsJoySplDcps.h"
00002 #include "ccpp_ddsJoy.h"
00003 
00004 char *
00005 __ddsJoy__name(void)
00006 {
00007     return CORBA::string_dup("ddsJoy");
00008 }
00009 
00010 char *
00011 __ddsJoy__keys(void)
00012 {
00013     return CORBA::string_dup("");
00014 }
00015 
00016 #include <v_kernel.h>
00017 #include <v_topic.h>
00018 #include <os_stdlib.h>
00019 #include <string.h>
00020 
00021 c_bool
00022 __ddsJoy__copyIn(
00023     c_base base,
00024     struct ddsJoy *from,
00025     struct _ddsJoy *to)
00026 {
00027     c_bool result = TRUE;
00028 
00029     if(result){
00030         extern c_bool __Header__copyIn(c_base, Header *, _Header *);
00031         result = __Header__copyIn(base, &from->header, &to->header);
00032     }
00033     {
00034 /* Code generated by ../../code/idl_genCorbaCxxCopyin.c at line 594 */
00035 
00036         static c_type type0 = NULL;
00037         c_type subtype0;
00038         c_long length0;
00039         c_float *dest0;
00040         ::ddsJoy::_axes_seq *src = &from->axes;
00041 
00042         if (type0 == NULL) {
00043             subtype0 = c_type(c_metaResolve (c_metaObject(base), "c_float"));
00044             type0 = c_metaSequenceTypeNew(c_metaObject(base),"C_SEQUENCE<c_float>",subtype0,0);
00045             c_free(subtype0);
00046         }
00047         length0 = (c_long)(*src).length();
00048 #ifdef OSPL_BOUNDS_CHECK
00049          dest0 = (c_float *)c_newSequence(c_collectionType(type0),length0);
00050         {
00051         /* Code generated by ../../code/idl_genCorbaCxxCopyin.c at line 1549 */
00052             c_float *buf0;
00053             buf0 = (c_float *)(*src).get_buffer();
00054             memcpy (dest0,buf0,length0*4);
00055         }
00056         to->axes = (c_sequence)dest0;
00057 #else
00058         dest0 = (c_float *)c_newSequence(c_collectionType(type0),length0);
00059         {
00060         /* Code generated by ../../code/idl_genCorbaCxxCopyin.c at line 1549 */
00061             c_float *buf0;
00062             buf0 = (c_float *)(*src).get_buffer();
00063             memcpy (dest0,buf0,length0*4);
00064         }
00065         to->axes = (c_sequence)dest0;
00066 #endif
00067     }
00068     {
00069 /* Code generated by ../../code/idl_genCorbaCxxCopyin.c at line 594 */
00070 
00071         static c_type type0 = NULL;
00072         c_type subtype0;
00073         c_long length0;
00074         c_long *dest0;
00075         ::ddsJoy::_buttons_seq *src = &from->buttons;
00076 
00077         if (type0 == NULL) {
00078             subtype0 = c_type(c_metaResolve (c_metaObject(base), "c_long"));
00079             type0 = c_metaSequenceTypeNew(c_metaObject(base),"C_SEQUENCE<c_long>",subtype0,0);
00080             c_free(subtype0);
00081         }
00082         length0 = (c_long)(*src).length();
00083 #ifdef OSPL_BOUNDS_CHECK
00084          dest0 = (c_long *)c_newSequence(c_collectionType(type0),length0);
00085         {
00086         /* Code generated by ../../code/idl_genCorbaCxxCopyin.c at line 1549 */
00087             c_long *buf0;
00088             buf0 = (c_long *)(*src).get_buffer();
00089             memcpy (dest0,buf0,length0*4);
00090         }
00091         to->buttons = (c_sequence)dest0;
00092 #else
00093         dest0 = (c_long *)c_newSequence(c_collectionType(type0),length0);
00094         {
00095         /* Code generated by ../../code/idl_genCorbaCxxCopyin.c at line 1549 */
00096             c_long *buf0;
00097             buf0 = (c_long *)(*src).get_buffer();
00098             memcpy (dest0,buf0,length0*4);
00099         }
00100         to->buttons = (c_sequence)dest0;
00101 #endif
00102     }
00103     return result;
00104 }
00105 
00106 void
00107 __ddsJoy__copyOut(
00108     void *_from,
00109     void *_to)
00110 {
00111     struct _ddsJoy *from = (struct _ddsJoy *)_from;
00112     struct ddsJoy *to = (struct ddsJoy *)_to;
00113     {
00114         extern void __Header__copyOut(void *, void *);
00115         __Header__copyOut((void *)&from->header, (void *)&to->header);
00116     }
00117     {
00118         long size0;
00119         c_float *src0 = (c_float *)from->axes;
00120         ::ddsJoy::_axes_seq *dst = &to->axes;
00121 
00122         size0 = c_arraySize(c_sequence(from->axes));
00123         to->axes.length(size0);
00124         {
00125             c_float *buf0;
00126             buf0 = (c_float *)(*dst).get_buffer();
00127             memcpy (buf0,src0,size0*4);
00128         }
00129     }
00130     {
00131         long size0;
00132         c_long *src0 = (c_long *)from->buttons;
00133         ::ddsJoy::_buttons_seq *dst = &to->buttons;
00134 
00135         size0 = c_arraySize(c_sequence(from->buttons));
00136         to->buttons.length(size0);
00137         {
00138             c_long *buf0;
00139             buf0 = (c_long *)(*dst).get_buffer();
00140             memcpy (buf0,src0,size0*4);
00141         }
00142     }
00143 }
00144 


proxyJoy
Author(s): Ronny Hartanto
autogenerated on Mon Oct 6 2014 06:54:35