Skip to content

chewcw/baumer-neoapi-csharp-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neoAPI C# Wrapper Generation for Linux

This project provides tools to generate a C# wrapper for the Baumer neoAPI SDK on Linux using SWIG.

Prerequisites

  • SWIG: Simplified Wrapper and Interface Generator (sudo apt install swig)
  • g++: GNU C++ compiler
  • Baumer neoAPI SDK: The SDK directory (e.g., Baumer_neoAPI_1.5.0_lin_x86_64_cpp) should be present or its path provided to the build script.

Step-by-Step Generation

1. Generate the SWIG Interface

Run the generate_interface.sh script to create the neoapi.i file. This script automatically adds ergonomic C# properties (like SerialNumber, ModelName, etc.) to the CamInfo class to match the Windows neoAPI implementation.

./generate_interface.sh [path_to_sdk]

2. Build the Wrapper

Run the build_wrapper.sh script to generate the C# source and the native shared library.

./build_wrapper.sh [path_to_sdk]

This will produce:

  • wrapper/neoAPI_linux.cs: Consolidated C# wrapper classes.
  • wrapper/libneoapi_csharp.so: Native library required for runtime.

Project Structure

  • generate_interface.sh: Script to generate the SWIG interface file (neoapi.i).
  • build_wrapper.sh: Script to run SWIG and compile the native wrapper library.
  • neoapi.i: The SWIG interface definition.
  • wrapper/: Directory containing the generated output and native library dependencies.
  • .gitignore: Configured to ignore intermediate build artifacts and native libraries.

Troubleshooting

  • SDK Path: If the SDK is not in the default directory, ensure you provide the absolute path as an argument to the scripts.
  • RPath: The generated native library uses $ORIGIN and $ORIGIN/lib in its RPath to find the neoAPI C++ libraries. Ensure the required .so files are available in the wrapper/lib directory.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published