RTI Connext C API  Version 6.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
FooSeq Struct Reference

<<interface>> <<generic>> A type-safe, ordered collection of elements. The type of these elements is referred to in this documentation as Foo. More...

Detailed Description

<<interface>> <<generic>> A type-safe, ordered collection of elements. The type of these elements is referred to in this documentation as Foo.

For users who define data types in OMG IDL, this type corresponds to the IDL express sequence<Foo>.

For any user-data type Foo that an application defines for the purpose of data-distribution with RTI Connext, a FooSeq is generated. We refer to an IDL sequence<Foo> as FooSeq.

The state of a sequence is described by the properties 'maximum', 'length' and 'owned'.

  • The 'maximum' represents the size of the underlying buffer; this is the maximum number of elements it can possibly hold. It is returned by the FooSeq_get_maximum operation.
  • The 'length' represents the actual number of elements it currently holds. It is returned by the FooSeq_get_length operation.
  • The 'owned' flag represents whether the sequence owns the underlying buffer. It is returned by the FooSeq_has_ownership operation. If the sequence does not own the underlying buffer, the underlying buffer is loaned from somewhere else. This flag influences the lifecycle of the sequence and what operations are allowed on it. The general guidelines are provided below and more details are described in detail as pre-conditions and post-conditions of each of the sequence's operations:
    • If owned == DDS_BOOLEAN_TRUE, the sequence has ownership on the buffer. It is then responsible for destroying the buffer when the sequence is destroyed.

    • If the owned == DDS_BOOLEAN_FALSE, the sequence does not have ownership on the buffer. This implies that the sequence is loaning the buffer. The sequence cannot be destroyed until the loan is returned.

    • A sequence with a zero maximum always has owned == DDS_BOOLEAN_TRUE
See Also
FooDataWriter, FooDataReader, FooTypeSupport, rtiddsgen

RTI Connext C API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc