Skip to content
Neil Jansen edited this page Jul 8, 2014 · 4 revisions

DCE Operation

Executes given GCODE command. Returns JSON result.

HTTP POST

The POST method initiates a GCODE action. The returned JSON provides the state of the GCODE action. Synchronous requests return the completed state of the GCODE action. Cached requests may return status pending.

  • output: application/json.
  • status 404 Unknown DCE
  • status 500 Internal application error

HTTP GET

The GET method returns the current state of the latest GCODE command, which may be either completed or pending. The HTTP GET method is fast and is used primarily for polling the current state of pending commands or for providing feedback to operators monitoring on devices other than the originating CNC application. FireREST CNC HTTP GET requests never block. Specifically, HTTP GET requests to /firerest/sync/cnc URL's are treated as cached, non-blocking requests.

  • output: application/json
  • status 404 Unknown DCE
  • status 500 Internal application error

JSON Output

The returned JSON provides information about the executed GCODE command:

{TBD}

Fire and Forget

Since real machines can't be in two places at the same time, CNC requests are normally synchronous and block until the motion is completed. Use /firerest/sync/cnc URLs for blocking requests when you need simple and reliable control. Alternatively, you can use /firerest/cnc URLs for "fire-and-forget" interaction and poll the DCE for desired state changes.

See Also

Clone this wiki locally