Thread: cRIO simulator
View Single Post
  #7   Spotlight this post!  
Unread 19-07-2012, 09:36
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: cRIO simulator

One could conceivably use a Proxy (http://en.wikipedia.org/wiki/Proxy_pattern) to abstract WPILib from the actual code, allowing a mock implementation with GUI/output to be set up in its place while using the same calls and method signatures. However, you'd have to make sure everything you're using is covered by the proxy (which can be a lot of work).

I guess I've never thought about it -- would using the same package names in a mock implementation be bad form? I suppose it's not a big deal if released under the same license as the original. It sure would make it easier on the proxy (otherwise some configuration file would have to be set up, or the code in the proxy would have to be changed when building differently).