The NT_Init() function is used to determine if the functions in Napatech Software Suite has changed. It NT_Init() fails, you are advised to make code changes to support the current running system.
Each stream utilizes some or all of the following functions:
- open() - opens a stream and return a stream handle
- close() - closes a stream
- read() - reads data from a stream
- write() - writes data to a stream
- get() - gets data from a stream and releases it again via the release() function
- release() - releases data aquired via the get() function
The functions have the following naming convention, NT_<Stream name><Function>() which for example the Event stream is NT_EventOpen().
- The number and type of parameters might vary between streams.
The data structures are used to exchange data between applications and libNTAPI via the read()/write() variants. The data structures have a common structure:
The structure above has the following benefits:
- Backward compability is ensured by adding new enumeration and structures while keeping the old ones in the code but suppressed from documentation.
- Only the newest enums and structures are documented, removing the need to choose between a number of enums and structures doing more or less the same thing.
Here is a pseudocode example on usage of the example structure above performing a read-modify-write.