Beispiel #1
0
"""

from time import sleep
from random import random
import math

from royweb import PacketHandler

from docopt import docopt

arguments = docopt(__doc__)

udp_ip = arguments["--ip"]
udp_port = int(arguments["--port"])

ph = PacketHandler(udp_ip, udp_port)

print("UDP target IP: {0}".format(udp_ip))
print("UDP target port: {0}".format(udp_port))


i = 100
while True:
    value = [(random()*10, random()*10), (random()*10, random()*10),
             (random()*10, random()*10), (random()*10, random()*10),
             (random()*10, random()*10), (random()*10, random()*10),
             (random()*10, random()*10), (random()*10, random()*10),
             (random()*10, random()*10), (random()*10, random()*10),
             (random()*10, random()*10), (random()*10, random()*10),
             (random()*10, random()*10), (random()*10, random()*10)]
    ph.send('scatter', value, '', '',)
Beispiel #2
0
#!/usr/bin/env python
from time import sleep
from random import random
import math

from royweb import PacketHandler

udp_ip = "127.0.0.1"
udp_port = 9999

ph = PacketHandler(udp_ip, udp_port)

print("UDP target IP: {0}".format(udp_ip))
print("UDP target port: {0}".format(udp_port))


while True:
    value = 100000 - 1000 + random()*2000
    ph.send('int', int(value), 'The foo parameter description.',)
    ph.send('str', str(value), 'The foo parameter description.',)
    sleep(1)
Beispiel #3
0
#!/usr/bin/env python
from time import sleep
from random import random
import math

from royweb import PacketHandler

udp_ip = "127.0.0.1"
udp_port = 9999

ph = PacketHandler(udp_ip, udp_port)

print("UDP target IP: {0}".format(udp_ip))
print("UDP target port: {0}".format(udp_port))


i = 100
while True:
    value = random()*50
    ph.send('high_freq', value, 'Photons', 'High freq.',)
    sleep(random() / 10.0)

    i += 1
Beispiel #4
0
#!/usr/bin/env python
from time import sleep
from random import random
import math

from royweb import PacketHandler

udp_ip = "127.0.0.1"
udp_port = 9999

ph = PacketHandler(udp_ip, udp_port)

print("UDP target IP: {0}".format(udp_ip))
print("UDP target port: {0}".format(udp_port))


i = 100
while True:
    value = 100000 - 1000 + random()*2000
    ph.send('foo2', value, 'MHz', 'The foo parameter description.',)
    sleep(random()*0.2+0.1)

    value = 50000 - 10 + random()*20
    ph.send('bar2', value, 'kHz', 'The bar parameter description.',)
    sleep(random()*0.2+0.1)

    value = 1000 - 500 + random()*500
    ph.send('narf2', value, 'kHz', 'The narf parameter description.',)
    sleep(random()*0.2+0.1)

    value = 100 - 50 + random()*50
Beispiel #5
0
#!/usr/bin/env python
from time import sleep
from random import random
import math

from royweb import PacketHandler

udp_ip = "127.0.0.1"
udp_port = 9999

ph = PacketHandler(udp_ip, udp_port)

print("UDP target IP: {0}".format(udp_ip))
print("UDP target port: {0}".format(udp_port))


i = 100
while True:
    value = 100000 - 1000 + random()*2000
    ph.send('arr', (10, 15, 12), 'MHz', 'The foo parameter description.',)
    sleep(random()*0.2+0.1)

    i += 1
Beispiel #6
0
"""

from time import sleep
from random import random
import math

from royweb import PacketHandler

from docopt import docopt

arguments = docopt(__doc__)

udp_ip = arguments["--ip"]
udp_port = int(arguments["--port"])

ph = PacketHandler(udp_ip, udp_port)

print("UDP target IP: {0}".format(udp_ip))
print("UDP target port: {0}".format(udp_port))


i = 100
while True:
    value = 100000 - 1000 + random()*2000
    ph.send('foo', value, 'MHz', 'The foo parameter description.',)
    sleep(random()*0.2+0.1)

    value = 50000 - 10 + random()*20
    ph.send('bar', value, 'kHz', 'The bar parameter description.',)
    sleep(random()*0.2+0.1)