NalTimeStamping Sample

You can find these sample files at Public Documents\IntervalZero\RTX64 SDK\4.5.

Description

This sample program uses the NAL API to:

Source Files

File Description
NalTimeStamping.h Header file.
NalTimeStamping.c Source file.
NalTimeStamping.rc Resource file.
NalTimeStamping_VS<Visual Studio Version>.vcxproj Project file for supported versions of Visual Studio.
NalTimeStamping_VS<Visual Studio Version>.vcxproj.filters Project filters file for supported versions of Visual Studio.
NalTimeStamping_VS<Visual Studio Version>.sln Solution file for supported versions of Visual Studio.
resource.h Resource header file.
readme.txt Text file containing a description of the sample and a list of provided files.

Building the Sample

This sample application requires a supported version of Visual Studio.

  1. Open the appropriate solution file for your version of Visual Studio.
  1. Set the configuration to RTSSRelease.
  2. Build the sample.

You should end up with an RTSS process called NalTimeStamping.rtss.

Running the Sample

Follow these steps to send to a peer (destination) MAC address xx:xx:xx:xx:xx:xx at the default burst rate:

  1. Convert your NAL-supported device to RTX64. In this example, we will use a device supported by the RtNalIGB driver.
  2. In the RTX64 Control Panel, add two new interfaces through the Manage interfaces page:
  3. Interface1
  4. Interface2

NOTE: Interface names cannot contain spaces.

  1. Start the NAL through the Control Panel.
  2. Run the sample as a sender of data:

RtssRun NalTimeStamping.rtss Interface1 /transmit

  1. Run the sample as a receiver of data:

RtssRun NalTimeStamping.rtss Interface1 /receive

  1. Observe the timestamps printed to the RTX64 console window.
  2. To stop the sample use RtssKill.

This sample uses the following flags:

/transmit <MAC_Address>

transmits packets to the specified MAC address

NOTE: /transmit is not supported for the RtNalIPCH driver.

/q <queue number>

attaches to the specified queue number

/send <packet number>

transmit only the specified number of packets

/receive

receives packets

Examples

In the following examples, the Interface1 device name is used and the peer (destination) MAC address is xx:xx:xx:xx:xx:xx.

RtssRun NalTimeStamping.rtss /?

RtssRun NalTimeStamping.rtss Interface1 /receive

RtssRun NalTimeStamping.rtss Interface1 /transmit xx:xx:xx:xx:xx:xx

RtssRun NalTimeStamping.rtss Interface1 /transmit xx:xx:xx:xx:xx:xx /send 1000000

Remarks

This sample is not supported for the following drivers:

To broadcast data, use a MAC address of xx:xx:xx:xx:xx:xx

Packets are sent once every second.

APIs Referenced

RTNal