public Property(NetworkTable table, string key) { Entry = table.GetEntry(key); Listener = new NtEntryListener(0); Update = null; CreateListener = null; }
public void StopListener() { if (Entry.IsValid && Listener.Get() != 0) { Entry.RemoveListener(Listener); Listener = new NtEntryListener(0); } }
public void StartListener() { entryListener = instance.AddEntryListener("", (in RefEntryNotification notification) => { if (notification.Flags.HasFlag(NotifyFlags.New)) { NewEntry?.Invoke(notification.Name, notification.Entry, notification.Value.ToValue()); } else if (notification.Flags.HasFlag(NotifyFlags.Delete)) { DeletedEntry?.Invoke(notification.Name); } }, NotifyFlags.New | NotifyFlags.Delete | NotifyFlags.Immediate | NotifyFlags.Local);
public void NT_RemoveEntryListener(NtEntryListener entry_listener) { Native_NT_RemoveEntryListener(entry_listener); }
private static extern void Native_NT_RemoveEntryListener(NtEntryListener entry_listener);