temp = uniform(20.0, 21.0)
self.send(msg[1], temp)
# request a wakeup message, with the wakeup .payload = msg[1] = Subscriber address
self.wakeupAfter(generator_period, msg[1])
if isinstance(msg, WakeupMessage):
temp = uniform(20.0, 21.0)
self.send(msg.payload, temp) # Send Subscriber the next value
self.wakeupAfter(generator_period, msg.payload) # schedule next send to Subscriber
if isinstance(msg, float):
# ... do something with Subscriber response ...
Hopefully this gives you some useful suggestions to create the Actor configuration you need in your work.
Regards,
Kevin