Struct rosidl_typesupport_introspection_c__MessageMember_s

Struct Documentation

struct rosidl_typesupport_introspection_c__MessageMember_s

Structure used to describe a single field of an interface type.

Public Members

const char *name_

The name of the field.

uint8_t type_id_

The type of the field as a value of the field types enum rosidl_typesupport_introspection_c_field_types. e.g. rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT

size_t string_upper_bound_

If the field is a string, the upper bound on the length of the string.

const rosidl_message_type_support_t *members_

If the type_id_ value is rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, this points to an array describing the fields of the sub-interface.

bool is_array_

True if this field is an array type, false if it is any other type. An array has the same value for / type_id_.

size_t array_size_

If is_array_ is true, this contains the number of members in the array.

bool is_upper_bound_

If is_array_ is true, this specifies if the array has a maximum size. If it is true, the value in array_size_ is the maximum size.

uint32_t offset_

The bytes into the interface’s in-memory representation that this field can be found at.

const void *default_value_

If the interface has a default value, this points to it.

size_t (*size_function)(const void*)

If is_array_ is true, a pointer to a function that gives the size of one member of the array.

const void *(*get_const_function)(const void*, size_t index)

If is_array_ is true, a pointer to a function that gives a const pointer to the member of the array indicated by index.

void *(*get_function)(void*, size_t index)

If is_array_ is true, a pointer to a function that gives a pointer to the member of the array indicated by index.

void (*fetch_function)(const void*, size_t index, void*)

Pointer to a function that fetches (i.e. copies) an item from an array or sequence member. It takes a pointer to the member, an index (which is assumed to be valid), and a pointer to a pre-allocated value (which is assumed to be of the correct type).

Available for array and sequence members.

void (*assign_function)(void*, size_t index, const void*)

Pointer to a function that assigns (i.e. copies) a value to an item in an array or sequence member. It takes a pointer to the member, an index (which is assumed to be valid), and a pointer to an initialized value (which is assumed to be of the correct type).

Available for array and sequence members.

bool (*resize_function)(void*, size_t size)

If is_array_ is true, a pointer to a function that resizes the array.