From 3e1e1f38196fda3e3aff6fba8919d9c521b7c338 Mon Sep 17 00:00:00 2001 From: Mees van der Wijk Date: Fri, 30 Jan 2026 13:22:40 +0100 Subject: [PATCH] Testing remote --- ModuleServerAPI.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ModuleServerAPI.md b/ModuleServerAPI.md index b22deeb..9837444 100644 --- a/ModuleServerAPI.md +++ b/ModuleServerAPI.md @@ -301,10 +301,41 @@ api.hasReferenceProperty(sceneId, propertyId); ### sendToModule +Send a message to another module within the channel. + +```javascript +api.sendToModule(moduleId, header, ...args); +``` + +| Argument | Type | Description | +| -------- | ------ | -------------------------------------------- | +| module | string | The id of the module to send the message to. | +| header | string | The header of the message. | +| args | any[] | Additional arguments of the message. | + ### receiveFromModule +Receive a message from another module within the channel. + +```javascript +api.receiveFromModule(header, callback); +``` + +| Argument | Type | Description | +| -------- | --------------------------------------- | ----------------------------------------- | +| header | string | The header of the messages to listen for. | +| callback | ( moduleId:string, ...args:any[] ):void | Callback when a message is received. | + ### getChannelModules +Get all modules within the channel. + +```javascript +api.getChannelModules(); +``` + +**Returns** {moduleId:string, type:string, name:string, moduleCommunicationHeaders:{header:string, arguments:number}}[] _List of all modules_ + ### hasChannelModules ## Cues