17. Appendix

17.1. Source Code Download

Find the “Downloads” section in the FAIRINO documentation (https://fairino-doc-en.readthedocs.io/latest/), click the “C# SDK” button, and then click “FAIRINO C# SDK” on the right-hand page. Wait for the browser to complete the download.

../_images/00118.png

Figure 15.1‑1 C# SDK Source Code Download

Download and extract the C# SDK. The project directory is shown below. The “examples” folder contains test samples, the “src” folder contains the C# SDK, and “Fairino.sln” is the project solution file. “Dlls” contains library files.

../_images/01016.png

Figure 15.1‑2 C# SDK File Structure Example

Locate the solution file named “fairino.sln” and double-click to open it. The file structure is shown below.

../_images/01115.png

Figure 15.1‑3 Project File Structure Example in Visual Studio 2022

17.2. Windows Platform Source Code Compilation

17.2.1. C# SDK Compilation

Right-click the FRRobot project, select Properties, and choose the .NET framework version.

../_images/01214.png

Figure 15.2‑1 Setting Properties

../_images/01315.png

Figure 15.2‑2 Selecting .NET Framework

../_images/01413.png

Figure 15.2‑3 Building FRRobot Project in Release Mode

Switch Visual Studio 2022 to Release mode and rebuild the FRRobot project. The DLL dynamic link library will be generated in the binRelease folder.

../_images/01512.png

Figure 15.2‑4 Setting Release Mode

../_images/01613.png

Figure 15.2‑5 Rebuilding FRRobot Project in Release Mode

../_images/01613.png

Figure 15.2‑6 Generating DLL Dynamic Link Library

17.2.2. C# SDK Usage

Right-click the testFrRobot project and set it as the startup project.

../_images/01713.png

Figure 15.2‑7 Setting as Startup Project

The C# SDK test interface is shown below.

../_images/01813.png

Figure 15.2‑8 C# SDK Test Interface

17.3. Notes

17.3.1. Potential Issues

17.3.1.1. Handling No Effect After Code Updates

If the project still executes old code after rewriting and restarting, consider the following steps:

Rebuild the project: Follow the instructions in step 3.2 to rebuild or update the project configuration and files.

17.3.1.2. Error Codes

A return value of 0 indicates normal operation. If the return value is not 0, refer to the error code table.