StatusSignalT Class

Represents a status signal with data of type T, and operations available to retrieve information about the signal.

Definition

Namespace: CTRE.Phoenix6
Assembly: Phoenix6 (in Phoenix6.dll) Version: 1.0.0
C#
public class StatusSignal<T> : BaseStatusSignal, 
	ICloneable
Inheritance
Object    BaseStatusSignal    StatusSignalT
Implements
ICloneable

Type Parameters

T
Underlying type of signal to get

Properties

AllTimestamps All the timestamps associated with this signal.
(Inherited from BaseStatusSignal)
HasUpdated Check whether the signal has been updated since the last check.

Note that the signal must be refreshed before calling this routine.
(Inherited from BaseStatusSignal)

Identifier Identifier for the device this signal is associated to. Users may use it for access to the device's ID, network name, or a unique-per-canbus device hash.
(Inherited from BaseStatusSignal)
Name The name of this signal.
(Inherited from BaseStatusSignal)
Status The status of the last time this signal was updated.
(Inherited from BaseStatusSignal)
Timestamp The most accurate timestamp associated with this signal.
(Inherited from BaseStatusSignal)
Units The units associated with this signal. These units are encoded as UTF-8, so some applications may not render them properly.
(Inherited from BaseStatusSignal)
Value Gets the cached value from this status signal.

To make sure the value is up-to-date, call Refresh(Boolean) or WaitForUpdate(Double, Boolean).

ValueAsDouble Gets the value as a double instead of the generic type. This may be helpful when working with the base class.
(Inherited from BaseStatusSignal)

Methods

AsSupplier Returns a lambda that calls Refresh and gets the value on this object.
Clone Clone this object to get a copy of itself
CopyFrom Copies the contents of the other signal into this signal
(Inherited from BaseStatusSignal)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetAppliedUpdateFrequency Gets the rate at which the device will publish this signal.

This is typically the last value passed into SetUpdateFrequency(Double, Double). The returned value may be higher if another StatusSignalT in the same status frame has been set to a higher update frequency.
(Inherited from BaseStatusSignal)

GetDataCopy Get a basic data-only container with this information, to be used for things such as data logging. Note if looking for Phoenix Logger features, see the SignalLogger class instead.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Refresh Refreshes the value of this status signal.

If the user application caches this StatusSignal object instead of periodically fetching it from the hardware device, this function must be called to fetch fresh data.

This performs a non-blocking refresh operation. If you want to wait until you receive the signal, call WaitForUpdate(Double, Boolean) instead.

SetUpdateFrequency Sets the rate at which the device will publish this signal.

A frequency of 0 Hz will turn off the signal. Otherwise, the minimum supported signal frequency is 4 Hz, and the maximum is 1000 Hz.

If other StatusSignals in the same status frame have been set to an update frequency, the fastest requested update frequency will be applied to the frame.
(Inherited from BaseStatusSignal)

ToString Gets the string representation of this object.

Includes the value of the signal and the units associated with this signal.
(Overrides ObjectToString)

WaitForUpdate Waits up to timeoutSec to get the up-to-date status signal value.

This performs a blocking refresh operation. If you want to non-blocking refresh the signal, call Refresh(Boolean) instead.

Fields

localRef Local reference to a StatusSignalNativeStatusSignalInfo object for use with the native interface.
(Inherited from BaseStatusSignal)
spn SPN index for this signal.
(Inherited from BaseStatusSignal)

See Also