Messages to a device have the following format: MESSAGE_DELIMITER + { "type": "list" | "methods" | "result" | "error" | "invoke", "data": DATA_LAYOUT, } + MESSAGE_DELIMITER where MESSAGE_DELIMITER = "\0" DATA_LAYOUT = if "type" == "list" -> [ { "deviceId": , "typeNames": [ , , ... ] }, ... ] if "type" == "methods" -> [ { "name": , "returnType": , "description": , "parameters": [ "name": , "description": , "type": ] }, { ... } ] if "type" == "result" -> if "type" == "error" -> if "type" == "invoke" -> After sending to the device,