public void Dispose() { if (m_owned && Handle.Get() != 0) { NtCore.DestroyInstance(Handle); Handle = new NtInst(); } }
private NetworkTableInstance(NtInst handle) { m_entryListenerToken = new Lazy <CancellationTokenSource>(CreateEntryListenerThread); m_connectionListenerToken = new Lazy <CancellationTokenSource>(CreateConnectionListenerThread); m_rpcListenerToken = new Lazy <CancellationTokenSource>(CreateRpcListenerThread); m_loggerListenerToken = new Lazy <CancellationTokenSource>(CreateLoggerThread); m_owned = false; Handle = handle; }
private static extern byte *Native_NT_LoadEntries(NtInst inst, byte *filename, byte *prefix, UIntPtr prefix_len, IntPtr warnFunc);
private static extern byte *Native_NT_SaveEntries(NtInst inst, byte *filename, byte *prefix, UIntPtr prefix_len);
public byte *NT_LoadPersistent(NtInst inst, byte *filename, IntPtr warnFunc) { return(Native_NT_LoadPersistent(inst, filename, warnFunc)); }
public byte *NT_SavePersistent(NtInst inst, byte *filename) { return(Native_NT_SavePersistent(inst, filename)); }
private static extern NtLoggerPoller Native_NT_CreateLoggerPoller(NtInst inst);
private static extern NtBool Native_NT_IsConnected(NtInst inst);
private static extern void Native_NT_StartDSClient(NtInst inst, uint port);
public void NT_SetServerTeam(NtInst inst, uint team, uint port) { Native_NT_SetServerTeam(inst, team, port); }
private static extern void Native_NT_SetServerTeam(NtInst inst, uint team, uint port);
public void NT_SetServerMulti(NtInst inst, UIntPtr count, byte **server_names, uint *ports) { Native_NT_SetServerMulti(inst, count, server_names, ports); }
private static extern void Native_NT_SetServerMulti(NtInst inst, UIntPtr count, byte **server_names, uint *ports);
public void NT_SetServer(NtInst inst, byte *server_name, uint port) { Native_NT_SetServer(inst, server_name, port); }
private static extern void Native_NT_SetServer(NtInst inst, byte *server_name, uint port);
private static extern NtConnectionInfo *Native_NT_GetConnections(NtInst inst, UIntPtr *count);
public NtConnectionInfo *NT_GetConnections(NtInst inst, UIntPtr *count) { return(Native_NT_GetConnections(inst, count)); }
public void NT_StartDSClient(NtInst inst, uint port) { Native_NT_StartDSClient(inst, port); }
public NtBool NT_IsConnected(NtInst inst) { return(Native_NT_IsConnected(inst)); }
private static extern void Native_NT_StopDSClient(NtInst inst);
private static extern byte *Native_NT_SavePersistent(NtInst inst, byte *filename);
public void NT_StopDSClient(NtInst inst) { Native_NT_StopDSClient(inst); }
private static extern byte *Native_NT_LoadPersistent(NtInst inst, byte *filename, IntPtr warnFunc);
private static extern void Native_NT_SetUpdateRate(NtInst inst, double interval);
public NtLoggerPoller NT_CreateLoggerPoller(NtInst inst) { return(Native_NT_CreateLoggerPoller(inst)); }
public void NT_SetUpdateRate(NtInst inst, double interval) { Native_NT_SetUpdateRate(inst, interval); }
public byte *NT_SaveEntries(NtInst inst, byte *filename, byte *prefix, UIntPtr prefix_len) { return(Native_NT_SaveEntries(inst, filename, prefix, prefix_len)); }
private static extern void Native_NT_Flush(NtInst inst);
public byte *NT_LoadEntries(NtInst inst, byte *filename, byte *prefix, UIntPtr prefix_len, IntPtr warnFunc) { return(Native_NT_LoadEntries(inst, filename, prefix, prefix_len, warnFunc)); }
public void NT_Flush(NtInst inst) { Native_NT_Flush(inst); }