Go to Post Anything released in a game hint is subject to enough misinterpretation and "nah, they'll never do that" to deflect any possibility of something being actionable. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-02-2013, 13:18
sparkytwd's Avatar
sparkytwd sparkytwd is offline
Registered User
FRC #3574
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Seattle
Posts: 96
sparkytwd will become famous soon enough
Pure Python NetworkTables 2 client

For this year, I've been working with Team 3574 on doing vision processing on an embedded ARM board (Odroid U2). As part of that work I implemented a NetworkTables client in Python.

There is some roughness to it, it's not pythonic, it has no support for array types (couldn't create those in either Python or Java), has some weirdness about reading your writes (sometimes you won't, sometimes you will, you could read invalid data), and makes liberal use of sleeps to make sure events happen in sequence rather than explicit checking.

If that hasn't scared you off, the nice things about it are; its dead simple with a single constructor that takes your team number, and just 2 methods, getValue, setValue. Types are enforced through exceptions (so be careful in non test code).

If you use this only to read values, or be the only client updating another value, it should work just fine.

https://github.com/Team3574/2013Visi...c/nt_client.py
Reply With Quote
 


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 03:46.

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