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.phoenix6.controls; 008 009import java.util.Map; 010 011import com.ctre.phoenix6.StatusCode; 012 013/** 014 * Abstract Control Request class that other control requests extend for use. 015 */ 016public abstract class ControlRequest { 017 protected final String name; 018 019 /** 020 * Constructs a new Control Request with the given name. 021 * 022 * @param name Name of the control request 023 */ 024 public ControlRequest(String name) { 025 this.name = name; 026 } 027 028 /** 029 * Gets the name of this control request. 030 * 031 * @return Name of the control request 032 */ 033 public String getName() { 034 return name; 035 } 036 037 public abstract StatusCode sendRequest(String network, int deviceHash, boolean cancelOtherRequests); 038 039 /** 040 * Gets information about this control request. 041 * 042 * @return Map of control parameter names and corresponding applied values 043 */ 044 public abstract Map<String, String> getControlInfo(); 045}