Ejemplo n.º 1
0
 public override void BuildInto(NetworkTable parentTable, NetworkTable metaTable)
 {
     BuildMetadata(metaTable);
     if (m_builder == null)
     {
         m_builder       = new SendableBuilderImpl();
         m_builder.Table = parentTable.GetSubTable(Title);
         m_sendable.InitSendable(m_builder);
         m_builder.StartListeners();
     }
     m_builder.TriggerUpdateTable();
 }
Ejemplo n.º 2
0
        public void Publish(ISendable sendable, NetworkTable table)
        {
            if (table == null)
            {
                throw new ArgumentNullException(nameof(table));
            }

            if (sendable == null)
            {
                throw new ArgumentNullException(nameof(sendable));
            }

            lock (mutex)
            {
                var comp = GetOrAdd(sendable);
                comp.Builder.ClearProperties();
                comp.Builder.Table = table;
                sendable.InitSendable(comp.Builder);
                comp.Builder.TriggerUpdateTable();
                comp.Builder.StartListeners();
            }
        }