Direkt zum Hauptinhalt

Initiator: Generisches Python-Template für "Process"

Analog

Generisches zum Process Python-Template für AktorenInitiatoren

gibt

Dieses esTemplate dasschreibt auchabwechseln alle 2 Sekunden den Zustand Free und den Zustand InUse durch einen Nutzer für Initiatoren.eine HierRessource.

ein

Erlaubte schlankesZustände Beispiel:sind:

 

#!/usr/bin/env python

import sys
import time

while True:
    print('{ "state": { "1.3.6.1.4.1.48398.612.2.4": { "state": "Free" } } }')
    sys.stdout.flush()
    time.sleep(2)

    print('{ "state": { "1.3.6.1.4.1.48398.612.2.4": { "state": { "InUse": { "id": "Testuser" } } } } }')
    sys.stdout.flush()
    time.sleep(2)

Siehe auch Aktor: Generisches Python-Template für "Process"