Go to Post "It's not child labor if they wear a team shirt!" - Vermeulen [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2013, 19:22
Fifthparallel Fifthparallel is offline
Registered User
AKA: Sam Chen
FRC #1410
 
Join Date: Dec 2012
Rookie Year: 2011
Location: Denver, CO
Posts: 65
Fifthparallel is an unknown quantity at this point
Requires() in the Command-Based Framework

Does the Requires() function in the command class preclude any other command that also uses parts of the subsystem? Can anybody explain how this works better? The workshop videos and the comments in the headers are too vague to understand the control system, imo.

EDIT:: Given that I have commands that are manipulating multiple parts of a subsystem, do any of them need to Require() the subsystem? Or, should I be refactoring things to be smaller so that I can still Require but not run into a problem?
__________________
sudo chmod u+x helloworld.sh
gotta start somewhere.

Last edited by Fifthparallel : 30-01-2013 at 19:32.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2013, 19:44
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Requires() in the Command-Based Framework

The command architecture is designed such that only one command should be operating on a subsystem at one time which is enforced using Requires(). If you have a subsystem that needs to have multiple commands operating on it at once, it may be too large and able to be broken into smaller components.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2013, 14:29
Iaquinto.Joe's Avatar
Iaquinto.Joe Iaquinto.Joe is offline
RPI 2018
AKA: Joe Iaquinto
FRC #0308 (The Monsters)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2011
Location: United States
Posts: 166
Iaquinto.Joe is a jewel in the roughIaquinto.Joe is a jewel in the roughIaquinto.Joe is a jewel in the rough
Re: Requires() in the Command-Based Framework

Exactly what ruffles is saying. Your command needs to be broken into a command group that controls several individual commands. Each command should not span more than one subsystem.
__________________
4 year 2011 - 2014 FRC team 308 member, Lead Programmer - C++ / LabVIEW

3 year 2011, 2013, 2014 OCCRA member, Co-Captain OCCRA team 308
  • OCCRA Engineering Excellence - Waterford Kettering 2013
  • Innovation in Control - 2011
  • Quality award- Northville 2012
  • Engineering Excellence- Howell 2014
  • Innovation in Controls- Livonia 2014
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi