NetworkTableEntry Last Change

I’m trying to write some vision code and would like to confirm that this method – NetworkTableEntry (WPILib API 2023.2.1) – is going to output what I expect.

I’m expecting it output the FPGA timestamp when the last entry was received on the Rio in microseconds.

It’ll output the exact value you see in the timestamp column in outline viewer (which I don’t think is shown by default. Or im thinking of a different tool)

If the code is running on the Rio, it is the FPGA timestamp value in microseconds—the same timer that Timer.getFPGATime() returns (except that function returns floating point seconds instead of integer microseconds). If it’s on a coprocessor it’s local time.

If both sides of the connection are running NT4, this will be the time (still in FPGA microseconds) that the value was set on the transmit side (NT4 synchronizes time across the network, so it’s an approximation within some error band).

If you really want to be sure you’re getting the time and the value together, use getValue, or use a Subscriber and use getAtomic().

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.