This is actually requires a really complex answer I'm not qualified to give.. I would recommend staring and tearing at the OpenOS filesystem API until you have some ideas. Be warned that it gets pretty difficult to grep at some points especially concerning virtual files and directories.
@katt1204 You are running OpenOS 1.5 - that sounds REALLY old to me. I think i tested the earliest version of brgc against OpenOS 1.6 so... your only option is to upgrade i think.
Honestly you might get away with not using brgcctrl and start the services directly on your own but that's just speculation. Upgrading OC is your best bet.
firstly, always declare your identifiers as local unless you intend to create global variables for use and effect in other scripts.
local component = require("component")
local printer = component.printer3d
secondly, you could iterate the component proxy, it is a table
for k, v in pairs(printer) do
or you can use the command line tool, components
/home # components
and you can list functions and doc details of component using the -l option, and you can filter the components listed specifying a name
/home # components -l printer3d