Skip to content

Instantly share code, notes, and snippets.

@triffid
Created May 24, 2012 10:26
Show Gist options
  • Save triffid/2780735 to your computer and use it in GitHub Desktop.
Save triffid/2780735 to your computer and use it in GitHub Desktop.
netrap object model
Object Model for a netrap server, exposed via AJAX
server-server protocol may substitute a server object for TOP so tree-walk can be performed.
listPrintersWithCapabilities() is the major function to be implemented, this should also cause a broadcast amongst any server-server networks where all other functions are server-local
TOP
+- Printers[]
| +- Printer
| +- capabilities
| | +- PLA/ABS
| | +- color
| | +- size
| | +- fine or fast
| | +- other arbitrary name/value pairs
| +- listCapabilities() => string_pair capability_pair_list[]
| +- getCapability(string capability_name) => string capability_value
| +- setCapability(string capability_name, string new_value)
| |
| +- properties
| | +- temperature
| | | +- nozzle
| | | +- bed
| | +- position
| | | +- X
| | | +- Y
| | | +- Z
| | | +- E
| | +- fan speed
| +- listProperties() => string property_name[]
| +- getProperty(string property_name) => string property_value
| +- setProperty(string property_name, string property_value)
|
+- listPrinters() => string printer_names[]
|
+- getCurrentPrinter() => string printer_name
+- setCurrentPrinter(string printer_name)
|
+- listPrinterCapabilities() => string capability_names[]
+- listPrintersWithCapabilities(string_pair capability_pair_list[])
@triffid
Copy link
Author

triffid commented May 29, 2012 via email

@canadaduane
Copy link

canadaduane commented May 29, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment