Go to Post Good luck, and may the FIRST be with you. - Leav [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-03-2013, 08:07 PM
IDKnow IDKnow is offline
Registered User
FRC #1671
 
Join Date: Feb 2013
Location: California
Posts: 8
IDKnow is an unknown quantity at this point
C++ Network Tables

I am attempting to use the network tables class to pass values from my SmartDashboard extensions to the robot.

This thread describes the process using Java
http://www.chiefdelphi.com/forums/sh...d.php?t=103352
but it seems to imply near the end that the same process will not work for C++

In my code and in the windows API I could find equivalent commands though- for everything other than begin and end transaction.

Without these, the robot crashes as soon an i try TableName->GetNumber("",0);

Am I missing something?

Code:
//declarations:
NetworkTable *Vision;
float d;
//initialization
Vision->GetTable("VisionTable");//should create table if does not exist
//control loop (where it crashes)
if (Vision->IsConnected())
{
     //Vision->beginTransaction();
     d = Vision->GetNumber("d",0);//where 0 is default if "d" does not exist
     //Vision->endTransaction();
}
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 09:55 AM.

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