Ejemplo n.º 1
0
def help():
    out += 'Digital devices\n'
    out += '    giveNames() - returns types of known devices\n'
    out += '    printNames() - print types of known devices\n'
    out += '    process(dtype, input set, output set) - simulate chip\n'
    out += '    giveLogic(dtype) - shows help for given device type\n'
    out += '\n'
    notify.say(out)
Ejemplo n.º 2
0
def help():
    out = ''
    out += 'Wire module. Connects devices\n'
    out += '    giveNames() - returnes wires\' names \n'
    out += '    printNames() - prints wires\' names\n'
    out += '    giveReport(name) - returns data for one wire\n'
    out += '    printReport() - prints data for wires\n'
    out += '    readV(name) - returns value of a wire\n'
    out += '    setV(name, value) - set values for wire\n'
    out += '                value is a list \n'
    out += '    setBinary(name, value) - \n'
    out += '                value can be an int (will be converted to binary)\n'
    out += '                value can be a binary string, 1 - high, else - low\n'
    out += '    connect(wire name, device name) - adds listener\n'
    out += '    addBus(name, size) - adds new bus with given size\n'
    notify.say(out)
Ejemplo n.º 3
0
def say():
    return notify.say(flask.request.args)
Ejemplo n.º 4
0
def wakeup_time_say():
    say("you need to wakeup for {}".format(
        events.wakeup_time().strftime("%-I:%M %P")))
    return wakeup_time()
Ejemplo n.º 5
0
def first_event_say():
    say("your first event tomorrow is at {}".format(
        events.first_event_time().strftime("%-I:%M %P")))
    return first_event()
Ejemplo n.º 6
0
def printNames():
    out = 'digital:\n'
    for k in logic.keys():
        out += '    ' + k + '\n'
    notify.say(out)
Ejemplo n.º 7
0
def giveLogic(dtype):
    notify.say(logic[dtype]['help'])
Ejemplo n.º 8
0
def addTask(command, target):
    task.append((command, target))
    if GLOB.notify_new_task:
        notify.say('INFO new task: \'' + str(command) + '\' on \'' +
                   str(target) + '\'')
Ejemplo n.º 9
0
def printReport():
    out = 'wires:\n'
    for w in bus.keys():
        out += giveReport(w, full=False)
    notify.say(out)
Ejemplo n.º 10
0
def printNames():
    out = 'wires:\n'
    for w in bus.keys():
        out += w + '\n'
    notify.say(out)