Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Spec description for AXIOM°
/**
* module registration
**/
"modules" : {
$moduleName : {
"description" : String,
"commands" : [
$commandName : [
"values": Array, // array is a list of values accepted by this command
"interface" : one.of.interfaceTypes
],
"which" : "filelocation" // this should be an absolute path to the binary / memory location
} ...
}
/**
* ws:// WebRemote registration with DAEMON either it gets an answer, or it receives an error code "500"
**/
"message:WebRemote:whoami": {
"sender" : UUID, // WebRemote's UUID / cli wrapper
"modules" : modules.all,
"status" : one.of(messages.status)
}
/**
* ws:// DAEMON response to whoami
**/
"message:WebRemote:whoami" : {
"DAEMON_UUID": UUID,
"ACCESS" : one.of(messages.access)
}
/**
* ws:// control communication from WebRemote
**/
"message:WebRemote:CMD": {
"sender" : UUID, // WebRemote's UUID / cli wrapper
"module" : $moduleName,
"command" : one.of($moduleName.commands),
"value" : one.of($moduleName.command(this).values),
"timestamp" : timestamp
}
/**
* ws:// communication from DAEMON
**/
"message:DAEMON": {
"sender" : UUID, // DAEMON's UUID
"access" : one.of(messages.access)
"module" : $moduleName
"response" : one.of(messages),
"timestamp" : timestamp
}
/**
* messages
**/
"messages" : {
"access" : ["access permitted", "access denied"]
"status" : ["online", "working", err]
"success" : $moduleName + "succeeded",
"error" : "error: " + err,
"malformed" : "command " + cmd + " malformed" ,
"shutdown": "shutting down, see ya"
}
/**
* WebInterface types
**/
"interfaceTypes" : array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.