3.2 KiB
Use this if you want to know how to use the OS.
Commands
Disk
Interact with a disk drive.
Synopsys:
disk ls
list all disk drives and its contentdisk play <drive>
play an audio disk inside a disk drivedisk stop <drive>
stops playing audiodisk eject <drive>
ejects the diskdisk lable <dive> [lable]
Reads or sets a lable on a disk.
GPS
Interact with the buildin GPS and INS (Inertial Navigation System) system. The INS is used to update a turtle's position when it is moving.
The GPS has 4 states of accuracy:
0
Unknown position1
Position from INS or its best guess2
Position from manual input or the last known position3
Position from GPS
In case of a turtle the GPS accuracy will be set to 1
.
Synopsys:
gps set <x> <y> <z>
set the position manually. This will get saved.gps status
prints the current GPS accuracy, position and INS status.gps locate
try to locate the current position. Accuracy will be set to3
if successful.gps ins
perform an INS alignment. Used to get the current heading.
KSettings
Get and set Kernel settings.
Current settings are:
hostname
the hostname of the computersitecontroller
the id of the site controller
Synopsys:
ks get <setting>
print the value of a settingks set <setting> <value>
set the value of a settingks list
list all settings
LSPS
List all processes running on the computer. Very simple and not very useful other than for debugging.
Net
Interact with the network stack.
Synopsys:
net route
print the routing tablenet iface
list all network interfacesnet proto
list all network currently active protocolsnet ping <id>
ping a remote computer by id
Peripherals
Interact with the peripherals connected to the computer.
Synopsys:
perf inspect <peripheral>
print all types and methods of a peripheralperf list
list all peripherals
Redstone
Interact with the redstone. Support for Project Red's Bundle Cable is partialy implemented.
Synopsys:
rs on <side>
turn on redstone on a siders off <side>
turn off redstone on a siders get <side>
get the redstone state on a side
Service
Interact with the service manager. A service is a program that runs in the background and can be automatically started when the computer boots.
A service is a normal program. In order to create a new service you must register a command with arguments under a name. After that you can start the service by its name. If it is running you can enable it so it will be started when the computer boots.
Synopsys:
srv start <name>
start a servicesrv stop <name>
stop a servicesrv register <name> <binary> [args...]
register a servicesrv unregister <name>
unregister a servicesrv list
list all servicessrv enable <name>
enable a service. Must be started before it can be enabled.
Turtle
Interact with a turtle. Very simple. More to come maybe.
Synopsys:
turtle forward
move the turtle forwardturtle back
move the turtle backturtle up
move the turtle upturtle down
move the turtle downturtle left
turn the turtle leftturtle right
turn the turtle right