optris_connect_sdk 1.0.1 copy "optris_connect_sdk: ^1.0.1" to clipboard
optris_connect_sdk: ^1.0.1 copied to clipboard

Optris ffi adapter for Optris Connect SDK

example/optris_connect_sdk_example.dart

import 'package:optris_connect_sdk/optris_connect_sdk.dart';

int main() {
  bool connected = false;
  OptrisConnect c = OptrisConnect(index: 0, isX64: true);
  print("[Main] Starting communication with Optris Connect");
  if (!c.init()) {
    print("[Main] Initialisation failed");
    return -1;
  }
  if (!c.run()) {
    print("[Main] Run failed");
    return -1;
  }
  int state = c.getICPState(true);
  if (state & IPCEvent.IPC_EVENT_SERVER_STOPPED != 0) {
    connected = false;
    return 0;
  }
  if (!connected && (state & IPCEvent.IPC_EVENT_INIT_COMPLETED != 0)) {
    connected = true;
  }
  FrameConfiguration? f = c.tryFrameConfig();
  if ((state & IPCEvent.IPC_EVENT_FRAME_INIT != 0) && (f != null)) {
    if(c.available()){
      IRImage? frame = c.getFrame();
      // Do something with the frame
      if(frame != null){
        MaxMinPair pair =  frame.coldHot();
      }
    }
    c.imagerProcessMessage();
  }
  return 0;
}
0
likes
90
pub points
0%
popularity

Publisher

unverified uploader

Optris ffi adapter for Optris Connect SDK

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

ffi, path

More

Packages that depend on optris_connect_sdk