Skip to content

Instantly share code, notes, and snippets.

View tasosxak's full-sized avatar
:octocat:
Working from home

Tasos Temp tasosxak

:octocat:
Working from home
View GitHub Profile
/* Generic Monitoring Code common for all properties. */
import net.sf.javabdd.{BDD, BDDFactory}
import java.io._
import org.apache.commons.csv.{CSVFormat, CSVRecord}
import scala.collection.mutable.ListBuffer
import scala.collection.JavaConverters._
#include "Deploy.hpp"
#include <Launcher.hpp>
#include <fmi2Functions.h>
#include <fmi2FunctionTypes.h>
#include <Variables.hpp>
/*
* The "static" includes (the one we use inconditionnaly)
*/
@tasosxak
tasosxak / tracemonitor_runtime_with_master.scala
Last active April 28, 2022 13:18
tracemonitor_runtime_with_master.scala
var moni_ = new PropertyMonitor
def eval(event: String): Boolean = {
//println("MONITOR RECEIVED: ", event)
openResultFile("dejavu-results")
var input = event.split(",")
var name = input(0)
var args = new ListBuffer[Any]()
Options.BITS = 20
@tasosxak
tasosxak / FMI_Master_Runtime_Monitor.cpp
Created April 28, 2022 13:00
FMI Master with runtime monitor in C++ (DEPLOY_TEMPLATE.cpp)
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string>
#include <cstring>
#include <fmi2Functions.h>
#include <fmi2FunctionTypes.h>
#include <iostream>
#include <jni.h>
using namespace std;