This source file is an example of how to use the Configuration stream interface in NTAPI for Napatech bypass accelerator and port configuration.
This example switches the state of the relays every time it is run.
The following NTAPI functions are used:
A working system is needed with a Napatech bypass accelerator.
The following is required to perform read and write operations on the configuration stream:
- #include/nt.h - Applications/Tools only need to include nt.h to obtain prototypes, macros etc. from NTAPI.
- NT_Init(NTAPI_VERSION) - Initialize the NTAPI library. NTAPI_VERSION is a define that describes the version of the API described in the header files included by nt.h. NT_Init() will ask the NTAPI library to convert return data to the NTAPI_VERSION if possible. This will ensure that applications can run on NTAPI libraries of newer versions.
- NT_InfoOpen() - Open an info stream.
- NT_InfoRead() - Read info stream.
- NT_InfoClose() - Close the stream when terminating.
- NT_ConfigOpen() - Open a configuration stream.
- NT_ConfigRead() - Read configuration.
- NT_ConfigWrite() - Write configuration.
- NT_ConfigClose() - Close the stream when terminating.
- NT_Done() - Close down the NTAPI library.
- NT_ExplainError() - Explain an error code returned by NTAPI functions.