* Implement device networking * Implement device configuration menu * Fix device network * Implement disposal mailing unit * Implement base network connection Implement wired and wireless network connection Implement device network metadata * Fix dereference null error * Fix wired network null checks * Change BaseNetworks enum to NetworkUtils class Add PingResponse function to NetworkUtils Change device network file structure * Add doc comments * Apply suggestions from code review Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Add tag validation to disposal mailing unit * Add tag validation to the mailing unit component * Address reviews Change WiredNetwork can connect check Change device networking string literals to constants * Address reviews Revert changes to PowerProvider and PowerReceiver Add new NodeGroup WELP * Fix recursive access to Owner property * Integrate suggested changes * Fix TryGetWireNet acting on NullPowerProvider Fix network connections not checking if their owner has been deleted * Close device network connection when the owning entity got deleted Fix mailing unit not closing the device network connection on remove * Remove GetWireNet from NullPowerProvider Co-authored-by: Julian Giebel <j.giebel@netrocks.info> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Content.Server.Interfaces
|
|
{
|
|
public interface IDeviceNetworkConnection
|
|
{
|
|
public int Frequency { get; }
|
|
/// <summary>
|
|
/// Sends a package to a specific device
|
|
/// </summary>
|
|
/// <param name="frequency">The frequency the package should be send on</param>
|
|
/// <param name="address">The target devices address</param>
|
|
/// <param name="payload"></param>
|
|
/// <returns></returns>
|
|
public bool Send(int frequency, string address, Dictionary<string, string> payload);
|
|
/// <see cref="Send(int, string, Dictionary{string, string})"/>
|
|
public bool Send(string address, Dictionary<string, string> payload);
|
|
/// <summary>
|
|
/// Sends a package to all devices
|
|
/// </summary>
|
|
/// <param name="frequency">The frequency the package should be send on</param>
|
|
/// <param name="payload"></param>
|
|
/// <returns></returns>
|
|
public bool Broadcast(int frequency, Dictionary<string, string> payload);
|
|
/// <see cref="Broadcast(int, Dictionary{string, string})"/>
|
|
public bool Broadcast(Dictionary<string, string> payload);
|
|
}
|
|
}
|