Client-Server¶
Danger
The XO-VAC+ API is currently under development. Use at your own risk!
This section documents all the commands the server expects from the client and their syntax.
cancel_recipe¶
Command to cancel running a recipe. Returns cancel_recipe_ack once the running recipe has been cancelled.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
cancel_recipe_ackfor message sent on completion.
'sync_xovac_time'¶
Command to send client PC time to the server to sync clocks (to ensure log time-stamps etc in server are coordinated with client PC) Parameters: The top level parameters are
| Parameter | Description |
|---|---|
utcOffset | Offset of current timezone from UTC time, in ms. |
msSinceEpoch | Current time as miliseconds since epoch |
Payload Data Schema:
The command takes arguments in the form of a JSON string in the following format: ''' json {"utcOffset": utcOffset, "epoch": msSinceEpoch}'''
load_recipe¶
Command to load a recipe. Returns load_recipe_ack once the recipe has been loaded.
Parameters:
The top level parameters are
| Parameter | Description |
|---|---|
recipe | Array of recipe items |
Each recipe item is an array containing the following three parameters
| Parameter | Description |
|---|---|
targetT | Target temprature for this step |
duration | Target duration of the step |
gradient | Maximum allowable gradient of the transition |
Note that any user input value to 'gradient' will be ignored, the parameter is just a placeholder which will be populated subsequently by the internal software. It is therefore recommended to simply enter '0.0' in the gradient field.
Refer to the TODO INSERT LINK HERE for documentation of how the XO-VAC+ makes decisions in case of invalid or inappropriate arguments.
Payload Data Schema:
The command takes arguments in the form of a JSON string complying to the following JSON Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"recipe": {
"type": "array",
"minItems": 1,
"items": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": {
"type": "number"
}
}
},
},
"required": ["name", "recipe"],
}
Example:
The following is a valid recipe (though not necessarily an advised one!)
{
"recipe": [
[
"targetT": 90,
"duration": 60
"gradient": 3.0,
],
[
"targetT": 90,
"duration": 200
"gradient": 1.0,
],
[
"targetT": 25,
"duration": 60
"gradient": 3.0,
],
]
}
See Also:
load_recipe_ackfor message sent on completion.
run_recipe¶
Command to run the last loaded recipe. Returns run_recipe_ack once the recipe has started running.
Parameters:
The top level parameters are
| Parameter | Description |
|---|---|
refSensors | Array of sensor names to use for reference in the run |
errMarginTemp | Convergence margin on temperature (recomended value 0.5) |
errMarginTime | Convergence time factor (recommended value 60) |
returnToAmbient | Boolean - the system will automatically run back to ambient at the end of the recipe if 'true' |
dataLoggingRate | Rate at which run data is to be logged. See here for details. |
sensorCutoffLimits | A json string containing an array of upper and lower permissible temperature limits for each chamber sensor (see below schema) |
The reference sensor names for a given device may be obtained by connecting with the XO-VAC User Software and viewing under 'System Information'. Note that the list of reference sensors should contain either exclusively 'chamber' sensors, or exclusively 'TEC Object' sensors, not both (as per implementation in the XO-VAC User Software 'run' function)
Payload Data Schema:
The command takes arguments in the form of a JSON string complying to the following JSON Schema
{
"type": "object",
"properties": {
"refSensors": {
"type": "array",
"minItems": 1,
"items": {"type": "string"}
},
"errMarginTemp": {"type": "number"},
"errMarginTime": {"type": "number"},
"returnToAmbient": {"type": "boolean"},
"dataLoggingRate": {"type": "number"},
"sensorCutoffLimits": {"type": "object"},
},
"required": ["refSensors", "errMarginTemp", "errMarginTime", "returnToAmbient", "dataLoggingRate", "sensorCutoffLimits"],
}
Example:
The following is a valid call
{
"refSensors": [
"Free Chamber Sensor 1 - PT1000"
"Fixed Chamber Sensor 3 - PT1000"
],
"errMarginTemp": 0.5,
"errMarginTime": 60,
"returnToAmbient": true,
"dataLoggingRate": 10,
"sensorCutoffLimits": {"chamberSensorName1": [-25.0, 125.0],"chamberSensorName2": [-25.0, 125.0], all chamber sensors must be included...},
}
See Also:
run_recipe_ackfor message sent once teh run has started.
'check_password'¶
Command to check the user password is correct.
get_sys_info¶
Command to get the current system information. Returns send_sys_info immediately.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
send_sys_infofor message sent on completion.
get_log¶
Command to get the system logs. Returns send_log immediately.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
send_logfor message sent on completion.
shutdown - Unimplemented¶
Command to shutdown. Returns shutdown_ack once the shutdown process has successfully started.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
shutdown_ackfor message sent on completion.
get_status¶
Command to get the current server status. Returns send_status immediately.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
send_statusfor message sent on completion.
get_air_side_heatsink_temp¶
Command to get the air side heatsink temperature. Returns send_air_side_heatsink_temp after a short delay.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
send_air_side_heatsink_tempfor message sent on completion.
get_vac_side_heatsink_temp¶
Command to get the vacuum side heatsink temperature. Returns send_vac_side_heatsink_temp
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
send_vac_side_heatsink_tempfor message sent on completion.
get_recipe¶
Command to get the currently loaded recipe. Returns send_recipe immediately.
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
send_recipefor message sent on completion.
get_results_all¶
Command to get the full run data from the last run recipe. Returns results_all immediately. This command should not be sent whilst a recipe run is in progress.
Warning
Depending on the length of run recorded this file may be several MB in size and take several seconds to download
Payload Data Schema:
This command does not take any payload data from the client and any payload data sent is ignored.
See Also:
results_allfor message sent on completion.