...
Assume we have a device attached to the south service that rotates at a given speed for a given time as part of the process it executes. We change that speed and duration based on the current conditions. To do this we execute the following REST API call against the south service interface.
PUT /fledge/south/setpoint
With the PayLoad
{
"values" : [{
"speed" : "12500",
"duration" : "90"
]}
}
This would set the speed to 12500 RPM and the duration at that speed to 90 seconds. The plugin would receive these values and convert them to whatever commands are required to be sent to the machine itself.
...
Name | Type | Description | Example |
operation | string | The name of an operation to execute on the device. | calibrate |
parameters[] | JSON Object | An array of objects An optional object containing name/value pairs of the parameters to the operation. | |
parameters[].name | string | The name of the parameter | |
parameters[].value | string | The value of a parameter to pass the operation. |
...
Name | Type | Description | Example |
status | string | The status of the operation. This may be one of “Running”, “Complete” or “Failed”. | |
id | numeric | An id for this operation. This can be used to access the status of the operation. |
Example
Suppose we wish to run a calibration operation on a device. This operation requires no parameters.
PUT /fledge/south/operation
with payload
{
"operation" : "calibrate"
}
Alternatively, if we wish to run an operation that takes parameters, say a calibration on a single axis
PUT /fledge/south/operation
with payload
{
"operation" : "calibrate",
"parameters" : {
"axis" : "x"
}
}
Status Query
GET /fledge/south/operation/{id}
...