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 com.ctre.phoenix6.StatusCode; 010 011/** 012 * Abstract Control Request class that other control requests extend for use. 013 * 014 * @deprecated Classes in the phoenixpro package will be removed in 2024. 015 * Users should instead use classes from the phoenix6 package. 016 */ 017@Deprecated(forRemoval = true) 018public abstract class ControlRequest { 019 protected final ControlInfo requestReference; 020 021 /** 022 * Constructs a new Control Request with the given name. 023 * 024 * @param name Name of the control request 025 * 026 * @deprecated Classes in the phoenixpro package will be removed in 2024. 027 * Users should instead use classes from the phoenix6 package. 028 */ 029 @Deprecated(forRemoval = true) 030 public ControlRequest(String name) { 031 requestReference = new ControlInfo(name); 032 } 033 034 public abstract StatusCode sendRequest(String network, int deviceHash, boolean cancelOtherRequests); 035 036 /** 037 * Gets information about this control request. 038 * 039 * @return An instance of {@link ControlInfo} containing information about this control request 040 */ 041 public ControlInfo getControlInfo() { 042 return requestReference; 043 } 044}