Examples

Default Behavior

./rtiddsspy

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

12:12:29 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType"
12:32:18 New data          from 192.168.43.223  : topic="Circle" type="ShapeType"
12:32:18 Modified instance from 192.168.43.223  : topic="Circle" type="ShapeType"

---- Statistics ----
Discovered 1 DataWriters and 0 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Circle"  Type="ShapeType")

Sample Display Options

There are two options to display the sample information.

Plain (Default)

This is the default option. It pretty-prints sample information for best readability.

./rtiddsspy -printSample PLAIN

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

12:12:29 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType"
12:35:24 New data          from 192.168.43.223  : topic="Circle" type="ShapeType"
color: "BLUE"
x: 53
y: 190
shapesize: 30
fillKind: SOLID_FILL
angle: 0

12:35:24 Modified instance from 192.168.43.223  : topic="Circle" type="ShapeType"
color: "BLUE"
x: 54
y: 195
shapesize: 30
fillKind: SOLID_FILL
angle: 0

---- Statistics ----
Discovered 1 DataWriters and 0 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Circle"  Type="ShapeType")

Compact

This option prints sample information in a single line using a JSON format.

./rtiddsspy -printSample COMPACT

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

12:12:29 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType"
12:38:15 New data          from 192.168.43.223  : topic="Circle" type="ShapeType" sample={"color":"BLUE","x":202,"y":175,"shapesize":30,"fillKind":"SOLID_FILL","angle":0}
12:38:15 Modified instance from 192.168.43.223  : topic="Circle" type="ShapeType" sample={"color":"BLUE","x":203,"y":180,"shapesize":30,"fillKind":"SOLID_FILL","angle":0}

---- Statistics ----
Discovered 1 DataWriters and 0 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Circle"  Type="ShapeType")

Discovery vs. User Modes

By default, rtiddsspy prints both discovery and user data together; however, you can choose to print either discovery or user data.

Discovery Mode

Use -mode DISC to print just discovery data and leave out user data. This mode forces the -showEntityName, -showHandle, and -showPartition arguments.

./rtiddsspy -mode DISC

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

13:26:17 New reader        from 192.168.43.223  : topic="Circle" type="ShapeType" guid="0x0101CEB8,0x3426926B,0xA577212D:0x80000004" partition="A, B, C" name="roleName:testDataReader"
13:26:15 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType" guid="0x0101A438,0xBAE7B797,0x5443C840:0x80000003" partition="A, E, I" name="roleName:testDataWriter"
13:29:22 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType" guid="0x0101B1F3,0xE6C768BE,0xFB33BCF3:0x80000003" partition="D, F, G" name="roleName:testDataWriter"


---- Statistics ----
Discovered 2 DataWriters and 1 DataReaders

User Mode

Use -mode USER to print user data and leave out discovery data. This mode forces the -printSample argument.

./rtiddsspy -mode USER

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

15:14:37 New data          from 192.168.43.223  : topic="Circle" type="ShapeType"
color: "BLUE"
x: 53
y: 190
shapesize: 30
fillKind: SOLID_FILL
angle: 0

15:14:38 New data          from 192.168.43.223  : topic="Circle" type="ShapeType"
color: "BLUE"
x: 54
y: 195
shapesize: 30
fillKind: SOLID_FILL
angle: 0

---- Statistics ----
Discovered 2 DataWriters and 1 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Circle"  Type="ShapeType")

Additional Display Options

This example uses arguments that print all of the extra information related to discovery and user data.

./rtiddsspy -showEntityName -showPartition -showHandle -showSampleIdentity -showSampleFlags -printSample COMPACT

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

13:26:17 New reader        from 192.168.43.223  : topic="Circle" type="ShapeType" guid="0x0101CEB8,0x3426926B,0xA577212D:0x80000004" name="roleName:testDataReader" partition="A, B, C"
13:26:15 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType" guid="0x0101A438,0xBAE7B797,0x5443C840:0x80000003" name="roleName:testDataWriter" partition="A, E, I"
15:41:09 New data          from 192.168.43.223  : topic="Circle" type="ShapeType" virtual_guid="0x0101A438,0xBAE7B797,0x5443C840:0x80000003" virtual_sn="(0, 8093)" name="roleName:testDataWriter" partition="A, E, I" sample={"color":"BLUE","x":202,"y":175,"shapesize":30,"fillKind":"SOLID_FILL","angle":0}
15:41:10 New data          from 192.168.43.223  : topic="Circle" type="ShapeType" virtual_guid="0x0101A438,0xBAE7B797,0x5443C840:0x80000003" virtual_sn="(0, 8094)" name="roleName:testDataWriter" partition="A, E, I" sample={"color":"BLUE","x":203,"y":180,"shapesize":30,"fillKind":"SOLID_FILL","angle":0}

---- Statistics ----
Discovered 1 DataWriters and 1 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Circle"  Type="ShapeType")

Filter by Topic and Type

This example uses arguments to filter discovery and user data by Topic and type.

./rtiddsspy -typeRegex "Shape*" -topicRegex "Circ*"

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

13:26:17 New reader        from 192.168.43.223  : topic="Circle" type="ShapeType"
13:26:15 New writer        from 192.168.43.223  : topic="Circle" type="ShapeType"
16:24:16 New data          from 192.168.43.223  : topic="Circle" type="ShapeType"
16:24:17 New data          from 192.168.43.223  : topic="Circle" type="ShapeType"


---- Statistics ----
Discovered 1 DataWriters and 1 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Circle"  Type="ShapeType")

Partitions

Display All Partitions

This example displays the partitions to which an entity belongs each time a new entity is discovered and a sample is received. (See PARTITION QosPolicy, in the RTI Connext DDS Core Libraries User’s Manual for more information on partitions.)

./rtiddsspy -showPartition

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

13:29:22 New writer        from 192.168.43.223  : topic="Example test" type="test" partition="D"
13:26:15 New writer        from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:26:17 New reader        from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:29:42 New data          from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:29:43 New data          from 192.168.43.223  : topic="Example test" type="test" partition="D"
13:29:43 New data          from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:29:44 New data          from 192.168.43.223  : topic="Example test" type="test" partition="D"


---- Statistics ----
Discovered 2 DataWriters and 1 DataReaders
Received samples (Data, Dispose, NoWriters):
    4, 0, 0         (Topic="Example test"  Type="test")

Display Select Partitions

This example shows how to display data only for specified partitions. By using -partition A, we only receive data from entities that belong to partition A.

Although rtiddsspy first displays all discovered entities (New writer, New reader), regardless of partition, any data received (New data) is shown only for the specified partition.

./rtiddsspy -showPartition -partition A

RTI Connext DDS Spy built with DDS version: 7.0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtiddsspy is listening for data, press CTRL+C to stop it.

13:29:22 New writer        from 192.168.43.223  : topic="Example test" type="test" partition="D"
13:26:15 New writer        from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:26:17 New reader        from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:30:24 New data          from 192.168.43.223  : topic="Example test" type="test" partition="A"
13:30:25 New data          from 192.168.43.223  : topic="Example test" type="test" partition="A"


---- Statistics ----
Discovered 2 DataWriters and 1 DataReaders
Received samples (Data, Dispose, NoWriters):
    2, 0, 0         (Topic="Example test"  Type="test")