Class DeviceNet
Data class for storing and retrieving information about devices connected to a device network.
Inheritance
System.Object
DeviceNet
Assembly: Content.Server.dll
Syntax
public sealed class DeviceNet : object
Constructors
|
Improve this Doc
View Source
DeviceNet(Int32, IRobustRandom)
Declaration
public DeviceNet(int netId, IRobustRandom random)
Parameters
Type |
Name |
Description |
System.Int32 |
netId |
|
Robust.Shared.Random.IRobustRandom |
random |
|
Fields
|
Improve this Doc
View Source
Devices
Devices, mapped by their "Address", which is just an int that gets converted to Hex for displaying to users.
This dictionary contains all devices connected to this network, though they may not be listening to any
specific frequency.
Declaration
public readonly Dictionary<string, DeviceNetworkComponent> Devices
Field Value
|
Improve this Doc
View Source
ListeningDevices
Devices listening on a given frequency.
Declaration
public readonly Dictionary<uint, HashSet<DeviceNetworkComponent>> ListeningDevices
Field Value
|
Improve this Doc
View Source
NetId
Declaration
public readonly int NetId
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ReceiveAllDevices
Devices listening to all packets on a given frequency, regardless of the intended recipient.
Declaration
public readonly Dictionary<uint, HashSet<DeviceNetworkComponent>> ReceiveAllDevices
Field Value
Methods
|
Improve this Doc
View Source
Add(DeviceNetworkComponent)
Add a device to the network.
Declaration
public bool Add(DeviceNetworkComponent device)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RandomizeAddress(String, Nullable<String>)
Give an existing device a new randomly generated address. Useful if the device's address prefix was updated
and they want a new address to reflect that, or something like that.
Declaration
public bool RandomizeAddress(string oldAddress, string? prefix = null)
Parameters
Type |
Name |
Description |
System.String |
oldAddress |
|
System.Nullable<System.String> |
prefix |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Remove(DeviceNetworkComponent)
Remove a device from the network.
Declaration
public bool Remove(DeviceNetworkComponent device)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
UpdateAddress(String, String)
Update the address of an existing device.
Declaration
public bool UpdateAddress(string oldAddress, string newAddress)
Parameters
Type |
Name |
Description |
System.String |
oldAddress |
|
System.String |
newAddress |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
UpdateReceiveAll(String, Boolean)
Make an existing network device listen to a new frequency.
Declaration
public bool UpdateReceiveAll(string address, bool receiveAll)
Parameters
Type |
Name |
Description |
System.String |
address |
|
System.Boolean |
receiveAll |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
UpdateReceiveFrequency(String, Nullable<UInt32>)
Make an existing network device listen to a new frequency.
Declaration
public bool UpdateReceiveFrequency(string address, uint? newFrequency)
Parameters
Type |
Name |
Description |
System.String |
address |
|
System.Nullable<System.UInt32> |
newFrequency |
|
Returns
Type |
Description |
System.Boolean |
|