stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 96

Day 96 of 365 · Advanced · Month 4: Network in detail

Naming scheme for large bases

Names are the addresses of your base. Place plus function, the same name for different device types and one define per name keep large networks tidy.

Lesson 13 min Week 14

What you learn today

  • Plan names
  • Encode rooms and functions
  • Use the labeller efficiently

At first the first heater is called “Heizung”. Three months later you have eleven heaters, and the chip in the lab switches the one in the greenhouse as well. Names are the addresses of your base. Planning them saves you a lot of searching.

What a name has to do

lbn and sbn find devices by type and name. Two rules follow from that:

  • Same name, same type is a group. One sbn switches them all together.
  • Same name, different type does no harm. Sensor “Labor” and heater “Labor” do not get in each other's way, because lbn checks the type as well.

The second rule is a big advantage: you can name all devices of a room after the room. The type tells them apart.

Encoding rooms and functions

A proven scheme has two parts: place and, where needed, function.

NameMeaning
Laborall devices in the lab that exist only once per type there
Labor Notthe emergency light in the lab, separate from the normal one
Gewaechshaussensor, heater, lamps in the greenhouse
Gewaechshaus Pflanzenonly the grow lights

Spaces are allowed, HASH("Labor Not") works. Umlauts are not: the checker warns, and the game only stores ASCII. Write “Gewaechshaus”, not “Gewächshaus”.

Keep names short, every HASH("…") costs characters from your 4096. And write a name the same way every time: “Labor” and “labor” give different hashes.

The labeller

In the game names are given with the labeller. It needs a battery and has to be switched on. It becomes efficient with a list:

  1. Write down all names before you set off, ideally straight as a define block.
  2. Name one room after the other, all devices at once.
  3. Check with the chip: an lbn … Average that returns NaN points to a typo.
define LAB HASH("Labor") # room lab
define LABEMERG HASH("Labor Not") # emergency light lab
lbn temp SENSOR LAB Temperature Average
sbn LAMP LABEMERG On missing
Warning

A name hits all devices of this type with this name on the whole data network. If two parts of the base share one network, a “Licht” can sit in each of them. A unique place in the name prevents a chip from switching in the wrong room.

Tip

With one define per name you write the name only once. A typo then shows up in exactly one place.

Diagram

Devices on the data network with type and name IC housing IC10 StructureGasSensor „Lager“ StructureGasSensor „Werkstatt“ StructureWallHeater „Lagerheizung“ StructureWallHeater „Lagerheizung“ StructureWallHeater „Werkstattheizung“ lbn SENSOR HASH("Lager") reads only this sensor sbn HEATER HASH("Lagerheizung") switches both at once
lbn and sbn find devices by type and name. So sensor and heater may both be named after the room.

Exercise

Task

Two rooms following the scheme “place” and “place Not”: in the lab the gas sensor and the wall heater are called “Labor”, in the kitchen both are called “Kueche”. The emergency lights are called “Labor Not” and “Kueche Not”. The lab also has a normal wall light “Labor” that the chip must not switch.

  • per room: heater on below 20 °C, off from 22 °C
  • if a room's sensor fails: its heater off, its emergency light on, the other room carries on normally

Hints

Hint 1

The name from the define applies to sensor and heater, the type tells them apart.

Hint 2

Every room needs its own register for the heating state, temp and tmp may be shared.

Hint 3

Emergency light: snan missing temp and sbn LAMP LABEMERG On missing – not LAB, or it hits the normal light.

Quiz

4 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the simulator exercise
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere