Web server API

<< Click to Display Table of Contents >>

Navigation:  Working with CanEasy > Automation in CanEasy >

Web server API

 

How to use

Clients can directly use the REST-API or use the .NET wrapper located in the demonstrator suite.

(See "Examples\WebAPIClient")

It is a C# .net core 6 project. To run it you need to have at least the .net core SDK version 6 installed.

To run this example you can go the the directory with console and write "dotnet run" or use VS-Code.

 

Another way is using the COM Server wrapper "Schleissheimer CanEasy WebServer Client".

This simplifies access to the Rest API and should be used e.g. from VBA or Python.

 

Features

 

Function

Description

AddFileToDBFromClient

Sends a database file (like xml, dbc) from the client PC to the server and loads it into the workspace.

AddFileToDBFromServer

Loads a file located on the server.

Connect

URL and port which is used to connect to the server.

CreateMarker

Insert a marker into the record.

Execute

Executes a schedule table or sends a message/service from the database. Requires the string reference to the database item.

IsSimulationRunning

Returns true if simulation is running.

LoadsWorkspaceFromClient

Send a workspace (csm file) from the client PC to the server and loads it.

LoadsWorkspaceFromServer

Loads a workspace located on the server.

SaveRecordOnClient

Saves the complete record (celog file) into a folder on the client PC.

SaveRecordOnServer

Saves the complete record (celog file) into a folder on the server PC.

SimStart

Starts the simulation.

SimStop

Stops the simulation.

Value

Expects the string reference to value item (like signal or environment variable) and return an IValue object which allows setting or getting the value.

WorkspacePath

Return the current path to the CanEasy workspace.