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)
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)
def say(): return notify.say(flask.request.args)
def wakeup_time_say(): say("you need to wakeup for {}".format( events.wakeup_time().strftime("%-I:%M %P"))) return wakeup_time()
def first_event_say(): say("your first event tomorrow is at {}".format( events.first_event_time().strftime("%-I:%M %P"))) return first_event()
def printNames(): out = 'digital:\n' for k in logic.keys(): out += ' ' + k + '\n' notify.say(out)
def giveLogic(dtype): notify.say(logic[dtype]['help'])
def addTask(command, target): task.append((command, target)) if GLOB.notify_new_task: notify.say('INFO new task: \'' + str(command) + '\' on \'' + str(target) + '\'')
def printReport(): out = 'wires:\n' for w in bus.keys(): out += giveReport(w, full=False) notify.say(out)
def printNames(): out = 'wires:\n' for w in bus.keys(): out += w + '\n' notify.say(out)