All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javafmi.proxy.Status Maven / Gradle / Ivy

Go to download

javaFMI is a Java Library for the functional mock-up interface (or FMI). FMI defines a standardized interface to be used in computer simulations. The FMI Standard has beed developed by a large number of software companies and research centers that have worked in a cooperation project under the name of MODELISAR. This library addresses the connection of a java application with a FMU (functional mock-up unit).

There is a newer version: 2.26.5
Show newest version
/*
 *  Copyright 2013-2016 SIANI - ULPGC
 *
 *  This File is part of JavaFMI Project
 *
 *  JavaFMI Project is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License.
 *
 *  JavaFMI Project is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with JavaFMI. If not, see .
 */

package org.javafmi.proxy;

public class Status {

    public static final Status OK = new Status("ok", 0);
    public static final Status WARNING = new Status("warning", 1);
    public static final Status DISCARD = new Status("discard", 2);
    public static final Status ERROR = new Status("error", 3);
    public static final Status FATAL = new Status("fatal", 4);
    public static final Status PENDING = new Status("pending", 5);
    private static Status[] status = {OK, WARNING, DISCARD, ERROR, FATAL, PENDING};
    private String value;
    private int code;

    public Status(String value, int code) {
        this.value = value;
        this.code = code;
    }

    public static Status translateStatus(Integer code) {
        return status[code];
    }

    public String getValue() {
        return value;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String toString() {
        return value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy