wRTOS Program Samples

wRTOS SDK includes program samples to help developers create real-time programs to run in the wRTOS environment. You can access wRTOS samples in the %public%\Public Documents\IntervalZero\MaxRT\wRTOS SDK\1.0\Samples directory and from the Start Menu.

Note: These samples are provided to show concepts only. They do not include complete error checking that would typically exist in customer applications.

Categories:

RTSS Applications

Simple Samples

Sample Description

Mailbox

Creates a thread-safe instance of a mailbox.

Simple DataExchange

Detects whether an event is open or closed.

Simple PingPong

Spawns two threads that signal each other back and forth for a set amount of time. After the time has expired, the main thread will signal the threads to complete and end the program.

SimpleProducerConsumer

Builds two applications: a consumer application that opens a memory address shared between the wRTOS Subsystem and Windows, and a producer application that creates and writes to a globally named shared memory address.

SMP Sample

Spawns three threads in a suspended state.

Communicating with Windows

Sample Description

AMX IPC Latency

Measures the switching latency between two threads using Intel® AMX instructions.

IPCLatency

Measures the latency for switching between two threads.

WindowswRTOSUsingSTL

Demonstrates data exchange between a real-time process and a Windows user-space process using C++ STL classes to manage the data that is exchanged via a shared memory region.

Communicating with Devices

Sample Description

MultiVectorI350

Provides an example of using Message Signaled Interrupts (MSI-X) with multiple vectors attachment on Intel Ethernet Controller I350 with Dual or Quad ports.

PciScanBus

Searches for devices on the machine's PCI buses and, when a device is found, prints the PCI configuration information to the screen.

Measuring Applications

Sample Description

mSRTM

Runs a System Response Timer on different cores simultaneously and measures the difference between the expected timer interval and the actual timer interval.

NRTM

Measures an Ethernet frame's round-trip time (RTT) through a reflector.

RtPerfMonitor

This command-line program displays system information including the speed and type of processor running wRTOS, HAL type, CPU utilization and other information that can be used to help measure RTSS application load.

RtPerfMonitorEx

This command-line program displays system information including the speed and type of processor running wRTOS, HAL type, CPU utilization and other information that can be used to help measure RTSS application load.

SRTM

Measures timer delivery latencies using the wRTOS synchronized clock and timers and prints the results.

SRTMWShutdown

Measures timer delivery latencies using wRTOS synchronized clock and timers.

Basic RTSS Functionality

Sample Description

Contiguous Memory Allocation Calls Programming

Demonstrates how to allocate, retrieve, and free contiguous physical memory using wRTOS APIs.

FastSemaphore

Demonstrates the usage and abilities of the FastSemaphore functions available in wRTOS SDK.

Memory Mapping Calls Programming

Demonstrates the use of wRTOS memory mapping calls.

Shutdown

Demonstrates how to use a system shutdown handler in an application.

Timer and Sleep Calls Programming

Demonstrates the use of wRTOS timer and sleep calls.

Performance Optimization

Sample Description

RDTPerformance

Demonstrates how to use wRTOS-supported Intel® Resource Director Technology (RDT) to optimize the performance of RTSS threads with high performance requirements.

RTDLLs

Sample Description

RTDLL

Demonstrates how to use an RTDLL in an RTSS Process. It uses library functionality to provide an application similar to the DLL sample.

Network Link Layer (NL2)

Sample Description

NL2ClockTestApp

Provides a simple example of a Network Link Layer (NL2) application that uses the NL2 Clock APIs to measure the time difference between the CPU clock and a NIC clock and, optionally, synchronize the NIC clock to the CPU clock.

NL2FilterDriverSample

Provides a simple Filter Driver example for the Network Link Layer (NL2).

NL2NICDriverSample

Provides a basic example of a NIC Driver for the Network Link Layer (NL2).

NL2ReceiveTestApp

Provides a simple Network Link Layer (NL2) application example that uses various NL2 APIs to receive packets in different ways

NL2TransmitTestApp

Provides a simple Network Link Layer (NL2) application example that uses various NL2 APIs to transmit packets in different ways.

TCP/IP Applications

Sample Description

RawIpSocket

Runs a raw IP echo client and/or raw IP echo server, depending on the specified command line options.

RtEthernetFilter

Inspects all Ethernet frames that enter and leave the TCP/IP Stack and decides whether each shall be dropped or passed to the next stage.

RtTcpipClient

Tests the wRTOS TCP/IP protocol stack by sending packets to a server and waiting for a response. This sample can be used with the RtTcpipServer sample.

RtTcpipServer

Provides a TCP/IP Server program that monitors connections on a TCP/IP port. This sample can be used with the RtTcpipClient sample.

TCPIP

Includes a simplified TCP server, a simplified blocking TCP client, and a simplified non-blocking TCP client.

UDP

Includes a simplified UDP server and a simplified UDP client.

Filter Drivers

Sample Description

RtEthernetFilter

Inspects all Ethernet frames that enter and leave the TCP/IP Stack and decides whether each shall be dropped or passed to the next stage.

RTK Windows Drivers

Sample Description

RTKIPC

Demonstrates how to use the Real-Time Kernel (RTK) API and synchronize a Windows driver with a wRTOS process.

GigE Vision

Sample Description
RtGigEVision

Demonstrates how to use RtGigEVision APIs to control and receive data from a GigE Vision Camera.

MSpace

Sample Description

Dynamic MSpace Configuration

Demonstrates how to avoid memory request errors when memory allocation spaces (MSpaces) are configured not to expand automatically when exhausted.

Managed Library

Sample Description

ManagedCodeClientCSharp

Demonstrates how to use the Managed library from C# to change the product's configuration.

Configure and Control Library

Sample Description

Framework Client

Demonstrates how to use the wRTOS Configuration and Control (RTFW) library in a Visual Studio C/C++ project.

Other

Sample Description
Forcing Shutdown for Program Testing Describes the sample shutdown program to test a wRTOS program with shutdown handlers by forcing a Windows stop event.
Interrupt Management and Port IO Calls Programming Example Demonstrates the use of wRTOS interrupt management and port I/O calls.