cyclors 0.4.0

Low-level API for the native CycloneDDS bindings (libddsc-sys).
Documentation
// Copyright(c) 2021 to 2022 ZettaScale Technology and others
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
// v. 1.0 which is available at
// http://www.eclipse.org/org/documents/edl-v10.php.
//
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause

#if defined(__IDLC__)

struct test_basic {
  long field1;
};

#else

#include "dds/ddsrt/heap.h"
#include "common.h"
#include "test_basic.h"

const dds_topic_descriptor_t *desc = &test_basic_desc;

void init_sample (void *s)
{
  test_basic *s1 = (test_basic *) s;
  s1->field1 = 123;
}

int cmp_sample (const void *sa, const void *sb)
{
  test_basic *a = (test_basic *) sa;
  test_basic *b = (test_basic *) sb;
  return (a->field1 > b->field1) ? 1 : -1 * (a->field1 < b->field1);
}

NO_KEY_CMP

#endif