Using the RTFW Library in a C/C++ Project

The wRTOS Configuration and Control (RTFW) library (RtfwApi.dll) is a native DLL that allows C/C++ applications to configure and control the wRTOS Subsystem programmatically. This interface provides similar functionality to the Managed library.

To use the RTFW library in a C/C++ project, you must first perform a few modifications to the project settings. This topic lists the necessary changes.

To use the RTFW in a C/C++ project:

  1. In Visual Studio, add these #include directives to the project’s source code:
  2. #include <windows.h>

    #include <RtfwApi.h>

    Component-specific #include directives:

    Component

    #include directive

    Network Link Layer (NL2)

    #include <Rtfwnl2Api.h>

    TCP/IP 

    #include <RtfwtcpipApi.h>

    E-CAT

    #include <RtfwecatApi.h>

    Network Relay

    #include <RtfwrlyApi.h>

  3. Open the Property Pages for the project.
  4. Set Configuration to All Configurations and set Platform to All Platforms, and then do the following:

$(wRTOSSDKDir1)include

RtfwApi.lib

Component-specific libraries:

Component

Library

Network Link Layer (NL2)

Rtfwnl2Api.lib

TCP/IP 

RtfwtcpipApi.lib

E-CAT

RtfwecatApi.lib

Network Relay

RtfwrlyApi.lib

  1. Set Platform to x64, and then do the following:

$(wRTOSSDKDir1)lib\amd64

  1. Set Platform to x32, and then do the following:

$(wRTOSSDKDir1)lib\x86

  1. Select OK and then rebuild the project.

Related Topics: