CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
test_remote_module Namespace Reference

Classes

class  Local
class  Probe
class  Live

Functions

 wait_for (sec, cond)
 port_open (p)

Variables

 BIN = os.environ.get("PSYCLONE_BIN", "")
 NODE
 MOD
 WS
 LEASE
 FEED
str SPEC

Detailed Description

RemoteModule tests (Psyclone 2.3.2 remote modules).

Local: the key proof and the reply/trigger routing against a stand-in host. Live (PSYCLONE_BIN=<bin/linux64/Psyclone>):
a real Psyclone with declared remote modules on a key-auth host (TCP, WebSocket, UDP) and a token-auth host with a
short lease, mirroring the engine test test=remotemodule: attach (contract from the server, Ready once), triggers by
name, posts, named retrieve and query, takeover by the same device, detach, lease expiry with re-attach, a bad key
refused. API keys are made through PsyProbe 2 (first-run setup, machine accounts with modules.attach.*).

Function Documentation

◆ port_open()

test_remote_module.port_open ( p)

Definition at line 169 of file test_remote_module.py.

◆ wait_for()

Variable Documentation

◆ BIN

test_remote_module.BIN = os.environ.get("PSYCLONE_BIN", "")

Definition at line 28 of file test_remote_module.py.

◆ FEED

test_remote_module.FEED

Definition at line 29 of file test_remote_module.py.

◆ LEASE

test_remote_module.LEASE

Definition at line 29 of file test_remote_module.py.

◆ MOD

test_remote_module.MOD

Definition at line 29 of file test_remote_module.py.

◆ NODE

test_remote_module.NODE

Definition at line 29 of file test_remote_module.py.

◆ SPEC

str test_remote_module.SPEC
Initial value:
1= """<psyspec name="PyRemoteModuleTest" port="%(NODE)d">
2 <psyprobe datadir="%(DIR)s" />
3 <service name="Modules"><modules auth="key" udp="yes"/></service>
4 <service name="LeaseMods"><modules auth="token" token="py-lease-token" lease="1500"/></service>
5 <service name="Feed"><post name="Audio" type="Py.RM.Audio"/></service>
6 <interface name="ModTCP" port="%(MOD)d" protocol="Message" service="Modules"/>
7 <interface name="ModUDP" port="%(MOD)d" ip="UDP" protocol="Message" service="Modules"/>
8 <interface name="ModWS" port="%(WS)d" protocol="HTTP" service="Modules"/>
9 <interface name="LeaseTCP" port="%(LEASE)d" protocol="Message" service="LeaseMods"/>
10 <interface name="FeedTCP" port="%(FEED)d" protocol="Message" service="Feed"/>
11 <module name="Asr" type="remote" service="Modules">
12 <trigger name="Audio" type="Py.RM.Audio"/><trigger name="Go" type="Psyclone.Ready"/>
13 <post name="Note" type="Py.RM.Note"/>
14 <retrieve name="Recent" source="PyWB" type="Py.RM.Note" maxcount="10"/>
15 <query name="Notes" source="PyStore"/>
16 <parameter name="Language" value="en-GB"/>
17 </module>
18 <module name="Tts" type="remote" service="Modules"><trigger name="Note" type="Py.RM.Note"/></module>
19 <module name="Vad" type="remote" service="Modules"><trigger name="Audio" type="Py.RM.Audio"/></module>
20 <module name="Short" type="remote" service="LeaseMods"><trigger name="Audio" type="Py.RM.Audio"/></module>
21 <whiteboard name="PyWB"><trigger name="All" type="Py.RM.*"/></whiteboard>
22 <catalog name="PyStore" type="RequestStore"><trigger name="Note" type="Py.RM.Note"/>
23 <setup><store name="Note" trigger="Note" key="note" mimetype="text"/></setup></catalog>
24</psyspec>
25"""

Definition at line 110 of file test_remote_module.py.

◆ WS

test_remote_module.WS

Definition at line 29 of file test_remote_module.py.