Devicenet Ideas

Personal computer Done in #11335

Like stationary PDAs. You can insert cartridges to use or install the programm on that cartridge and you can use installed programms.

Instead of having access to the wireless network it has access to the wired one.

Comes with programms that aren't on PDAs by default.

Newscaster Done in #19610

Like the newscaster in ss13 it reads news from a list of random news but you can send it news to read. Has a rate limit that will drop sent news so you can't spam with it.

WirelessStationNetworkComponent & System Done in #7542

Like the wireless network but also restricts communication to devices that spawned on the same station.

PDA/Email messaging program and server

(This is mostly taken from how PDA messages work in ss13)
Allows sending emails between PDAs and Personal computers.

Message storage

Messages are stored on the email server. There can be one email server per station, others on the same station won't be used unless the first one looses power or gets destroyed.

Optional The active server synchronises itself with all of the inactive servers on the same station (This happens inside the system directly, no device networking here).

One active / Multiple inactive server model

The one active / multiple inactive server modell uses the system that will get refactored into its own system from the crew monitoring server link text


The email client system will use the GetActiveServer method of the email server system to retrieve the active server if the client doesn't have a server set yet or that server timed out. This is also from the system that gets refactored out.

Sending and receiving emails

Optional The server can be queried for all known email addresses.

When sending a message to someone the PDA/PC sends the message together with the target email address to the server and the server will send the message to the target device.

When a PDA recieves a message it plays a chime and sends a chat message only the person holding it can see, containing the sent message.

Notifications can be dissabled.

Optional: Multiple network support

The server is able send on the wireless and the wired network because it saves what network the registered devices are on along with the email address and the network address.

This requires devices to be able to register themselves with two device net ids at once (which should only be done if it is really needed).

Optional: Channels and Department based Channels

Channels are special email addresses that relay the messages sent to them to the email addresses that are subscribed to that channel.

Channels can be created and they can be deleted by the channel creator.

When registering to a server the client also sends the job of the inserted ID so the server can put them into special department channels.

Department channels can't be joined, left or deleted.

Optional: RDs email management console

The research director gets a console which connects to the email server via device net that can be used to view and manage all emails and groups.
It uses device net with an AccessComponent on the mail server so the management functions can be hijacked by traitors that got their hands on an ID card with the right access. (This requires device net access restrictions to be implemented.

Wireless Gadgets and Sensors

Sensors and other things you can place down and interact with using device networking.
Those gadges can't broadcast but you can set their frequency and if they can send packets you need to set the address they send to.
Sensors have a configurable interval they send information at. This interval cant be smaller than 2 seconds and is slightly randomized to prevent all sensors from sending at the same time.

  • Pressure / Temp / Gas sensor you can place in a room or on pipes (Done)
  • Valves (Done)
  • Movement sensor
  • Buzzer
  • Toggleable light
  • Router (Relays packets to specified addresses)

The Pressure sensor for example will send the current pressure to the given address at the specified interval.

Network Snooper Cartridge

A programm that allows you to listen to packets sent on a specified frequency and to send packets

NetMonitor Cartridge

Allows you to define a list of packet fields you want to have displayed using this program (like pressure from a wireless pressure sensor).

In order to have their fields displayed the packets need to be directed at the PDA/PC the program is running on.

You can enable alerts per field that notify you when that field reaches a specified condition.

Multi network connections using entities aka. Network Cards

Some devices need the ability to use multiple device networks at the same time and each connection should be restricted by different connection components (like the wireless connection component for restricting by range).

This is hard to achieve with just one entity because you would need a way to define what connection component restricts what network id and then you couldn't have different networks use both a wireless component with different ranges for example.

An easier way is to actually use an extra entity in a container which makes adding network cards just require you to add a sprite to that entity.

Communication between cards and the main entity

The NetworkCardSystem is responsible for relaying sent and received packages between the network cards and the main entity. It does this by providing a method for sending network packets which calls DeviceNetworkSystem#QueueEntity with the entity id of the card that handles the given netId or the mainEntity itself if it also provides a network connection by itself. For example an entity with a wired connection that has a network card with a wireless connection.

As stated in the device net documentation, a netId specifies the network that is used but not any connection checks so using the wireless net id (2) doesn't mean the entity is wireless aka. has a limited range.

Use case

One usecase would be the mail server from the Section about PDA messages
which should ideally connect to the wired and wireless network so messages can be sent to stationary computers (which might get added in the future) or the RDs console for managing the email server.

More usecases:

  • Routers
  • Servers
    • Nothing concretly yet but this allows server entities to use multiple networks and it would allow for an uber server that combines multiple servers in one to reduce the amount of server entities
  • Subspace relays (station bound wireless <-> interstation)
    • Could be used in something like afterlight that has multiple ships as a midgame upgrade

Notes:

  • We have the device list system now but only air and fire alarms use it rn.
Select a repo