Skip to content
Snippets Groups Projects
Commit ad56656c authored by ptangu01's avatar ptangu01
Browse files

add license and Copyright

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/trunk@209 b32b6428-25c9-4566-ad07-03861ab6144f
parent c8ec58f0
No related branches found
No related tags found
No related merge requests found
=================
xAALCache
=================
Cache application for xAAL devices
"""
Copyright 2014 Jerome Kerdreux, Philippe Tanguy, Telecom Bretagne.
This file is part of xAAL.
xAAL is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
xAAL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with xAAL. If not, see <http://www.gnu.org/licenses/>.
"""
import datetime
from xAAL import tools
......
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import cjson
import sys
import argparse
from xAAL.Devices import XAALDevice
from xAAL.Core import XAALEngine
from xAAL.Messages import XAALMessage
#Parser
parser = argparse.ArgumentParser(description='Command line interface to query a xAAL cache device .')
parser.add_argument('--setTarget',
type=str,
required=True,
help='xAAL device address')
parser.add_argument('--setAction',
type=str,
help='choose one method in the schema of the xAAL device target ;-)')
parser.add_argument('-a','--address',
dest="address",
type=int,
help='add parameter address according to setAction if necessary')
parser.add_argument('--busAddr',
dest="addr",
type=str,
help='add parameter ADDR according to setAction if necessary')
parser.add_argument('--port',
dest="port",
type=int,
help='add parameter PORT according to setAction if necessary')
parser.add_argument('--stackVersion',
dest="stack_version",
type=str,
help='add parameter STACK_VERSION according to setAction if necessary')
parser.add_argument('--ttl',
dest="ttl",
type=int,
help='add parameter TTL according to setAction if necessary')
args = parser.parse_args()
#Create xAALMetadataCLI device
metadataCLI = XAALDevice()
metadataCLI.setType('cmdLineHack')
metadataCLI.setAddress('b03d8f48-335f-4b43-9469-d8b016210cf3')
#Create message to send: msgTx
msgTx={}
msgTx["target"] = args.setTarget
msgTx["msgtype"] = 'request'
msgTx["action"] = args.setAction
body={}
if args.address:
body["address"] = args.address
if args.addr:
body["addr"] = args.addr
if args.port:
body["port"] = args.port
if args.stack_version:
body["stack_version"] = args.stack_version
if args.ttl:
body["ttl"] = args.ttl
if body:
msgTx["body"]=body
#Create engine
eng = XAALEngine()
#eng.addDevice(metadataCLI)
#Send msgTx
eng.send(dev=metadataCLI,**msgTx)
=================
xAALMetadataDb
=================
Metadata application for xAAL devices
*xAALMetadataCLI.py command line
"""
Copyright 2014 Jerome Kerdreux, Philippe Tanguy, Telecom Bretagne.
This file is part of xAAL.
xAAL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
xAAL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with xAAL. If not, see <http://www.gnu.org/licenses/>.
"""
import sys
import os
from settings import *
......
"""
Copyright 2014 Jerome Kerdreux, Philippe Tanguy, Telecom Bretagne.
This file is part of xAAL.
xAAL is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
xAAL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with xAAL. If not, see <http://www.gnu.org/licenses/>.
"""
from sqlobject import *
from sqlobject.sqlbuilder import *
......
"""
Copyright 2014 Jerome Kerdreux, Philippe Tanguy, Telecom Bretagne.
This file is part of xAAL.
xAAL is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
xAAL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with xAAL. If not, see <http://www.gnu.org/licenses/>.
"""
import os
from sqlobject import connectionForURI, sqlhub
......
"""
Copyright 2014 Jerome Kerdreux, Philippe Tanguy, Telecom Bretagne.
This file is part of xAAL.
xAAL is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
xAAL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with xAAL. If not, see <http://www.gnu.org/licenses/>.
"""
import models
import inspect
......
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import cjson
import sys
import argparse
from xAAL.Devices import XAALDevice
from xAAL.Core import XAALEngine
from xAAL.Messages import XAALMessage
#Parser
parser = argparse.ArgumentParser(description='Command line interface to send xAAL messages.')
parser.add_argument('--setTarget',
type=str,
required=True,
help='xAAL device address')
parser.add_argument('--setAction',
type=str,
help='choose one method in the schema of the xAAL device target ;-)')
parser.add_argument('-t','--tagname',
dest="name",
type=str,
help='add parameter tagname according to setAction if necessary')
parser.add_argument('-a','--address',
dest="address",
type=int,
help='add parameter address according to setAction if necessary')
parser.add_argument('--busAddr',
dest="addr",
type=str,
help='add parameter ADDR according to setAction if necessary')
parser.add_argument('--port',
dest="port",
type=int,
help='add parameter PORT according to setAction if necessary')
parser.add_argument('--stackVersion',
dest="stack_version",
type=str,
help='add parameter STACK_VERSION according to setAction if necessary')
parser.add_argument('--ttl',
dest="ttl",
type=int,
help='add parameter TTL according to setAction if necessary')
args = parser.parse_args()
#Create xAALMetadataCLI device
metadataCLI = XAALDevice()
metadataCLI.setType('cmdLineHack')
metadataCLI.setAddress('dd4508ae-f1a6-4bf5-ab8d-f1b6e09128d5')
#Create message to send: msgTx
msgTx={}
msgTx["target"] = args.setTarget
msgTx["msgtype"] = 'request'
msgTx["action"] = args.setAction
body={}
#if args.address and args.name:
# print "2 arguments"
# body["address"] = args.address
# body["name"] = args.name
if args.name:
body["name"] = args.name
if args.address:
body["address"] = args.address
if args.addr:
body["addr"] = args.addr
if args.port:
body["port"] = args.port
if args.stack_version:
body["stack_version"] = args.stack_version
if args.ttl:
body["ttl"] = args.ttl
if body:
msgTx["body"]=body
#Create engine
eng = XAALEngine()
#eng.addDevice(metadataCLI)
#Send msgTx
eng.send(dev=metadataCLI,**msgTx)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment