Skip to content

Instantly share code, notes, and snippets.

@gianpiero
gianpiero / printXML.c
Last active January 29, 2024 19:29
example on how to print a type in IDL or XML
#define PRINT_IDL 0
#define PRINT_XML 1
#define PRINT_COMPLETE_TYPE 0
#define PRINT_TOP_LEVEL_TYPE 1
/*
* This function takes a serialized type object and prints it in either XML or IDL format.
*
* Parameters:
* - ser_type_obj: A pointer to the serialized type object.
<!DOCTYPE html>
<html lang="en">
<!--
(c) 2005-2019 Copyright, Real-Time Innovations. All rights reserved.
No duplications, whole or partial, manual or electronic, may be made
without express written permission. Any such copies, or revisions thereof,
must display this notice unaltered.
This code contains trade secrets of Real-Time Innovations, Inc.
-->
<?xml version="1.0" encoding="UTF-8"?>
<!--
(c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved.
No duplications, whole or partial, manual or electronic, may be made
without express written permission. Any such copies, or revisions thereof,
must display this notice unaltered.
This code contains trade secrets of Real-Time Innovations, Inc.
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/5.3.1/rti_dds_profiles.xsd" version="5.3.1">
<!-- types -->
@gianpiero
gianpiero / ShapeExample.xml
Created August 28, 2018 18:53
extremely-slow-functions-rti-connext-python-connector
<?xml version="1.0" encoding="UTF-8"?>
<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. The Software is provided "as is", with no warranty
of any type, including any warranty for fitness for any purpose. RTI is under
no obligation to maintain or support the Software. RTI shall not be liable for
any incidental or consequential damages arising out of the use or inability to
use the software.
##############################################################################
# Copyright (c) 2005-2015 Real-Time Innovations, Inc. All rights reserved.
# Permission to modify and use for internal purposes granted.
# This software is provided "as is", without warranty, express or implied.
##############################################################################
"""Samples's reader."""
from __future__ import print_function
from sys import path as sysPath
from os import path as osPath
@gianpiero
gianpiero / EnumExample.xml
Created January 23, 2018 23:10
Example on how to set an enum with python
<?xml version="1.0" encoding="UTF-8"?>
<dds>
<types>
<enum name="COLOR">
<enumerator name="RED" value="0"/>
<enumerator name="BLUE" value="1"/>
<enumerator name="YELLOW" value="2"/>
</enum>
<struct name="Foo">
<member name="id" type="long"/>
@gianpiero
gianpiero / rticonnextdds_connector.py
Created October 2, 2017 20:43
rticonnextdds_connector.py with temp fix for mem leak
##############################################################################
# (c) 2005-2015 Copyright, Real-Time Innovations, All rights reserved. #
# #
# RTI grants Licensee a license to use, modify, compile, and create #
# derivative works of the Software. Licensee has the right to distribute #
# object form only for use with RTI products. The Software is provided #
# "as is", with no warranty of any type, including any warranty for fitness #
# for any purpose. RTI is under no obligation to maintain or support the #
# Software. RTI shall not be liable for any incidental or consequential #
# damages arising out of the use or inability to use the software. #
<?xml version="1.0"?>
<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. The Software is provided "as is", with no warranty
of any type, including any warranty for fitness for any purpose. RTI is under
no obligation to maintain or support the Software. RTI shall not be liable for
any incidental or consequential damages arising out of the use or inability to
use the software.
<?xml version="1.0"?>
<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. The Software is provided "as is", with no warranty
of any type, including any warranty for fitness for any purpose. RTI is under
no obligation to maintain or support the Software. RTI shall not be liable for
any incidental or consequential damages arising out of the use or inability to
use the software.
<?xml version="1.0"?>
<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. The Software is provided "as is", with no warranty
of any type, including any warranty for fitness for any purpose. RTI is under
no obligation to maintain or support the Software. RTI shall not be liable for
any incidental or consequential damages arising out of the use or inability to
use the software.