#!/usr/bin/env python2

"""vcosc

Usage:
    osc.py client <address> <port> <path> <value> <time>
    osc.py daemon

"""

from vcosc import gpio
from vcosc import osc
from docopt import docopt

if __name__ == '__main__':
    args = docopt(__doc__, version="Vcosc 0.0.1")

    if args['client'] is True:
        # Start client and send message, then exit
        client = osc.Client(args['<address>'], int(args['<port>']))
        client.bundle([(args['<path>'], int(args['<value>']), float(args['<time>']))])

    elif args['daemon'] is True:
        # Run the osc server foreverrrrrrr
        daemon = osc.Daemon()
