"CPU_TEMPERATURE",
            "Measure CPU temperature for fingerprinting",
            TypeDescription(TypeDescriptor.FINGERPRINT, "FP_CPU_TEMPERATURE",
                            ""),
            "/CPU_TEMPERATURE",
        ))
    myMsbClient.addFunction(f_cpu_temp)

    f_storage_speeds = Function(
        "STORAGE_W_SPEED",
        "Measure storage speed",
        "Measure the CPU Speed for fingerprinting",
        DataType.DOUBLE,
        startReadFineParticle,
        False,
        [],
    )
    f_storage_speeds.addMetaData(
        CustomMetaData(
            "STORAGE_W_SPEED",
            "Measure the CPU Speed for fingerprinting",
            TypeDescription(TypeDescriptor.FINGERPRINT, "FP_STORAGE_W_SPEED",
                            ""),
            "/STORAGE_W_SPEED",
        ))
    myMsbClient.addFunction(f_storage_speeds)

    print(myMsbClient.objectToJson(myMsbClient.getSelfDescription()))

    myMsbClient.connect(msb_url)
    myMsbClient.register()
示例#2
0
import datetime
import threading
import uuid
import time

from msb_client.ComplexDataFormat import ComplexDataFormat
from msb_client.DataType import DataType
from msb_client.Event import Event
from msb_client.Function import Function
from msb_client.MsbClient import MsbClient

if __name__ == "__main__":

    myMsbClient = MsbClient()

    myMsbClient.enableDebug(True)
    myMsbClient.disableHostnameVerification(True)
    myMsbClient.disableEventCache(False)

    print(myMsbClient.objectToJson(myMsbClient.getSelfDescription()))

    myMsbClient.connect()

    myMsbClient.register()