SDK - Windows .NET support

From edgertronic high speed video camera
Jump to navigation Jump to search


Home

ImageJ support




Background

There is a C# API exposed using the .NET CamApi for Window library. The code includes examples showing how to control your edgertronic camera.

Requirements

Your Windows computer must have the following packages installed.

  • Microsoft .NET Core 2.X SDK
  • git

Git Installation on the Windows PC

Run the following command to install the git:

winget install --id Git.Git -e --source winget

Installation

Open PowerShell and run the following commands:

mkdir \projects\edgertronic
cd \projects\edgertronic
git clone https://github.com/gharley/CamApi.git
cd CamApi
dotnet build
dotnet publish -c Release -r win10-x64
dotnet pack .\CamApiLib\CamApiLib.csproj -c Release

Examples

Supported parameters

You can see the supported command line parameters running the example with the -h option:

.\CamApiExample\bin\Release\netcoreapp2.0\win10-x64\CamApiExample.exe -h

You will see output similar to:

Options (must have = with no spaces between option and value):
  -a --Address                   Host name or IP # of camera (default 10.11.12.13)
  -f --FavoritesTest            1 to run favorites tests (deletes all saved favorites)
  -c --CaptureTest              1 to run capture tests (time consuming, writes to storage)
  -m --MultiCaptureTest   1 to run multi-capture tests (time consuming, writes to storage)
  -h --Help                          1 to display this message


Controlling a camera

You can run the example by providing the network address of the camera:

.\CamApiExample\bin\Release\netcoreapp2.0\win10-x64\CamApiExample.exe -a=10.11.12.13

You will see output similar to:

Camera state REVIEWING, level -30, flags 1032

Camera extended status - state REVIEWING, level -30, flags 1032, IS temp (C) 31, FPGA temp (C) 34

Status string: State: Reviewing; Level: -30; Flags: SD card installed | Network storage unmountable; Empty: 7.3 GB; Reviewing multishot: 1

Directory path to active storage device: /mnt/sdcard

Storage information: 7881916416 / 7939817472 bytes, mount point: /mnt/sdcard

Camera information:
Software build date: 20180131171043
    Hardware build date: 20170601
    FPGA version: 64
    Model Number: 2
    Serial Number: 884
    Hardware Revision: 2
    Hardware Configuration: 33488906
    IR Filter:  installed
    Ethernet MAC Address: 00:1B:C5:09:63:74

Saved camera settings:
    Sensitivity: 100
    Shutter: 500
    Frame Rate: 30
    Horizontal: 1280
    Vertical: 720
    Sub-sampling: Off
    Duration: 2
    Pre-trigger: 50

Current requested camera settings:
    Sensitivity: 100
    Shutter: 500
    Frame Rate: 30
    Horizontal: 1280
    Vertical: 720
    Sub-sampling: Off
    Duration: 2
    Pre-trigger: 50

...


Common errors and how to fix them

Error dotnet is not a recognized command

You need to close PowerShell and reopen it.




Home

ImageJ support