12.3 Example Code in this Manual |
Throughout this manual, we present some (fairly) basic examples of common tasks which can be implemented using the functionality of the ClientLib.
However, for the sake of brevity, we omit some repetitive Boilerplate code from most of the examples.
This boilerplate code consists mainly of
appropriate using namespace; statements
program structure declarations
These need to be added around the actual example code before the example can be successfully compiled and run as a .NET Console App (see: these instructions).
Note |
---|
We assume that the SP-ICE-3 Software Package has already been installed.
|
using System; using RAYLASE.SPICE3; using RAYLASE.SPICE3.Utils; using RAYLASE.SPICE3.ClientLib; namespace ExampleCode { internal class ExampleProgram { // // TODO: // Substitute your SP-ICE-3 card's real IP address here: // private static string CardIP = "192.168.1.1"; private void ExampleMethod() { // // TODO: // INSERT EXAMPLE CODE HERE. // } private static void Main( string[] args ) { ExampleProgram ep = new ExampleProgram(); ep.ExampleMethod(); } } }
Your mileage will almost certainly vary.
Launch Microsoft Visual Studio 2017.
Create a new project using the "Windows Desktop | Console Application (.NET Framework)" template.
Add project References to ALL of the DLLs in the RAYLASE SP-ICE-3 Software package directory.
Copy the Boilerplate code, and use it to replace the entire contents of the newly created Program.cs file.
Copy the example code, and paste it into the boilerplate at the location marked with:
// // TODO: // INSERT EXAMPLE CODE HERE.
Important |
---|
Adapt the example code to your system by making any necessary changes now! |
Caution |
---|
Take all necessary Laser Safety precautions before attempting to run your program. |