Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • android_compatible_0.14
  • ipaaca-json
  • ipaaca-rsb
  • ipaaca3-dev
  • ipaaca4
  • ipaaca4py3
  • kompass
  • legacy-str
  • master
  • mqtt_port
  • rsb0.11
  • rsb0.14
  • ryt-fullport
  • softwareweek2019
  • windows-compatibility
15 results

Target

Select target project
  • scs/ipaaca
  • ramin.yaghoubzadeh/ipaaca
2 results
Select Git revision
  • ipaaca-rsb
  • ipaaca3-dev
  • ipaaca4
  • kompass
  • master
  • rsb0.14
6 results
Show changes
Showing
with 1512 additions and 0 deletions
# -*- coding: utf-8 -*-
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Social Cognitive Systems Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
from __future__ import division, print_function
import os
import threading
import ipaaca.buffer
import ipaaca.iu
import ipaaca.misc
import ipaaca.util.timesync
__all__ = [
'NotificationState',
'ComponentError',
'ComponentNotifier'
]
NotificationState = ipaaca.misc.enum(
NEW = 'new',
OLD = 'old',
DOWN = 'down'
)
class ComponentError(Exception):
def __init__(self, msg):
super(ComponentError, self).__init__(msg)
class ComponentNotifier(object):
NOTIFY_CATEGORY = "componentNotify"
CONTROL_CATEGORY = "componentControl"
SEND_CATEGORIES = "send_categories"
RECEIVE_CATEGORIES = "recv_categories"
CMD = "cmd"
STATE = "state"
NAME = "name"
WHO = "who" # list of names (or empty)
FUNCTION = "function"
PID = "pid"
CMD_REPORT = "report"
def __init__(self, component_name, component_function, send_categories, receive_categories, out_buffer=None, in_buffer=None):
self.component_name = component_name
self.component_function = component_function
self.send_categories = frozenset(send_categories)
self.receive_categories = frozenset(receive_categories)
self.in_buffer = in_buffer if in_buffer is not None else ipaaca.buffer.InputBuffer(component_name + 'Notifier')
self.out_buffer = out_buffer if out_buffer is not None else ipaaca.buffer.OutputBuffer(component_name + 'Notifier')
self.terminated = False
self.initialized = False
self.notification_handlers = []
self.initialize_lock = threading.Lock()
self.notification_handler_lock = threading.Lock()
self.submit_lock = threading.Lock()
# clock sync code, sync slave/master pair will be installed when launched
self.timesync_slave = None
self.timesync_master = None
self.timesync_master_handlers = []
self.timesync_slave_handlers = []
def _submit_notify(self, is_new):
with self.submit_lock:
notify_iu = ipaaca.iu.Message(ComponentNotifier.NOTIFY_CATEGORY)
notify_iu.payload = {
ComponentNotifier.NAME: self.component_name,
ComponentNotifier.FUNCTION: self.component_function,
ComponentNotifier.SEND_CATEGORIES: ",".join(self.send_categories),
ComponentNotifier.RECEIVE_CATEGORIES: ",".join(self.receive_categories),
ComponentNotifier.STATE: NotificationState.NEW if is_new else NotificationState.OLD,
}
self.out_buffer.add(notify_iu)
def terminate(self):
with self.submit_lock:
if self.terminated: return
self.terminated = True
notify_iu = ipaaca.iu.Message(ComponentNotifier.NOTIFY_CATEGORY)
notify_iu.payload = {
ComponentNotifier.NAME: self.component_name,
ComponentNotifier.FUNCTION: self.component_function,
ComponentNotifier.SEND_CATEGORIES: ",".join(self.send_categories),
ComponentNotifier.RECEIVE_CATEGORIES: ",".join(self.receive_categories),
ComponentNotifier.STATE: NotificationState.DOWN,
}
self.out_buffer.add(notify_iu)
def _handle_iu_event(self, iu, event_type, local):
if iu.category == ComponentNotifier.NOTIFY_CATEGORY:
if iu.payload[ComponentNotifier.NAME] == self.component_name:
return
with self.notification_handler_lock:
for h in self.notification_handlers:
h(iu, event_type, local)
if iu.payload[ComponentNotifier.STATE] == "new":
#print("submitting")
self._submit_notify(False)
elif iu.category == ComponentNotifier.CONTROL_CATEGORY:
cmd = iu.payload[ComponentNotifier.CMD]
if cmd=='report':
# Request to report (by component controller)
who = iu.payload[ComponentNotifier.WHO]
# If we are named specifically or it's a broadcast
if len(who)==0 or self.component_name in who:
self._submit_notify(False)
def add_notification_handler(self, handler):
with self.notification_handler_lock:
self.notification_handlers.append(handler)
def launch_timesync_slave_handlers(self, master, slave, latency, offset):
for h in self.timesync_slave_handlers:
h(master, slave, latency, offset)
def launch_timesync_master_handlers(self, master, slave, latency, offset):
for h in self.timesync_master_handlers:
h(master, slave, latency, offset)
def add_timesync_slave_handler(self, handler):
self.timesync_slave_handlers.append(handler)
def add_timesync_master_handler(self, handler):
self.timesync_master_handlers.append(handler)
def send_master_timesync(self):
#if len(self.timesync_master_handlers)==0:
# print('Warning: Sending a master timesync without a registered result callback.')
self.timesync_master.send_master_timesync()
def initialize(self):
with self.initialize_lock:
if self.terminated:
raise ComponentError('Attempted to reinitialize component '+component_name+' after termination')
if (not self.initialized):
self.timesync_slave = ipaaca.util.timesync.TimesyncSlave(component_name=self.component_name, timing_handler=self.launch_timesync_slave_handlers)
self.timesync_master = ipaaca.util.timesync.TimesyncMaster(component_name=self.component_name, timing_handler=self.launch_timesync_master_handlers)
self.in_buffer.register_handler(self._handle_iu_event, ipaaca.iu.IUEventType.MESSAGE, [ComponentNotifier.NOTIFY_CATEGORY, ComponentNotifier.CONTROL_CATEGORY])
self._submit_notify(True)
self.initialized = True
def __enter__(self):
self.initialize()
return self
def __exit__(self, t, v, tb):
self.terminate()
return self
# -*- coding: utf-8 -*-
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Social Cognitive Systems Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
from __future__ import division, print_function
import threading
import time
import ipaaca.buffer
import ipaaca.iu
class TimesyncMaster(object):
def __init__(self, component_name=None, timing_handler=None, debug_offset=0):
self.ob = ipaaca.buffer.OutputBuffer(('' if component_name is None else component_name)+'TimesyncMaster')
self.ib = ipaaca.buffer.InputBuffer(('' if component_name is None else component_name)+'TimesyncMaster', ['timesyncReply'])
# component name to report (None => use buffer name)
self.component_name = component_name if component_name is not None else self.ob.unique_name
#
#self.ob.register_handler(self.handle_timesync_master)
self.ib.register_handler(self.handle_timesync_master)
# master_t1 is identical for all slaves
self.master_t1 = None
self.slave_t1s = {}
self.master_t2s = {}
self.slave_t2s = {}
self.latencies = {}
self.time_offsets = {}
#
self.debug_offset = debug_offset
#
self.timing_handler = timing_handler
def set_timing_handler(self, timing_handler):
self.timing_handler = timing_handler
def send_master_timesync(self):
iu = ipaaca.iu.Message('timesyncRequest')
self.master_t1 = self.get_time()
iu.payload = {
'stage':'0',
'master_t1':str(self.master_t1),
'master':self.component_name,
}
self.ob.add(iu)
def handle_timesync_master(self, iu, event_type, own):
master = iu.payload['master']
if not own and master == self.component_name:
if event_type == ipaaca.IUEventType.ADDED or event_type == ipaaca.IUEventType.UPDATED:
if self.component_name == master:
# reply to our own initial IU
slave = iu.payload['slave']
stage = iu.payload['stage']
if stage=='1':
# initial reply by slave
t1 = iu.payload['slave_t1']
self.slave_t1s[slave] = float(t1)
t2 = self.master_t2s[slave] = self.get_time()
iu.payload.merge({'master_t2': str(t2), 'stage':'2'})
latency1 = t2 - self.master_t1
#print('Before stage 1 for '+slave+': '+str(self.latencies))
self.latencies[slave] = latency1
#print('After stage 1 for '+slave+': '+str(self.latencies))
#print('Latency of round-trip 1: %.3f' % latency1)
elif stage=='3':
#print('At stage 3 for '+slave+': '+str(self.latencies))
# second reply by slave
t2 = iu.payload['slave_t2']
self.slave_t2s[slave] = float(t2)
t_final = self.get_time()
latency1 = self.latencies[slave]
latency2 = t_final - self.master_t2s[slave]
latency = self.latencies[slave] = (latency1+latency2)/2.0
offset1 = (self.slave_t1s[slave]-self.master_t1)-latency/2.0
offset2 = (self.slave_t2s[slave]-self.master_t2s[slave])-latency/2.0
offset = (offset1+offset2)/2.0
iu.payload.merge({'stage':'4', 'latency': str(latency), 'offset':str(offset)})
if self.timing_handler is None:
print('Determined timing of timesync slave '+slave)
print(' Avg round-trip latency: %.3f s'%latency)
print(' Offset of their clock: %.3f s'%offset)
else:
self.timing_handler(self.component_name, slave, latency, offset)
else:
# other stages are handled by time slave handler
pass
def get_time(self):
return time.time() + self.debug_offset
class TimesyncSlave(object):
def __init__(self, component_name=None, timing_handler=None, debug_offset=0):
self.ob = ipaaca.buffer.OutputBuffer(('' if component_name is None else component_name)+'TimesyncSlave')
self.ib = ipaaca.buffer.InputBuffer(('' if component_name is None else component_name)+'TimesyncSlave', ['timesyncRequest'])
# component name to report (None => use buffer name)
self.component_name = component_name if component_name is not None else self.ib.unique_name
self.ob.register_handler(self.handle_timesync_slave)
self.ib.register_handler(self.handle_timesync_slave)
#self.master_t1 = None
#self.master_t2 = None
#self.master = None
self.latency = None
#
self.debug_offset = debug_offset
#
self.timing_handler = timing_handler
def set_timing_handler(self, timing_handler):
self.timing_handler = timing_handler
def handle_timesync_slave(self, iu, event_type, own):
master = iu.payload['master']
stage = iu.payload['stage']
if self.component_name != master:
if not own and stage=='0':
# reply only to IUs from others
#print('Received stage 0 from master '+master)
# initial reply to master
myiu = ipaaca.iu.IU('timesyncReply')
# TODO: add grounded_in link too?
t1 = self.get_time()
myiu.payload = iu.payload
myiu.payload['slave'] = self.component_name
myiu.payload['slave_t1'] = str(t1)
myiu.payload['stage'] = '1'
self.ob.add(myiu)
elif iu.payload['slave'] == self.component_name:
if stage=='2':
#print('Received stage 2 from master '+master)
t2 = self.get_time()
iu.payload.merge({
'slave_t2':str(t2),
'stage':'3',
})
elif stage=='4':
latency = float(iu.payload['latency'])
offset = float(iu.payload['offset'])
if self.timing_handler is None:
print('Timesync master '+master+' determined our timing: ')
print(' Avg round-trip latency: %.3f s'%latency)
print(' Offset of our clock: %.3f s'%offset)
else:
self.timing_handler(master, self.component_name, latency, offset)
def get_time(self):
return time.time() + self.debug_offset
#!/usr/bin/env python
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Sociable Agents Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
import time
import logging
import ipaaca
iu_to_write = None
......@@ -38,8 +68,8 @@ while True:
else:
iu.payload = {'a': 'reset'}
except ipaaca.IUUpdateFailedError, e:
ipaaca.logger.warning("Payload update failed (IU changed in the mean time)")
except ipaaca.IUUpdateFailedError as e:
print("Payload update failed (IU changed in the mean time)")
time.sleep(0.1)
exit(0)
File moved
......@@ -2,5 +2,5 @@
import ipaaca
print "{this is the IpaacaPython run.py doing nothing at all}"
print("{this is the IpaacaPython run.py doing nothing at all}")
<ivy-module version="2.0">
<info organisation="ipaaca" module="IpaacaPythonTest"/>
<dependencies>
<dependency org="hamcrest" name="hamcrest-python" rev="latest.release"/>
<dependency org="mockito" name="mockito-python" rev="latest.release" />
<dependency org="nose" name="nose" rev="latest.release" />
</dependencies>
</ivy-module>
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Sociable Agents Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
import sys
import time
import unittest
import ipaaca
class Ponger(object):
def __init__(self):
self.count = 0
self.last_time = 0
self.ib = ipaaca.InputBuffer('PingIn', ['ping'])
self.ib.register_handler(self.handle_iu_event)
def handle_iu_event(self, iu, event_type, local):
if event_type=='UPDATED':
iu.payload['ack'] = 'ack'
def run(self):
while True:
time.sleep(1)
class Pinger(object):
def __init__(self):
self.ob = ipaaca.OutputBuffer('PingOut')
self.iu = ipaaca.IU('ping')
self.iu.payload = {'data':'0'}
self.ob.add(self.iu)
self.ob.register_handler(self.handle_iu_event)
self.counter = 0
self.last_time = time.time()
def handle_iu_event(self, iu, event_type, local):
print "Round-trip time:", 1000.0*(time.time()-self.last_time),"msec"
def run(self):
print "Sending a ping every second ..."
while True:
time.sleep(1.0)
self.counter += 1
self.last_time=time.time()
self.iu.payload['data'] = str(self.counter)
self.last_time=time.time()
class Receiver(object):
def __init__(self):
self.count = 0
self.last_time = 0
self.ib = ipaaca.InputBuffer('PowerIn', ['spam'])
self.ib.register_handler(self.handle_iu_event)
def handle_iu_event(self, iu, event_type, local):
if self.count==0: self.last_time=time.time()
self.count+=1
if self.count==1000:
print "Received 1k IU updates at", int(1000.0/(time.time()-self.last_time)), "Hz"
self.count=0
def run(self):
while True:
time.sleep(1)
class Sender(object):
def __init__(self, send_frequency):
self.ob = ipaaca.OutputBuffer('PowerOut')
self.iu = ipaaca.IU('spam')
self.data_prefix='A'*1024;
self.iu.payload = {'data':'0'}
self.ob.add(self.iu)
self.counter = 0
self.frequency = send_frequency
self.delay = 1.0/send_frequency
def run(self):
print "Sending with", self.delay ,"s delay - upper bound ",self.frequency,"Hz ..."
last_time = time.time()
while True:
time.sleep(self.delay)
self.counter += 1
self.iu.payload['data'] = str(self.counter)
#self.iu.payload = {
# 'data':self.data_prefix,
# 'data2':self.data_prefix,
# 'data3':self.data_prefix,
# 'data4':self.data_prefix,
# 'data5':self.data_prefix,
# 'data6':self.data_prefix,
# 'data7':self.data_prefix,
# 'data8':self.data_prefix,
# 'data9':self.data_prefix,
# }
if self.counter == 1000:
print "Sent 1k updates at", int(1000.0/(time.time()-last_time)),"Hz"
last_time = time.time()
self.counter = 0
#print ".",
#sys.stdout.flush()
class TestAcker(object):
def __init__(self):
self.ib = ipaaca.InputBuffer('TestIn', ['testcategory'])
self.ib.register_handler(self.handle_iu_event)
def handle_iu_event(self, iu, event_type, local):
print "Received a testcategory event ", event_type
if event_type=='ADDED':
try:
iu.payload['ack'] = 'ack'
except ipaaca.IUUpdateFailedError, e:
print "== tried to send an initial update, but someone else was quicker."
def run(self):
while True:
time.sleep(1)
if __name__ == '__main__':
if len(sys.argv)<2:
print "Stress test: specify either 'sender' or 'receiver' as an argument"
print " for the sender, you can additionally specify a delay (in 1/s)"
print " between 1 and 10000 please (=> 1 sec ... 0.0001 sec) [default: 1000 => 0.001 sec]"
print "Ping test: specify either 'ping' or 'pong' as an argument"
sys.exit(1)
if sys.argv[1] == 'ping':
r = Pinger()
r.run()
elif sys.argv[1] == 'pong':
r = Ponger()
r.run()
elif sys.argv[1] == 'receiver':
r = Receiver()
r.run()
elif sys.argv[1] == 'sender':
freq=1000
try:
freq = int(sys.argv[2])
except:
pass
if freq<1 or freq>10000:
print "Between 1 and 10000 please (=> 1 sec ... 0.0001 sec)"
sys.exit(1)
s = Sender(send_frequency=freq)
s.run()
elif sys.argv[1] == 'testacker':
r = TestAcker()
r.run()
else:
print "specify either 'sender', 'receiver', 'ping' or 'pong' as an argument"
sys.exit(1)
File moved
#!/usr/bin/env python
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Sociable Agents Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
import sys
import time
import unittest
import hamcrest as hc
import ipaaca
import sys
import unittest
def handle_iu_event(iu, event_type, local):
print('(IU event '+event_type+' '+str(iu.uid)+')')
#print('(IU event '+event_type+' '+str(iu.uid)+')')
pass
class IpaacaIUStoreTestCase(unittest.TestCase):
def setUp(self):
......@@ -22,10 +52,10 @@ class IpaacaIUStoreTestCase(unittest.TestCase):
def tearDown(self):
pass
def testInputBufferContents(self):
self.assertIn(self.sensor_iu.uid, self.ib.iu_store)
hc.assert_that(self.ib.iu_store, hc.has_key(self.sensor_iu.uid))
self.assertEqual(len(self.ib.iu_store), 1)
def testOutputBufferContents(self):
self.assertIn(self.sensor_iu.uid, self.ob.iu_store)
hc.assert_that(self.ib.iu_store, hc.has_key(self.sensor_iu.uid))
self.assertEqual(len(self.ob.iu_store), 1)
class IpaacaPayloadTestCase(unittest.TestCase):
......@@ -41,6 +71,50 @@ class IpaacaPayloadTestCase(unittest.TestCase):
iu_received = self.ib.iu_store.get(self.sensor_iu.uid)
self.assertEqual(iu_received.payload["data"], 'sensordata')
class IpaacaCommitTestCases(unittest.TestCase):
def setUp(self):
self.ib = ipaaca.InputBuffer('TestIn', ['sensorcategory'])
self.ob = ipaaca.OutputBuffer('TestOut')
self.iu = ipaaca.IU('sensorcategory')
def testCommitBeforePublish(self):
self.iu.commit()
self.ob.add(self.iu)
time.sleep(0.1)
received_iu = self.ib.iu_store[self.iu.uid]
self.assertTrue(received_iu.committed)
def testCommitAfterPublish(self):
self.ob.add(self.iu)
self.iu.commit()
time.sleep(0.1)
received_iu = self.ib.iu_store[self.iu.uid]
self.assertTrue(received_iu.committed)
def testCommitAndLocalWrite(self):
self.ob.add(self.iu)
time.sleep(0.1)
self.iu.commit()
try:
self.iu.payload['data'] = 'updatedData'
self.fail("Expected an IUCommittedError but it was not raised.")
except ipaaca.IUCommittedError, e:
pass
def testCommitAndRemoteWrite(self):
self.ob.add(self.iu)
self.iu.commit()
time.sleep(0.1)
received_iu = self.ib.iu_store[self.iu.uid]
try:
received_iu.payload['data'] = 'updatedData'
self.fail("Expected an IUCommittedError but it was not raised.")
except ipaaca.IUCommittedError, e:
pass
class IpaacaLinksTestCase(unittest.TestCase):
def setUp(self):
self.ib = ipaaca.InputBuffer('TestIn', ['sensorcategory', 'decisioncategory'])
......@@ -58,10 +132,10 @@ class IpaacaLinksTestCase(unittest.TestCase):
self.ob.add(self.decision_iu)
time.sleep(0.1)
# test received version
self.assertIn(self.decision_iu.uid, self.ib.iu_store)
hc.assert_that(self.ib.iu_store, hc.has_key(self.decision_iu.uid))
received_iu = self.ib.iu_store[self.decision_iu.uid]
grinlinks = received_iu.get_links('grin')
self.assertIn(self.sensor_iu.uid, grinlinks)
hc.assert_that(grinlinks, hc.has_item(self.sensor_iu.uid))
self.assertEqual(len(grinlinks), 1)
def testSetAndRemoveSingleLink(self):
time.sleep(0.1)
......@@ -73,11 +147,40 @@ class IpaacaLinksTestCase(unittest.TestCase):
self.decision_iu.remove_links('grin', [self.sensor_iu.uid])
time.sleep(0.1)
# test received version
self.assertIn(self.decision_iu.uid, self.ib.iu_store)
hc.assert_that(self.ib.iu_store, hc.has_key(self.decision_iu.uid))
received_iu = self.ib.iu_store[self.decision_iu.uid]
grinlinks = received_iu.get_links('grin')
self.assertEqual(len(grinlinks), 0)
class IpaacaRemoteWriteTestCase(unittest.TestCase):
def setUp(self):
self.ib = ipaaca.InputBuffer('TestIn', ['sensorcategory'])
self.ib.register_handler(handle_iu_event)
self.ob = ipaaca.OutputBuffer('TestOut')
self.iu = ipaaca.IU('sensorcategory')
self.iu.payload = {'data': 'sensordata'}
time.sleep(0.1)
self.ob.add(self.iu)
time.sleep(0.1)
def tearDown(self):
pass
def testRemotePayloadChange(self):
hc.assert_that(self.ib.iu_store, hc.has_key(self.iu.uid))
received_iu = self.ib.iu_store[self.iu.uid]
received_iu.payload['data'] = 'updatedData'
time.sleep(0.1)
self.assertEqual(self.iu.payload['data'], 'updatedData')
def testRemotePayloadReplace(self):
hc.assert_that(self.ib.iu_store, hc.has_key(self.iu.uid))
received_iu = self.ib.iu_store[self.iu.uid]
received_iu.payload = { 'key1': 'value1', 'key2': 'value2' }
time.sleep(0.1)
self.assertEqual(len(self.iu.payload), 2)
self.assertEqual(self.iu.payload['key1'], 'value1')
self.assertEqual(self.iu.payload['key2'], 'value2')
if __name__ == '__main__':
unittest.main()
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Sociable Agents Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
import os
import time
import unittest
from mockito import mock
from mockito import verify
from mockito import any
from mockito import when
from mockito import times
from hamcrest.core.base_matcher import BaseMatcher
from ipaaca import IUEventType
from ipaaca import Message
from ipaaca import InputBuffer
from ipaaca import OutputBuffer
from ipaaca.util import ComponentNotifier
class IUCategoryMatcher(BaseMatcher):
def __init__(self, expected_cat):
self.expected_cat = expected_cat
def _matches_(self, iu):
return iu.category==self.expected_cat
def describe_to(self, description):
description.append_text("IU with category :"+self.expected_cat)
class ComponentNotifierTest(unittest.TestCase):
RECV_CAT = set(["testrec1", "testrc2"])
SEND_CAT = set(["testsnd1", "testsnd2", "testsnd3"])
def setUp(self):
self.mockOutBuffer = mock()
self.mockInBuffer = mock()
self.notifier = ComponentNotifier("testcomp","testfunc", ComponentNotifierTest.SEND_CAT, ComponentNotifierTest.RECV_CAT, self.mockOutBuffer, self.mockInBuffer)
self.notifier.initialize()
def tearDown(self):
pass
def _sendNotify(self, state, receiveCats):
mockIUNotify = Message(ComponentNotifier.NOTIFY_CATEGORY)
mockIUNotify.payload[ComponentNotifier.STATE] = state;
mockIUNotify.payload[ComponentNotifier.NAME] = "namex";
mockIUNotify.payload[ComponentNotifier.SEND_CATEGORIES] = "";
mockIUNotify.payload[ComponentNotifier.RECEIVE_CATEGORIES] = ",".join(receiveCats);
self.notifier._handle_iu_event(mockIUNotify, IUEventType.ADDED, False)
def testNotifyAtInit(self):
verify(self.mockOutBuffer).add(any())
#TODO: python mockito cannot yet use hamcrest matchers, so cannot easily test if the message is correct :(
#assertEquals(ComponentNotifier.NOTIFY_CATEGORY, iu.getCategory());
#assertEquals("new", iu.getPayload().get(ComponentNotifier.STATE));
#assertThat(ImmutableSet.copyOf(iu.getPayload().get(ComponentNotifier.RECEIVE_CATEGORIES).split(",")),
# IsIterableContainingInAnyOrder.containsInAnyOrder(RECV_CAT.toArray(new String[0])));
#assertThat(ImmutableSet.copyOf(iu.getPayload().get(ComponentNotifier.SEND_CATEGORIES).split(",")),
# IsIterableContainingInAnyOrder.containsInAnyOrder(SEND_CAT.toArray(new String[0])));
def testNotifyAtNotifyNew(self):
self._sendNotify("new", set(["testsnd1"]));
verify(self.mockOutBuffer, times(2)).add(any())
#TODO: python mockito cannot yet use hamcrest matchers, so cannot easily test if the message is correct :(
#ArgumentCaptor<LocalIU> argument = ArgumentCaptor.forClass(LocalIU.class);
#verify(mockOutBuffer, times(2)).add(argument.capture());
#LocalIU iu = argument.getAllValues().get(1);
#assertEquals("componentNotify", iu.getCategory());
#assertEquals("old", iu.getPayload().get("state"));
def testNoNotifyAtNotifyOld(self):
self._sendNotify("old", set(["testsnd1"]));
verify(self.mockOutBuffer, times(1)).add(any())
class MyListener(object):
def __init__(self):
self.numCalled = 0
def handle(self, iu, mytype, local):
self.numCalled += 1
class ComponentNotifierIntegrationTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def _setupCompNotifier(self, idx, sendList, recvList):
inBuffer = InputBuffer(idx+"in", set([ComponentNotifier.NOTIFY_CATEGORY]))
outBuffer = OutputBuffer(idx+"out")
return ComponentNotifier(idx, "testfunction", sendList, recvList, outBuffer, inBuffer)
# bug: this somehow remains active after running
# def testSelf(self):
# notifier = self._setupCompNotifier("not", {"a1","b1"}, {"a3","b1"});
# listener = MyListener()
# notifier.add_notification_handler(listener.handle);
#
# notifier.initialize();
# time.sleep(0.5);
#
# self.assertEquals(0, listener.numCalled);
def testTwo(self):
notifier1 = self._setupCompNotifier("not1", set(["a1", "b1"]), set(["a3", "b2"]));
notifier2 = self._setupCompNotifier("not2", set(["a2", "b2"]), set(["a3", "b1"]));
listener1 = MyListener()
listener2 = MyListener()
notifier1.add_notification_handler(listener1.handle)
notifier2.add_notification_handler(listener2.handle)
notifier1.initialize()
time.sleep(0.5)
notifier2.initialize()
time.sleep(0.5)
self.assertEqual(1, listener1.numCalled)
self.assertEqual(1, listener2.numCalled)
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()
os._exit(0)
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Sociable Agents Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
import sys
import time
import unittest
import ipaaca
RECV_CATEGORY = 'WORD'
SEND_CATEGORY = 'TEXT'
class TextSender(object):
def __init__(self):
self.ob = ipaaca.OutputBuffer('TextSenderOut')
self.ob.register_handler(self.outbuffer_handle_iu_event)
self.ib = ipaaca.InputBuffer('TextSenderIn', [RECV_CATEGORY])
self.ib.register_handler(self.inbuffer_handle_iu_event)
def outbuffer_handle_iu_event(self, iu, event_type, local):
if event_type == "UPDATED":
parent_uids = iu.get_links("GRIN")
if len(parent_uids) > 0:
parent_uid = list(parent_uids)[0]
print "updating parent ..."
next_uids = iu.get_links('SUCCESSOR')
if len(next_uids) > 0:
next_uid = list(next_uids)[0]
next_iu = self.ob.iu_store[next_uid]
next_letter_grin_links = next_iu.get_links("GRIN")
if len(next_letter_grin_links) > 0 and list(next_letter_grin_links)[0] != parent_uid:
# the next letter belongs to a new word
parent_iu = self.ib.iu_store[parent_uid]
parent_iu.payload['STATE'] = 'REALIZED'
else:
# the next letter belongs to the same word
parent_iu = self.ib.iu_store[parent_uid]
parent_iu.payload['STATE'] = 'STARTED'
else:
# there are no more letters, this is the end of the final word
parent_iu = self.ib.iu_store[parent_uid]
parent_iu.payload['STATE'] = 'REALIZED'
print " ... done."
else:
print('(own IU event '+event_type+' '+str(iu.uid)+')')
def inbuffer_handle_iu_event(self, iu, event_type, local):
if event_type == "LINKSUPDATED":
print "links updated"
elif event_type == "ADDED": # and iu.category == RECV_CATEGORY:
print("Received new word: "+iu.payload['WORD'])
sender.publish_text_to_print(iu.payload['WORD'], parent_iu_uid=iu.uid)
elif event_type == "RETRACTED":
retracted_uid = iu.uid
else:
print('(IU event '+event_type+' '+str(iu.uid)+')')
pass
def find_last_iu(self):
for iu in self.ob.iu_store.values():
if len(iu.get_links('SUCCESSOR')) == 0:
return iu
return None
def publish_text_to_print(self, text, parent_iu_uid=None):
previous_iu = self.find_last_iu()
if previous_iu is not None:
# insert a blank if we already have words in the buffer
iu = ipaaca.IU( SEND_CATEGORY )
iu.payload = { 'CONTENT': ' ' }
self.ob.add(iu)
previous_iu.add_links( 'SUCCESSOR', [iu.uid] )
iu.add_links( 'PREDECESSOR', [previous_iu.uid] )
if parent_iu_uid is not None: iu.add_links( 'GRIN', [parent_iu_uid] )
previous_iu = iu
for c in text:
iu = ipaaca.IU( SEND_CATEGORY )
iu.payload = { 'CONTENT': c }
self.ob.add(iu)
if previous_iu is not None:
previous_iu.add_links( 'SUCCESSOR', [iu.uid] )
iu.add_links( 'PREDECESSOR', [previous_iu.uid] )
if parent_iu_uid is not None: iu.add_links( 'GRIN', [parent_iu_uid] )
if previous_iu is not None: print previous_iu.get_all_links()
previous_iu = iu
if __name__ == '__main__':
sender = TextSender()
time.sleep(1.0)
sender.publish_text_to_print('(INIT)')
print "Press Ctrl-C to cancel..."
while True:
time.sleep(0.1)
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2022 Sociable Agents Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
import sys
import time
import unittest
import ipaaca
SEND_CATEGORY = 'WORD'
import gobject
import gtk
import cairo
class WordWindow(gtk.Window):
def __init__(self, component):
super(WordWindow, self).__init__()
self.running = True
self.set_title("Word Sender")
self.set_size_request(640, 200)
self.set_position(gtk.WIN_POS_CENTER)
self.connect("destroy", self.quit)
darea = gtk.DrawingArea()
darea.connect("expose-event", self.expose)
darea.set_flags(gtk.CAN_FOCUS)
darea.grab_focus()
self.drawing_area = darea
self.connect("key_press_event",self.key_press)
self.add(darea)
self.show_all()
self.words = []
self.current_letters = ""
self.component = component
def quit(self):
self.running = False
def rounded_rectangle(self, cr, x, y, w, h, r=10):
cr.move_to(x+r,y)
cr.line_to(x+w-r,y)
cr.curve_to(x+w,y,x+w,y,x+w,y+r)
cr.line_to(x+w,y+h-r)
cr.curve_to(x+w,y+h,x+w,y+h,x+w-r,y+h)
cr.line_to(x+r,y+h)
cr.curve_to(x,y+h,x,y+h,x,y+h-r)
cr.line_to(x,y+r)
cr.curve_to(x,y,x,y,x+r,y)
def new_word(self, word):
uid = self.component.publish_new_word(word)
self.words.append([uid, word, 'NEW'])
def key_press(self, widget, event):
if event.keyval == gtk.keysyms.Escape:
self.quit()
return
elif event.keyval == gtk.keysyms.BackSpace:
if len(self.current_letters) > 0:
self.current_letters = ""
elif event.keyval > 32 and event.keyval < 127:
self.current_letters += chr(event.keyval)
elif event.keyval == 32 or event.keyval == gtk.keysyms.Return:
if len(self.current_letters) > 0:
self.new_word(self.current_letters)
self.current_letters = ""
else:
print event, event.keyval
pass
x, y, w, h = widget.get_allocation()
widget.queue_draw_area(x, y, w, h)
def update_word_state(self, uid, state):
for t in self.words:
u, w, s = t
if u == uid:
print "new state for "+w+": "+state
t[2] = state
x, y, w, h = self.drawing_area.get_allocation()
self.drawing_area.queue_draw_area(x, y, w, h)
def render_words(self, cr, x=20, y=100):
for wp in self.words:
uid, word, state = wp
x_bearing, y_bearing, width, _ = cr.text_extents(word)[:4]
_, _, _, height = cr.text_extents("Wy")[:4]
self.rounded_rectangle(cr, x, y-height-4, width+10, height+10)
cr.set_line_width(1.0)
cr.set_source_rgb(0.0, 0.0, 0.0)
cr.stroke_preserve()
if state == 'NEW' or state == '':
cr.set_source_rgb(1.0, 1.0, 1.0)
elif state == 'STARTED':
cr.set_source_rgb(0.3, 0.3, 1.0)
elif state == 'REALIZED':
cr.set_source_rgb(0.7, 0.7, 0.7)
else:
cr.set_source_rgb(1.0, 0.5, 0.5)
cr.fill()
cr.move_to(x+5, y)
cr.set_source_rgb(0.0, 0.0, 0.0)
cr.show_text(word)
x += width + 10 + 3
cr.move_to(x+5, y)
cr.show_text(self.current_letters)
def expose(self, widget, event):
cr = widget.window.cairo_create()
cr.set_source_rgb(0.0, 0.0, 0.0)
cr.set_font_size(13)
cr.move_to(20, 30)
cr.show_text("Type words. Space sends a word. Backspace deletes one.")
self.render_words(cr)
class WordSender(object):
def __init__(self):
self.ob = ipaaca.OutputBuffer('WordSenderOut')
self.ob.register_handler(self.outbuffer_handle_iu_event)
self.window = None
def outbuffer_handle_iu_event(self, iu, event_type, local):
if event_type == "UPDATED":
print(iu.payload['WORD']+': '+iu.payload['STATE'])
self.window.update_word_state(iu.uid, iu.payload['STATE'])
else:
print('(own IU event '+event_type+' '+str(iu.uid)+')')
def find_last_iu(self):
for iu in self.ob.iu_store.values():
if len(iu.get_links('SUCCESSOR')) == 0:
return iu
return None
def publish_new_word(self, word):
previous_iu = self.find_last_iu()
iu = ipaaca.IU( SEND_CATEGORY )
iu.payload = { 'WORD': word }
self.ob.add(iu)
if previous_iu is not None:
previous_iu.add_links( 'SUCCESSOR', [iu.uid] )
iu.add_links( 'PREDECESSOR', [previous_iu.uid] )
return iu.uid
def publish_words(self, words):
previous_iu = self.find_last_iu()
for word in words:
iu = ipaaca.IU( SEND_CATEGORY )
iu.payload = { 'WORD': word }
self.ob.add(iu)
if previous_iu is not None:
previous_iu.add_links( 'SUCCESSOR', [iu.uid] )
iu.add_links( 'PREDECESSOR', [previous_iu.uid] )
previous_iu = iu
if __name__ == '__main__':
sender = WordSender()
window = WordWindow(sender)
sender.window = window
#sender.publish_words(['this','is','a','demonstration','of','incremental','generation'])
#print sender.ob.unique_name
print "Press Ctrl-C to cancel..."
#gtk.main()
lc = gobject.main_context_default()
while window.running:
lc.iteration(False)
time.sleep(0.01)
#while True:
# time.sleep(0.1)
#
<project name="IpaacaSoa" default="build" basedir=".">
<import file="../../hmibuild/build-recurse.xml" />
</project>
cmake_minimum_required (VERSION 2.6)
# project name
project (ipaaca_soa_cpp)
install(
DIRECTORY include
DESTINATION .
FILES_MATCHING PATTERN "*.h" PATTERN "*.hh" PATTERN "*.hpp" PATTERN "*.inl"
)
language=cpp
resolve.status=beta
resource.path=${shared.resources}/;
rebuild.list=
publish.resolver=asap.sftp.publish
dist.dir=../../dist
<?xml version="1.0" encoding="UTF-8"?>
<project name="IpaacaSoaCpp" default="dist">
<import file="../../../hmibuild/build.xml" />
</project>
/*
* This file is part of IPAACA, the
* "Incremental Processing Architecture
* for Artificial Conversational Agents".
*
* Copyright (c) 2009-2013 Sociable Agents Group
* CITEC, Bielefeld University
*
* http://opensource.cit-ec.de/projects/ipaaca/
* http://purl.org/net/ipaaca
*
* This file may be licensed under the terms of of the
* GNU Lesser General Public License Version 3 (the ``LGPL''),
* or (at your option) any later version.
*
* Software distributed under the License is distributed
* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
* express or implied. See the LGPL for the specific language
* governing rights and limitations.
*
* You should have received a copy of the LGPL along with this
* program. If not, go to http://www.gnu.org/licenses/lgpl.html
* or write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The development of this software was supported by the
* Excellence Cluster EXC 277 Cognitive Interaction Technology.
* The Excellence Cluster EXC 277 is a grant of the Deutsche
* Forschungsgemeinschaft (DFG) in the context of the German
* Excellence Initiative.
*/
/*
* Common Categories and Components macros for ipaaca C++ projects
*
* ported from ipaaca1
*/
#ifndef CATEGORIES_COMPONENTS_LEXICON_H_
#define CATEGORIES_COMPONENTS_LEXICON_H_
#include <string>
//
// Categories
//
// please indicate sub-categories (e.g. component-specific data) and/or add descriptions
/// component connect / run notification
const std::string CAL__COMPONENT_NOTIFY = "componentNotify";
/// execution request for MURML string
const std::string CAT__MURML_DATA = "murmldata";
const std::string CAT__MURML_FILE = "murmlfile";
/// debugging (e.g. producing faults at will; messaging; logging)
const std::string CAT__DEBUGGING = "debugging";
/// Result from speech recognition
const std::string CAT__ASR_RESULT = "asrresult";
/// STOP (Interrupt current behaviors)
const std::string CAT__STOP_BEHAVIOR = "stopbehavior";
/// request to Mary TTS client
const std::string CAT__MARYTTSREQUEST = "maryttsrequest";
/// answer from Mary TTS client
const std::string CAT__MARYTTSREPLY = "maryttsreply";
/// TTS info IU (is speech in progress? when will it end? etc.)
const std::string CAT__MARYTTSINFO = "maryttsinfo";
/// WIImote controller input
const std::string CAT__CONTROLLER_WII = "wiiinput";
/// (OgreCalendar:) sending updates to GUI calendar
const std::string CAT__CALENDAR_CONTROL = "calendarcontrol";
/// (OgreCanvas:) sending updates to generic Canvas component
const std::string CAT__CANVAS_CONTROL = "canvascontrol";
/// (OgreCameraController:) sending camera control commands
const std::string CAT__CAMERA_CONTROL = "cameracontrol";
/// (OgreVideoCall:) sending control commands to the video call component
const std::string CAT__VIDEOCALL_CONTROL = "videocallcontrol";
/// (OgreTrafficLight:) sending updates to GUI traffic light
const std::string CAT__TRAFFIC_LIGHT_CONTROL = "trafficlightcontrol";
/// Data from 2012 Dialogue Demonstrator XCF bridge
const std::string CAT__XCF_BRIDGE = "xcfbridge";
/// Data from old (2010) Wizard-of-Oz GUI
const std::string CAT__GUI_DATA = "guidata";
/// SCH3 Vince (from Schnick-Schnack-Schnuck / Rock-Paper-Scissors)
const std::string CAT__SCH3_GESTURE = "sch3gesture";
const std::string CAT__SCH3_OPTIONS = "sch3options";
/// Ogre/Qt GuiController (relay key events, configure that)
const std::string CAT__OGRE_GUI_CONTROLLER = "ogreguicontroller";
//
// UNDOCUMENTED CATEGORIES
//
// --- YET TO BE DOCUMENTED ! ---
//
// Please no not add new categories to this section!
//
const std::string CAT__PERCEPTION_MESSAGE = "perceptionmessage";
const std::string CAT__PERCEPTION_WRISTS = "perceptionwristspositions";
const std::string CAT__PERCEPTION_HEIGHT = "perceptionheight";
const std::string CAT__PERCEPTION_HEIGHT_REQ = "perceptionheightreq";
const std::string CAT__PERCEPTION_CENTEROFMASS = "perceptioncenterofmass";
const std::string CAT__PERCEPTION_CENTEROFMASS_REQ = "perceptioncenterofmassreq";
const std::string CAT__CONTROLLER_COGNITIVEPROCESS = "controllercognitiveprocess";
const std::string CAT__GENERATION_WRISTS = "generationwrists";
const std::string CAT__GENERATION_MP = "generationmp";
const std::string CAT__GENERATION_GUIDING_SEQUENCE = "generationgss";
const std::string CAT__IK_GENERATION_WRISTS = "ikgenerationwrists";
const std::string CAT__SELF_COLLISION_SETTINGS = "selfcollisionsettings";
const std::string CAT__MOTORBODY_NOTIFICATION = "motorbodynotification";
const std::string CAT__SMKM_MOTOR_KNOWLEDGE = "smkmmotorknowledge";
const std::string CAT__SMKM_PARAMETERS = "smkmparameters";
const std::string CAT__SMKM_MENU = "smkmmenu";
const std::string CAT__SMKM_PARAMETER_ASSIGNMENT = "smkmparameterassignment";
const std::string CAT__SMKM_USER_MESSAGE = "smkmusermessage";
const std::string CAT__SECONDARY_BEHAVIOR = "secondarybehavior";
const std::string CAT__SMKM_WAVING = "smkmuserwaving";
const std::string CAT__SMKM_RESET = "resetforsmkmmodel";
const std::string CAT__SMKM_BRAIN_MODE = "smkmbrainmode";
const std::string CAT__SMKM_DROPPED_MP_HYPOS = "droppedmphyposnames";
const std::string CAT__DM_ASR_LABEL = "dialogmanagerasrlabel";
const std::string CAT__DM_SMKM_BRAIN_MODE = "dialogmanagersmkmbrainmode";
const std::string CAT__VISUALIZE_OBSERVED_WRISTS = "visualizeobservedwrists";
const std::string CAT__HYPOTHESES_VISUALIZATION = "hypothesesvisualization";
const std::string CAT__TRAJECTORY_VISUALIZATION = "trajectoryvisualization";
const std::string CAT__BELIEF_PROBABILITY_VISUALIZATION = "beliefprobabilityvisualization";
const std::string CAT__BELIEF_PROBABILITY_DISTRIBUTION = "beliefprobabilitydistribution";
const std::string CAT__RESET_PROBABILITY_DISTRIBUTION = "resetprobabilitydistribution";
const std::string CAT__ACE_FIGURE_TFM_MATRIX = "acetfmmatrix";
const std::string CAT__ACE_FIGURE_TFM_MATRIX_REQ = "acetfmmatrixreq";
const std::string CAT__SHOW_IMAGE = "showimage";
const std::string CAT__FOCUS_ON_IMAGE = "focusonimage";
const std::string CAT__GENERATE_GESTURE = "generategesture";
const std::string CAT__DELETE_GESTURE = "deletegesture";
const std::string CAT__CHANGE_OBSERVATION_FREQUENCY = "changeobservationfrequency";
const std::string CAT__DM_NUMBER_OF_GESTURES_REQ = "reqnumberofgestures";
const std::string CAT__DM_NUMBER_OF_GESTURES = "reqnumberofgestures";
const std::string CAT__TEXT_TO_SPEECH = "texttospeech";
const std::string CAT__OGRE_MODIFICATION_COMMAND = "ogremodificationcmd";
const std::string CAT__GESTURE_RESULT = "gestureresult";
const std::string CAT__DIALOGMANAGER_GESTURE_LEARNING = "gesturelearning";
const std::string CAT__RETRACT = "postureretraction";
const std::string CAT__BELIEF_PROBABILITY = "beliefprobability";
// End of UNDOCUMENTED CATEGORIES
// Please do not add to this section, add new categories (with /// docstring)
// to the paragraph preceding this undocumented section
// (Old definitions from ipaaca1:)
//
// Well-known Component names
//
const std::string COM__MARYTTS = "MaryTTS";
const std::string COM__WII_CONTROLLER = "WiiController";
const std::string COM__TEXT_INPUT = "TextInput";
const std::string COM__CSV_SENDER = "CSVSender";
const std::string COM__OGRE_CALENDAR = "OgreCalendar";
const std::string COM__OGRE_TRAFFIC_LIGHT = "OgreTrafficLight";
const std::string COM__SHARED_MOTOR_KNOWLEDGE_MODEL = "SharedMotorKnowledgeModel";
const std::string COM__DIALOG_MANAGER = "DialogManager_CPP";
const std::string COM__SCH3_DIALOGMANAGER = "SCH3DialogManager";
const std::string COM__SCH3_GESTUREPERFORMER = "SCH3GesturePerformer";
#endif /* CATEGORIES_COMPONENTS_LEXICON_H_ */
<ivy-module version="2.0">
<info organisation="SOA" module="IpaacaSoaCpp" />
<dependencies>
</dependencies>
</ivy-module>
language=scripts
resolve.status=beta
resource.path=${shared.resources}/;
rebuild.list=
publish.resolver=asap.sftp.publish
dist.dir=../dist
<?xml version="1.0" encoding="UTF-8"?>
<project name="IpaacaJava" default="run">
<import file="../../soashared/ant/build.xml" />
<project name="IpaacaTools" default="dist">
<import file="../../hmibuild/build.xml" />
</project>