Skip to content

IPC Protocol

bob620 edited this page Jun 29, 2019 · 2 revisions

All commands are responded to with either resolve or reject regardless of if they return data.

All Responses (Both clients)

Name Type
type 'resolve' or 'reject'
uuid String of UUID
data Object

Child Accepts

Command Description
addScale Adds scale using data given to it
canvas Runs different canvas commands remotely
processDirectory Processes a directory for new files
remove Removes a saved uuid
save saves a uuid
writeImage Writes an image to disk using data given to it

All Messages

Name Type Description
type String Some command
data Object Described below
uuid String UUID

data Objects

addScale

Same as the thermo input But includes uuid of the image

canvas
Name Type Description
type String Currently only 'init' accepted
processDirectory
Name Type Description
uri String New working directory URI
remove
Name Type Description
uuid String uuid to be removed
save
Name Type Description
uuid String uuid to be added to saved list
writeImage

Same as the thermo input and thermo write But includes uuid of the image

Child Sends

Command Description
ready Sent when the child has initialized