001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenixpro.controls; 008 009import java.util.HashMap; 010import java.util.Map; 011 012/** 013 * Information about a control request. 014 * <p> 015 * This type contains a map that maps control parameter names to 016 * the corresponding applied value. Users can iterate through the map 017 * to look at the applied control parameters of the control request. 018 * 019 * @deprecated Classes in the phoenixpro package will be removed in 2024. 020 * Users should instead use classes from the phoenix6 package. 021 */ 022@Deprecated(forRemoval = true) 023public class ControlInfo { 024 private final Map<String, String> values = new HashMap<String, String>(); 025 026 /** 027 * Constructs a new ControlInfo object for the control request of the given name. 028 * <p> 029 * This is constructed by the {@link ControlRequest} class and can be accessed by calling {@link ControlRequest#getControlInfo}. 030 * 031 * @param name Name of the control request 032 * 033 * @deprecated Classes in the phoenixpro package will be removed in 2024. 034 * Users should instead use classes from the phoenix6 package. 035 */ 036 @Deprecated(forRemoval = true) 037 public ControlInfo(String name) { 038 values.put("name", name); 039 } 040 041 /** 042 * Gets the map of control parameter names to the corresponding applied value. 043 * 044 * @return Map of control parameter names and corresponding applied values 045 */ 046 public Map<String, String> getNameValues() { 047 return values; 048 } 049}