Click or drag to resize

Quick Start

CameoSDK is developed using .NET Framework 4.8.

The entry point to the CameoSDK is the EntryPointGetSdk method. For the proper SDK initialization CameoSdkParameters object should be passed as argument. This argument is mandatory. To instantiate it you need:

  • Unique name (in scope of one machine). This argument is mandatory. The unique name must not be an empty string and must contain only valid OS path characters. This name is used for: log files naming, creating the path for the local copy of the configuration, etc.

  • Path to the folder where SDK core components are installed. This argument is mandatory. Path must not be an empty string and must be an existing path with granted access permissions for the current user. Usually path would be: "<CameoSDK Installation Directory>\bin\".

    Caution note  Caution

    The used path can potentially introduce security vulnerabilities. Validate and sanitize the path thoroughly. Ensure that the path points to a trusted and valid location within the application's intended scope and that the path cannot be manipulated. Limit the access and permissions of the provided path. Make sure that the application runs with the least privileges necessary to perform its intended functionality.

  • Decide if internal SDK logging mechanism should be activated.

    Note  Note

    Uses log4net.dll for internal logging.

  • UI thread context. This argument is mandatory.

    Important note  Important

    The application that uses the CameoSDK shall be a Desktop application and requires a message pump. For example: every GUI enabled .NET program has a message pump, it is started by the Application.Run() method.

Important note  Important

Different COM components are used by implementation. To ensure their proper functioning perform the following actions as early as possible, in an entry point of your application, before starting:

  • Initialize the COM library for use by the calling thread.

  • Initialize the thread for apartment-threaded object concurrency model and create a new apartment for the thread.

  • Initialize the security layer and set the default security values (enable anonymous access) for the process.

If Manuals feature was selected during installation, please refer to the <CameoSDK Installation Directory>\CameoSdk\TestApplication\DcomConnector.cs class and its usage. This class contains methods for COM initialization and security configuration according to the requirements.

ICameoSdk provides public properties which provide access to the managers and factories delivering subsets of the SDK functionality. Each call in the SDK can throw a CameoSdkException. CameoSdkException will be thrown in cases of a usage error, execution error or program error.

ICameoSdk provides the following events:

  • ConfigurationStateChanged event which will be raised when the configuration state of any server is changed. The user should restart application to download and apply a new configuration.

  • ConnectionStateChanged event which will be raised when the connection state to any server is changed. In an Enterprise system the event is raised for each server.

  • ScheduleLogoffRequired event which will be raised if logon schedule prohibits that given user is logged on at a given time.

    Caution note  Caution

    Before the ScheduleLogoffRequired event is raised the SDK gets shutdown, therefore you are not allowed to use SDK interfaces anymore. This means that you are not able to use objects created in previous session and if you will try the CameoSdkShutdownException would be thrown. To proceed working try to restart the SDK (please, see ICameoSdkStartup or ICameoSdkStartupAsync method for details). Ok value indicates a successful start, any other result reflects an error (please, see StartupResult enum for details).

An introduction how to work with CameoSDK.

  1. After a successful installation the system has been changed as follows:

    • If Manuals feature was selected during installation, new shortcuts will appear in the menu Start->All Programs. A <BVMS\Cameo SDK> folder will be created and will contain shortcuts associated with the new feature:

      • Help – help file, that describes API functionality.

      • Test Application C# Project – C# project with test application source code.

      • Test Application – test application binary that demonstrates the complete set of features.

      The picture below represents Start menu changes.

      BVMS menu folder structure
      Start Menu Changes
  2. In MS Visual Studio IDE, add the following assembly reference (from folder "<CameoSDK Installation Directory>\CameoSdk\") to the project that represents the application:

    • Bosch.Vms.CameoSdk.dll

    The picture below demonstrates usage in Test Application.

    Add reference
    Cameo Sdk Usage
    Note  Note

    On the picture above the Test Application uses project reference.