RTI Connext Traditional C++ API Version 7.1.0

Add contextual information to log messages. More...

Classes

class  NDDSConfigActivityContext
 Activity Context APIs. More...
 

Macros

#define NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT    RTI_OSAPI_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT
 Provide the default attributes of the resource of the Activity Context. More...
 
#define NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE    RTI_OSAPI_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE
 Not provide any attribute of the resource of the Activity Context. More...
 
#define NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL    RTI_OSAPI_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL
 Provide all the possibles attributes of the resource of the Activity Context. More...
 

Typedefs

typedef DDS_Long NDDS_Config_ActivityContextAttributeKindMask
 The attributes NDDS_Config_ActivityContextAttributeKind used in the string representation of the Activity Context can be configured through this mask. More...
 

Enumerations

enum  NDDS_Config_ActivityContextAttributeKind {
  NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_GUID_PREFIX ,
  NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TOPIC ,
  NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TYPE ,
  NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_KIND ,
  NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_DOMAIN_ID ,
  NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_NAME
}
 The resources of the Activity Context can have multiple associated attributes. Those attributes provide extra information about the entity such as GUID prefix, Topic, data type, entity kind, entity name and domain ID. They are used to indicate what attributes of the resources are included in the activity context. More...
 

Functions

static void NDDSConfigActivityContext::set_attribute_mask (NDDS_Config_ActivityContextAttributeKindMask attribute_format)
 Set the NDDS_Config_ActivityContextAttributeKindMask of the Activity Context. More...
 

Detailed Description

Add contextual information to log messages.

The Activity Context is a group of resources and activities associated with an action such as the creation of an entity.

Logging context is one of the formats RTI Connext logging infrastructure supports. It is used by default in NDDS_CONFIG_LOG_PRINT_FORMAT_DEFAULT. It provides information about resources and activities. The activity context is used in two places:

For example, in the creation of a DataWriter, the activity context will provide information about:

The string representation of the above activity context would be:

[0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000088{Entity=Pu,Name=TestPublisher,Domain=1}|CREATE Writer WITH TOPIC TestTopic]

Another example could be when a DataWriter writes a sample. The activity context will provide information about:

The string representation of the activity context will be:

[0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
A representative user-defined data type.
Definition: data.ifc:112

Macro Definition Documentation

◆ NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT

#define NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT    RTI_OSAPI_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT

Provide the default attributes of the resource of the Activity Context.

◆ NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE

#define NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE    RTI_OSAPI_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE

Not provide any attribute of the resource of the Activity Context.

◆ NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL

#define NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL    RTI_OSAPI_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL

Provide all the possibles attributes of the resource of the Activity Context.

Typedef Documentation

◆ NDDS_Config_ActivityContextAttributeKindMask

The attributes NDDS_Config_ActivityContextAttributeKind used in the string representation of the Activity Context can be configured through this mask.

This mask indicates what attributes of the resource are used when RTI Connext logs a message or when the Heap Monitoring utility saves statistics for a memory allocation.

Enumeration Type Documentation

◆ NDDS_Config_ActivityContextAttributeKind

The resources of the Activity Context can have multiple associated attributes. Those attributes provide extra information about the entity such as GUID prefix, Topic, data type, entity kind, entity name and domain ID. They are used to indicate what attributes of the resources are included in the activity context.

Enumerator
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_GUID_PREFIX 

Provide the entity GUID prefix to the resource of the Activity Context.

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
  • The GUID prefix is 0X101A76B,0X79E5D71,0X50EE914. If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_GUID_PREFIX is not set, the string representation will not show the GUID prefix:
    [:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TOPIC 

Provide the Topic to the resource of the Activity Context. The topic attribute is specified by "Topic".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
  • The Topic is "test." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TOPIC is not set, the string representation will not show the Topic:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Type=Foo,Domain=1}|Write]
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TYPE 

Provide the data type to the resource of the Activity Context. The type attribute is specified by "Type".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
  • The data type is "Foo." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TYPE is not set, the string representation will not show the data type:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Domain=1}|Write]
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_KIND 

Provide the entity kind to the resource of the Activity Context. The kind attribute is specified by "Entity".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
  • The entity kind is "Writer." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_KIND is not set, the string representation will not show the entity kind:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Topic=test,Type=Foo,Domain=1}|Write]
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_DOMAIN_ID 

Provide the domain ID to the resource of the Activity Context. The domain attribute is specified by "Domain".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
  • The domain ID is "1." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_DOMAIN_ID is not set, the string representation will not show the domain ID:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo}|Write]
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_NAME 

Provide the entity name to the resource of the Activity Context. The name attribute is specified by "Name".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Name=testDataWriterName,Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]
  • The entity name is "testDataWriterName." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_NAME is not set, the string representation will not show the entity name:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{Entity=DW,Topic=test,Type=Foo,Domain=1}|Write]

Function Documentation

◆ set_attribute_mask()

static void NDDSConfigActivityContext::set_attribute_mask ( NDDS_Config_ActivityContextAttributeKindMask  attribute_format)
static

Set the NDDS_Config_ActivityContextAttributeKindMask of the Activity Context.