View Single Post
  #5   Spotlight this post!  
Unread 09-10-2015, 22:03
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Get/Set Refnum vs Global

Just to clarify terminology, open nodes return refnums. The approach in 2009 was that you would just wire the refnum through the connector pane, possibly using clusters. No names, and not that hard, but there are a number of syntax errors that can come up.

In order to avoid concepts such as modifying a connector or building a cluster, we added the refnum registry in 2010. The benefit is that you don't need to cluster various I/O refnums and send them to the auto and tele routines via connector. But instead, you would use a name lookup. In general, I also prefer earlier syntax checking, but this was a way to avoid several concepts. I don't think the name lookup is very expensive, but if I were to try and avoid it, I'd choose wires over globals or functional globals.

The new framework I was eluding to is to have subsystems own I/O. Very little I/O will likely be published for use in tele or auto. Instead, it will belong to the state machines or control loops that are directed by auto and tele alike. This is similar to Command-Based programming offered by WPILib, but with distinct differences.

None of the other frameworks will be removed, but an additional complementary organizational structure will be added. I'm excited to see what teams do with it. It was covered in a Champs presentation last year, and will be a part of this season's beta testing which gets underway any day now.

Greg McKaskle
Reply With Quote