RTI Connext .NET API (legacy)  Version 6.1.2

Add contextual information to log messages. More...

Classes

class  NDDS::ActivityContext
 Activity Context APIs. More...
 

Enumerations

enum  NDDS::ActivityContextAttributeKind : UINT32 {
  NDDS::ActivityContextAttributeKind::NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_GUID_PREFIX,
  NDDS::ActivityContextAttributeKind::NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TOPIC,
  NDDS::ActivityContextAttributeKind::NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_TYPE,
  NDDS::ActivityContextAttributeKind::NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_KIND,
  NDDS::ActivityContextAttributeKind::NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_DOMAIN_ID,
  NDDS::ActivityContextAttributeKind::NDDS_CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_ENTITY_NAME,
  NDDS::ActivityContextAttributeKind::CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT,
  NDDS::ActivityContextAttributeKind::CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE,
  NDDS::ActivityContextAttributeKind::CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL
}
 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 NDDS::ActivityContext::set_attribute_mask (ActivityContextAttributeKind attribute_mask)
 Set the NDDS::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]

Enumeration Type Documentation

◆ ActivityContextAttributeKind

enum NDDS::ActivityContextAttributeKind : UINT32
strong

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:

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::ActivityContextAttributeKind::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::ActivityContextAttributeKind::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:

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:

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:

CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_DEFAULT 

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

CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_NONE 

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

CONFIG_ACTIVITY_CONTEXT_ATTRIBUTE_MASK_ALL 

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

Function Documentation

◆ set_attribute_mask()

static void NDDS::ActivityContext::set_attribute_mask ( ActivityContextAttributeKind  attribute_mask)
static

Set the NDDS::ActivityContextAttributeKindMask of the Activity Context.