Click or drag to resize

3.2.1 General

Entry Point

The entry point for using the API is the class MarkerAPI. An application or library needs to create an object of this class, normally as a global variable, to have it available in the whole project:

Creating the RAYGUIDE API object
class Application
{
MarkerAPI _markerAPI;

static void Main(string[] args)
{
// Create the API object:
using (MarkerAPI _markerAPI = new MarkerAPI() )
{

// Your application's code:
// ...

}
}
}

The MarkerAPI object is the chief class offering access to the API's functionalities, see 3.3 Important Classes for details.

Basic Stucture of an Application

An application for marking something needs to perform the following steps:

  1. Creation of the API object.

  2. Creation of the needed device objects, namely

    • a SP-ICE-3 device object,

    • a scan head object and

    • a laser device object.

    The scan head and laser device objects need to be assigned to the SP-ICE-3 device object, and the latter must be provided with the IP address of the SP-ICE-3 card.

  3. Creation of a job containing the job elements to mark.

  4. Execution of the job.

  5. Freeing the API resources before leaving the application.

See the 2.4 Hello World Example for details.

Libraries

The API makes use of some external libraries. Dependant on the complexity of the application to be developed, more or less knowledge of these libraries will be necessary.

All the libraries are delivered within the SDK by means of NuGet packages. Additional licences are not needed. See 3.9 Deployment for details.

.NET

RAYGUIDE and the API are using Microsoft's .NET framework. They are both implemented in C#, but the API can be used with any .NET language. All programming samples are written in C#, though.

WPF

RAYGUIDE's GUI and the API use WPF (Window Presentation Foundation) for creating dialogs and graphics. When creating plug-ins with an own user interface this has to be implemented with WPF as well.

Prism

RAYGUIDE and the API make heavy use of the Prism framework, which allows the development of loosely coupled, modular applications implementing the Model View ViewModel pattern (MVVM). As can be seen in our 2.4 Hello World Example it is not necessary to know Prism to use the API, but it is necessary if parts of RAYGUIDE, as dialogs, shall be integrated into an application. See the tutorial 3.7 Embedding Parts of RAYGUIDE into own Applications for details.

MahApps.Metro

RAYGUIDE employs the MahApps.Metro user interface toolkit for styling the GUI with another look and feel and needs to be referenced in some places. If parts of RAYGUIDE, as dialogs, shall be integrated into an application, MahApps' so-called DialogCoordinator is used. See the tutorial 3.7 Embedding Parts of RAYGUIDE into own Applications for details.

GlmSharp

GlmSharp is an open source math library for handling vectors and matrices. If it comes to manipulation of vectors and transformations knowledge of this library is needed.

Telerik UI for WPF

Telerik UI for WPF is another UI toolkit we are using especially for the job element tree in RAYGUIDE's GUI, because it is more efficient than the original WPF tree. One will not get in contact with this library when using the API.

Emgu CV

Emgu CV is a cross platform .Net wrapper to the OpenCV image processing library. The library is used in RAYGUIDE to handle pictures taken with a camera as is done when using the "Click and Teach" add-on.

Native Libraries

RAYGUIDE and the API depend on two native libraries; one is for creating barcodes (TBarCode SDK) and the other for handling 2D graphics (SkiaSharp). We have packed both of them into our own NuGet packages for your convenience. No further knowledge of these libraries should be necessary.