RTI Connext C API  Version 6.1.1

Add contextual information to log messages. 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

void NDDS_Config_ActivityContext_set_attribute_mask (NDDS_Config_ActivityContextAttributeKindMask attribute_mask)
 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{E=Pu,N=TestPublisher,D=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{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]

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{N=testDataWriterName,E=DW,T=test,C=Foo,D=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{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]
NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TOPIC 

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

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]
  • The Topic (T) is "test." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TOPIC is not set, the string representation will not show the Topic (T):
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,C=Foo,D=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 "C".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]
  • The data type (C) is "Foo." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TYPE is not set, the string representation will not show the data type (C):
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,D=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 "E".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]
  • The entity kind (E) is "Writer." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_KIND is not set, the string representation will not show the entity kind (E):
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,T=test,C=Foo,D=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 "D".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]
  • The domain ID (D) is "1." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_DOMAIN_ID is not set, the string representation will not show the domain ID (D):
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,C=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 "N".

For example:

  • For the following string representation of the context:
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{N=testDataWriterName,E=DW,T=test,C=Foo,D=1}|Write]
  • The entity name (N) is "testDataWriterName." If the bit NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_NAME is not set, the string representation will not show the entity name (N):
    [0X101A76B,0X79E5D71,0X50EE914:0X1C1:0X80000003{E=DW,T=test,C=Foo,D=1}|Write]

Function Documentation

◆ NDDS_Config_ActivityContext_set_attribute_mask()

void NDDS_Config_ActivityContext_set_attribute_mask ( NDDS_Config_ActivityContextAttributeKindMask  attribute_mask)

Set the NDDS_Config_ActivityContextAttributeKindMask of the Activity Context.