Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Connecting two java programs with a Ethernet cord (http://www.chiefdelphi.com/forums/showthread.php?t=109883)

279 EMPIE 06-12-2012 13:13

Connecting two java programs with a Ethernet cord
 
I was wondering if anyone has made any code that will send information in a Java Program on a laptop through a Ethernet cord to the Program in the cRIO.

I'm sure it is do able its just i haven't found much sample code to learn off of. I have no experiance with programming IP/TCP, Ports, or anything else that has to do with this subject.

I was just wondering if someone could help me out. :D

F22Rapture 06-12-2012 16:53

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by 279 EMPIE (Post 1199215)
I was wondering if anyone has made any code that will send information in a Java Program on a laptop through a Ethernet cord to the Program in the cRIO.

I'm sure it is do able its just i haven't found much sample code to learn off of. I have no experiance with programming IP/TCP, Ports, or anything else that has to do with this subject.

I was just wondering if someone could help me out. :D

I'd recommend making a SmartDashboard plugin to serve your needs, and use Networktables/Networktables2 to pass the data. That way you really don't even need to bother with handling TCP/UDP directly.

What are you doing with the data at either end?

279 EMPIE 07-12-2012 14:04

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by F22Rapture (Post 1199283)
What are you doing with the data at either end?

Well i would most likely be transferring Variables and Numbers from the Laptop to the cRIO.

joelg236 07-12-2012 15:10

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by 279 EMPIE (Post 1199566)
Well i would most likely be transferring Variables and Numbers from the Laptop to the cRIO.

I would definitely recommend saving yourself a lot of trouble and use the SmartDashboard. It can do that without a problem.

F22Rapture 07-12-2012 18:15

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by 279 EMPIE (Post 1199566)
Well i would most likely be transferring Variables and Numbers from the Laptop to the cRIO.

Quote:

Originally Posted by joelg236 (Post 1199575)
I would definitely recommend saving yourself a lot of trouble and use the SmartDashboard. It can do that without a problem.

Exactly. You don't even need to use a plugin since networktables has that functionality built in.

279 EMPIE 10-12-2012 13:40

Re: Connecting two java programs with a Ethernet cord
 
Thank You,

I have never used SmartDashboard before so i will look into that and see what i can do.

279 EMPIE 11-12-2012 12:21

Re: Connecting two java programs with a Ethernet cord
 
Does SmartDashboard have a API??

BigJ 11-12-2012 12:28

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by 279 EMPIE (Post 1200935)
Does SmartDashboard have a API??

http://www.wbrobotics.com/javadoc/ed...Dashboard.html

279 EMPIE 11-12-2012 13:13

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by BigJ (Post 1200940)

TY

connor.worley 11-12-2012 13:52

Re: Connecting two java programs with a Ethernet cord
 
Note: SmartDasboard 2/NetworkTables 2 will be coming out for the 2013 season. Make sure to upgrade when it arrives!

F22Rapture 11-12-2012 17:36

Re: Connecting two java programs with a Ethernet cord
 
Quote:

Originally Posted by connor.worley (Post 1200959)
Note: SmartDasboard 2/NetworkTables 2 will be coming out for the 2013 season. Make sure to upgrade when it arrives!

Actually, it's SmartDashboard 3 :P

Has anybody managed to figure out how NT2 works, exactly? I'm sure it's much more efficient than NT1 but it also seems a whole lot more complicated. We don't have a robot to test on atm so I really couldn't mess with it much even if I wanted to.


All times are GMT -5. The time now is 09:58.

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