RTI Connext .Net APIs  Version 5.3.1

<<interface>> <<generic>> User data type specific interface. More...

#include <managed_topic.h>

Inheritance diagram for FooTypeSupport:
DDS::TypeSupport

Static Public Member Functions

static System::String ^ get_type_name ()
 Get the default name for this type. More...
 
static void register_type (DDS::DomainParticipant^ participant, System::String^ type_name)
 Allows an application to communicate to RTI Connext the existence of a data type. More...
 
static void unregister_type (DDS::DomainParticipant^ participant, System::String^ type_name)
 <<extension>> Allows an application to unregister a data type from RTI Connext. After calling unregister_type, no further communication using that type is possible. More...
 
static Foocreate_data ()
 <<extension>> Create a data type and initialize it. More...
 
static void delete_data (Foo^ a_data)
 <<extension>> Destroy a user data type instance. More...
 
static void print_data (Foo^ a_data)
 <<extension>> Print value of data type to standard out. More...
 
static void copy_data (Foo^ dst_data, Foo^ src_data)
 <<extension>> Copy data type. More...
 
static void serialize_data_to_cdr_buffer (array< System::Byte >^ buffer, System::UInt32% length, Foo^ a_data)
 <<extension>> Serializes the input sample into a buffer of octets. More...
 
static void deserialize_data_from_cdr_buffer (Foo^ a_data, array< System::Byte >^ buffer, System::UInt32 length)
 <<extension>> Deserializes a sample from a buffer of octets. More...
 
static void data_to_string (Foo^ src, PrintFormatProperty^ formatProperty)
 <<extension>> Transforms a data sample into a human-readable string representation. More...
 
static void data_to_string (Foo^ src)
 <<extension>> Transforms a data sample into a human-readable string representation using the default values for DDS::PrintFormatProperty. More...
 
static DDS::TypeCodeget_typecode ()
 <<extension>> Retrieves the TypeCode for the Type. More...
 

Detailed Description

<<interface>> <<generic>> User data type specific interface.

Defines the user data type specific interface generated for each application class.

The concrete user data type automatically generated by the implementation is an incarnation of this class.

See also
rtiddsgen

Member Function Documentation

◆ get_type_name()

static System::String ^ FooTypeSupport::get_type_name ( )
static

Get the default name for this type.

Can be used for calling FooTypeSupport::register_type or creating DDS::Topic

Returns
default name for this type
See also
FooTypeSupport::register_type
DDS::DomainParticipant::create_topic

◆ register_type()

static void FooTypeSupport::register_type ( DDS::DomainParticipant participant,
System::String^  type_name 
)
static

Allows an application to communicate to RTI Connext the existence of a data type.

The generated implementation of the operation embeds all the knowledge that has to be communicated to the middleware in order to make it able to manage the contents of data of that type. This includes in particular the key definition that will allow RTI Connext to distinguish different instances of the same type.

The same DDS::TypeSupport can be registered multiple times with a DDS::DomainParticipant using the same or different values for the type_name. If register_type is called multiple times on the same DDS::TypeSupport with the same DDS::DomainParticipant and type_name, the second (and subsequent) registrations are ignored but the operation returns DDS::Exception::RETCODE_OK.

Precondition
Cannot use the same type_name to register two different DDS::TypeSupport with the same DDS::DomainParticipant, or else the operation will fail and DDS::Retcode_PreconditionNotMet will be returned.
Parameters
participant<<in>> the DDS::DomainParticipant to register the data type Foo with. Cannot be NULL.
type_name<<in>> the type name under with the data type Foo is registered with the participant; this type name is used when creating a new DDS::Topic. (See DDS::DomainParticipant::create_topic.) The name may not be NULL or longer than 255 characters.
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_PreconditionNotMet or DDS::Retcode_OutOfResources.
MT Safety:
UNSAFE on the FIRST call. It is not safe for two threads to simultaneously make the first call to register a type. Subsequent calls are thread safe.
See also
DDS::DomainParticipant::create_topic

◆ unregister_type()

static void FooTypeSupport::unregister_type ( DDS::DomainParticipant participant,
System::String^  type_name 
)
static

<<extension>> Allows an application to unregister a data type from RTI Connext. After calling unregister_type, no further communication using that type is possible.

The generated implementation of the operation removes all the information about a type from RTI Connext. No further communication using that type is possible.

Precondition
A type with type_name is registered with the participant and all DDS::Topic objects referencing the type have been destroyed. If any DDS::Topic is associated with the type, the operation will fail with DDS::Retcode_Error.
Postcondition
All information about the type is removed from RTI Connext. No further communication using this type is possible.
Parameters
participant<<in>> the DDS::DomainParticipant to unregister the data type Foo from. Cannot be NULL.
type_name<<in>> the type name under with the data type Foo is registered with the participant. The name should match a name that has been previously used to register a type with the participant. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_BadParameter or DDS::Retcode_Error
MT Safety:
SAFE.
See also
FooTypeSupport::register_type

◆ create_data()

static Foo ^ FooTypeSupport::create_data ( )
static

<<extension>> Create a data type and initialize it.

The generated implementation of the operation knows how to instantiate a data type and initialize it properly.

By default all memory for the type is deeply allocated, except for optional members.

Returns
Newly created data type, or NULL on failure.
See also
FooTypeSupport::delete_data

◆ delete_data()

static void FooTypeSupport::delete_data ( Foo a_data)
static

<<extension>> Destroy a user data type instance.

The generated implementation of the operation knows how to destroy a data type and return all resources.

Parameters
a_data<<in>> Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
See also
FooTypeSupport::create_data

◆ print_data()

static void FooTypeSupport::print_data ( Foo a_data)
static

<<extension>> Print value of data type to standard out.

The generated implementation of the operation knows how to print value of a data type.

Parameters
a_data<<in>> Data type to be printed.

◆ copy_data()

static void FooTypeSupport::copy_data ( Foo dst_data,
Foo src_data 
)
static

<<extension>> Copy data type.

The generated implementation of the operation knows how to copy value of a data type.

Parameters
dst_data<<inout>> Data type to copy value to. Cannot be NULL.
src_data<<in>> Data type to copy value from. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ serialize_data_to_cdr_buffer()

static void FooTypeSupport::serialize_data_to_cdr_buffer ( array< System::Byte >^  buffer,
System::UInt32%  length,
Foo a_data 
)
static

<<extension>> Serializes the input sample into a buffer of octets.

This method serializes a sample into a buffer of octets and it uses CDR as the data representation.

The input buffer must be big enough to store the serialized representation of the sample. Otherwise, the method will return an error.

To determine the minimum size of the input buffer, the user must call this method with the buffer set to null.

Parameters
a_data<<in>>. Input sample. Cannot be null.
buffer<<out>>. Serialization buffer.
length<<inout>>. When buffer is set to null, after the method executes, length will contain a buffer size big enough to hold the serialized data. When buffer is not null, length must contain the size of the input buffer when the method is invoked. After the method executes, length will be updated to contain the actual size of the serialized content, which may be smaller than the size obtained when buffer is set to null.
Exceptions
Oneof the Standard Return Codes

◆ deserialize_data_from_cdr_buffer()

static void FooTypeSupport::deserialize_data_from_cdr_buffer ( Foo a_data,
array< System::Byte >^  buffer,
System::UInt32  length 
)
static

<<extension>> Deserializes a sample from a buffer of octets.

This method deserializes a sample from a CDR buffer of octets.

The content of the buffer generated by the method FooTypeSupport::serialize_data_to_cdr_buffer can be provided to this method to get the sample back.

Parameters
a_data<<out>>. Output sample. Cannot be null.
buffer<<in>>. Deserialization buffer. Cannot be null.
length<<in>>. Length of the serialized representation of the sample in the buffer.
Exceptions
Oneof the Standard Return Codes

◆ data_to_string() [1/2]

static void FooTypeSupport::data_to_string ( Foo src,
PrintFormatProperty^  formatProperty 
)
static

<<extension>> Transforms a data sample into a human-readable string representation.

This method takes a data sample and creates a string representation of the data.

If the size of the output string is longer than the size of an unsigned 32-bit integer, this operation will fail with DDS::Retcode_OutOfResources.

This method is only provided for types that were generated with typecodes.

Parameters
src<<out>>. The sample to get the string representation of. Cannot be null.
formatProperty<<in>>. Properties describing what the format of the output string should be.
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_OutOfResources

◆ data_to_string() [2/2]

static void FooTypeSupport::data_to_string ( Foo src)
static

<<extension>> Transforms a data sample into a human-readable string representation using the default values for DDS::PrintFormatProperty.

See also
FooTypeSupport::data_to_string

◆ get_typecode()

static DDS::TypeCode ^ FooTypeSupport::get_typecode ( )
static

<<extension>> Retrieves the TypeCode for the Type.

This method retrieves the DDS::TypeCode for the Type. A DDS::TypeCode is a mechanism for representing a type at runtime. RTI Connext can use type codes to send type definitions on the network. A DDS::TypeCode value consists of a type code kind (represented by the DDS::TCKind enumeration) and a list of members (that is, fields). These members are recursive: each one has its own DDS::TypeCode, and in the case of complex types (structures, arrays, and so on), these contained type codes contain their own members.

Returns
The TypeCode for this type

RTI Connext .Net APIs Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc