2.2 KiB
OC-DSS2
Networked storage drawer based inventory system for OpenComputers. AKA AEn't v2
Design
OC-DSS2 uses a client-server model in that there is a server that is actually attached to the transposers that talk to the inventory system, and a number of clients that use the services remotely over the network.
Clients submit a search request (in the format described later) to the server, which responds with a liblz16-compressed stream of the search results. Clients can then use RPC endpoints on the server to request items be extracted to their location, if an alias has been set up for it.
Requirements
- OpenOS
- Minitel
- Minitel RPC
- liblz16
- libsyslog (server only)
- An 80x25 display (client only)
Setup
Note: It may be more practical to create an installer floppy rather than using oppm on every machine involved.
Server
- Install dss2-server and dependencies via oppm.
- Make sure the computer has a hostname set and the Minitel daemon is running and enabled.
- Add aliases with the
addalias
program - run it without arguments for usage information. - Start the searchsrv daemon with
rc searchsrv start
- Enable the searchsrv daemon with
rc searchsrv enable
Client
- Install dss2-client and dependencies via oppm.
- Make sure the computer has a hostname setand the Minitel daemon is running and enabled.
- Put the name of the server into
/etc/invsrv
- either by editing the file, or something along the lines ofecho <hostname> > /etc/invsrv
- Run
search4
to bring up the interface. - (Optional) Make search4 open on boot by adding it to
/home/.shrc
Network protocol
In addition to standard RPC calls, OC-DSS2 uses a stream protocol on port 15 (by default).
Requests are submitted as a single line, in the form of key=value pairs, separated by tab characters. The keys map to itemstack values, such as name, label or maxSize.
The server responds with a liblz16-compressed stream, with one serialised table per line, each containing one resulting item stack.
RPC endpoints exported by OC-DSS2 are directly from the server-side "inv" library, contained in OpenOS/server/usr/lib/inv.lua.