GSDFPacketSplDcps.cpp
Go to the documentation of this file.
00001 #include "opensplice_dds_comm/GSDFPacketSplDcps.h"
00002 #include "opensplice_dds_comm/ccpp_GSDFPacket.h"
00003 #include "dds_type_aliases.h"
00004 
00005 const char *
00006 __opensplice_dds_comm_GSDFPacket__name(void)
00007 {
00008     return (const char*)"opensplice_dds_comm::GSDFPacket";
00009 }
00010 
00011 const char *
00012 __opensplice_dds_comm_GSDFPacket__keys(void)
00013 {
00014     return (const char*)"";
00015 }
00016 
00017 #include <v_kernel.h>
00018 #include <v_topic.h>
00019 #include <os_stdlib.h>
00020 #include <string.h>
00021 #include <os_report.h>
00022 
00023 c_bool
00024 __opensplice_dds_comm_GSDFPacket__copyIn(
00025     c_base base,
00026     struct ::opensplice_dds_comm::GSDFPacket *from,
00027     struct _opensplice_dds_comm_GSDFPacket *to)
00028 {
00029     c_bool result = OS_C_TRUE;
00030     (void) base;
00031 
00032     to->packet_source = (c_long)from->packet_source;
00033     to->packet_version = (c_ushort)from->packet_version;
00034     to->packet_type = (c_ushort)from->packet_type;
00035 #ifdef OSPL_BOUNDS_CHECK
00036     if(from->packet_data){
00037         to->packet_data = c_stringNew(base, from->packet_data);
00038     } else {
00039         OS_REPORT (OS_ERROR, "copyIn", 0,"Member 'opensplice_dds_comm::GSDFPacket.packet_data' of type 'c_string' is NULL.");
00040         result = OS_C_FALSE;
00041     }
00042 #else
00043     to->packet_data = c_stringNew(base, from->packet_data);
00044 #endif
00045     to->package_check_sum = (c_longlong)from->package_check_sum;
00046     return result;
00047 }
00048 
00049 void
00050 __opensplice_dds_comm_GSDFPacket__copyOut(
00051     void *_from,
00052     void *_to)
00053 {
00054     struct _opensplice_dds_comm_GSDFPacket *from = (struct _opensplice_dds_comm_GSDFPacket *)_from;
00055     struct ::opensplice_dds_comm::GSDFPacket *to = (struct ::opensplice_dds_comm::GSDFPacket *)_to;
00056     to->packet_source = (::DDS::Long)from->packet_source;
00057     to->packet_version = (::DDS::UShort)from->packet_version;
00058     to->packet_type = (::DDS::UShort)from->packet_type;
00059     to->packet_data = DDS::string_dup(from->packet_data ? from->packet_data : "");
00060     to->package_check_sum = (::DDS::LongLong)from->package_check_sum;
00061 }
00062 


opensplice_dds_comm
Author(s):
autogenerated on Sat May 27 2017 02:42:59