ParentDevice Class

Base class of Phoenix devices. This holds the base information for the devices, and can be used as a generic type to hold onto a collection of multiple devices.

Definition

Namespace: CTRE.Phoenix6.Hardware
Assembly: Phoenix6 (in Phoenix6.dll) Version: 1.0.0
C#
public abstract class ParentDevice
Inheritance
Object    ParentDevice
Derived

Constructors

ParentDevice Constructor for a device

Properties

ControlRequest The last applied control request. Caller can cast this to the derived class if they know what type it is, otherwise they can use the ControlInfo to get info out of it.
DeviceHash Hash of this device
DeviceID ID of this device
Network Network this device is on

Methods

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)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
LookupStatusSignalT(UInt16, String, Boolean) Looks up a status signal and inserts it into the local dictionary if not found
LookupStatusSignalT(UInt16, Int32, FuncDictionaryInt32, StatusSignalT, String, Boolean) Looks up a status signal and inserts it into the local dictionary if not found
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OptimizeBusUtilization Optimizes the device's bus utilization by reducing the update frequencies of its status signals.

All status signals that have not been explicitly given an update frequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.

This function only needs to be called once on this device in the robot program. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.

To restore the default status update frequencies, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. Alternatively, the user can override individual status update frequencies using {@link BaseStatusSignal#setUpdateFrequency}.

OptimizeBusUtilizationForAll Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.

All status signals that have not been explicitly given an update frequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.

This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.

To restore the default status update frequencies, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. Alternatively, the user can override individual status update frequencies using {@link BaseStatusSignal#setUpdateFrequency}.

This will wait up to 0.050 seconds (50ms) for each status frame.

ReportIfTooOld Function to check if the device is too old
SetControlPrivate Sets the control request to this device
ToStringReturns a string that represents the current object.
(Inherited from Object)

Fields

deviceIdentifier The unique deviceIdentifier for this device
kDefaultControlRatePeriodsSec The default rate controls are applied

See Also