Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Sandbox.ModAPI.Ingame.IMyIntergridCommunicationSystem

Morten Aune Lyrstad edited this page Apr 16, 2022 · 25 revisions

IndexNamespace Index

IMyIntergridCommunicationSystem Interface

public interface IMyIntergridCommunicationSystem

This is the entry point for all communication operations.

Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll

Properties

Member Description
long Me { get; } Gets communication address for current programmable block.
IMyUnicastListener UnicastListener { get; } Gets unicast listener for current programmable block.

Methods

Member Description
void DisableBroadcastListener(IMyBroadcastListener) Disables given broadcast listener. In case given broadcast listener is not active nothing happens. Instance of this broadcast listener remains valid and all pending messages may be accepted as normal. Disabling broadcast listener also disables it's message callback, if active. Consuming the last pending message will permanently disable the the provided listener and it's never going to be activated again. ==> Registering new broadcast lister with the same tag will will allocate new listener instance instead.
void GetBroadcastListeners(List, [Func<IMyBroadcastListener, bool>]) Retrieves list of all active broadcast listeners and listeners with pending messages, registered by current programmable block. Returned list is snapshot of current state and is not updated by future operations.
bool IsEndpointReachable(long, [TransmissionDistance]) Determines if given endpoint is currently reachable. Similar to sending ICMP message.
IMyBroadcastListener RegisterBroadcastListener(string) Registers broadcast listener with given tag for current programmable block. In case there is already another active broadcast lister with given tag new listener is NOT registered and the already active one is returned instead.
void SendBroadcastMessage(string, TData, [TransmissionDistance])
bool SendUnicastMessage(long, string, TData)
Clone this wiki locally