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.phoenixpro.StatusCode; 010 011/** 012 * Abstract Control Request class that other control requests extend for use. 013 */ 014public abstract class ControlRequest { 015 protected final ControlInfo requestReference; 016 017 /** 018 * Constructs a new Control Request with the given name. 019 * 020 * @param name Name of the control request 021 */ 022 public ControlRequest(String name) { 023 requestReference = new ControlInfo(name); 024 } 025 026 public abstract StatusCode sendRequest(String network, int deviceHash, boolean cancelOtherRequests); 027 028 /** 029 * Gets information about this control request. 030 * 031 * @return An instance of {@link ControlInfo} containing information about this control request 032 */ 033 public ControlInfo getControlInfo() { 034 return requestReference; 035 } 036}