f_start_fp_detection = Function(
        "START_FP_DETECTION",
        "Start fine particle measurement",
        "Starts the Process of fine particle measurements",
        DataType.BOOLEAN,
        startReadFineParticle,
        False,
        ["PARTICLE_CONCENTRATION"],
    )
    f_start_fp_detection.addMetaData(
        CustomMetaData(
            "Funktion_Temperatur",
            "Funktion_Umgebungstemperatur",
            TypeDescription(
                TypeDescriptor.CDD,
                "0112/2///61987#ABT514#001",
                "https://cdd.iec.ch/cdd/iec61987/iec61987.nsf/ListsOfUnitsAllVersions/0112-2---61987%23ABT514",
            ),
            "/START_FP_DETECTION",
        ))
    myMsbClient.addFunction(f_start_fp_detection)

    e_cpu_speed_reading = Event(
        "CPU_SPEED_READINGS",
        "CPU speed readings",
        "CPU speed readings for fingerprinting",
        DataType.DOUBLE,
        1,
        True,
    )
        "Function1",
        "Function1_description",
        DataType.STRING,
        printMsg,
        True,
        [],
    )
    # add function objects to MSB client
    myMsbClient.addFunction(function1)

    function1.addMetaData(
        CustomMetaData(
            "Funktion_Temperatur",
            "Funktion_Umgebungstemperatur",
            TypeDescription(
                TypeDescriptor.CUSTOM,
                "0112/2///61987#ABT514#001",
                "https://cdd.iec.ch/cdd/iec61987/iec61987.nsf/ListsOfUnitsAllVersions/0112-2---61987%23ABT514",
            ),
            "/FUNCTION1",
        ))

    # optionally, add function directly in line
    # this example has one response event.
    # myMsbClient.addFunction(
    #     "FUNCTION2",
    #     "Function2",
    #     "Function2_description",
    #     DataType.STRING,
    #     sendResponseEventExample,
    #     False,
    )

    e_result = Event(
        "RESULT",
        "RESULT",
        "RESULT",
        DataType.STRING,
        1,
        False,
    )

    f_authenticate = Function("AUTHENTICATE", "AUTHENTICATE", "AUTHENTICATE",
                              DataType.STRING, f_func1, False)

    f_authenticate.addMetaData(
        CustomMetaData("CPU_SPEED", "Verify CPU_SPEED measurement array",
                       TypeDescription(TypeDescriptor.CUSTOM, "CPU_SPEED", ""),
                       "/F_AUTHENTICATE", "CPU_SPEED", DataType.FLOAT, True))

    myMsbClient.addEvent(e_auth)
    myMsbClient.addEvent(e_result)

    myMsbClient.addFunction(f_authenticate)

    # myMsbClient.addMetaData(
    #     CustomMetaData(
    #         "SEN",
    #         "Sensor - device which, when excited by a physical phenomenon, produces an electric signal characterizing the physical phenomenon",
    #         TypeDescription(
    #             TypeDescriptor.CDD,
    #             "0112/2///61360_4#AAA103#001",
    #             "https://cdd.iec.ch/cdd/iec61360/iec61360.nsf/2a050a792eee78e1c12575560054b803/219d27329351ec25c1257dd300515f69",
예제 #4
0
    f_start_fp_detection = Function(
        "FINGERPRINT_DET",
        "Start fine particle measurement",
        "Starts the Process of fine particle measurements",
        DataType.BOOLEAN,
        startReadFineParticle,
        False,
        ["PARTICLE_CONCENTRATION"],
    )
    f_start_fp_detection.addMetaData(
        CustomMetaData(
            "Funktion_Temperatur",
            "Funktion_Umgebungstemperatur",
            TypeDescription(
                TypeDescriptor.CDD,
                "0112/2///61987#ABT514#001",
                "https://cdd.iec.ch/cdd/iec61987/iec61987.nsf/ListsOfUnitsAllVersions/0112-2---61987%23ABT514",
            ),
            "",
        ))
    myMsbClient.addFunction(f_start_fp_detection)

    e_cpu_speed_reading = Event(
        "RESULT_CPU_SPEED_READINGS",
        "CPU speed readings",
        "CPU speed readings for fingerprinting",
        DataType.DOUBLE,
        1,
        True,
    )