Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What do the Swigtype classes do in the WPI, I have looked at the documentation (http://www.chiefdelphi.com/forums/showthread.php?t=134037)

TheTurtleofDoom 05-02-2015 16:18

What do the Swigtype classes do in the WPI, I have looked at the documentation
 
http://first.wpi.edu/FRC/roborio/rel...a/classes.html is where I looked for the documentation, googling wpilibj swigtype had one result.Anyone know what they do?

nighterfighter 05-02-2015 16:27

Re: What do the Swigtype classes do in the WPI, I have looked at the documentation
 
Did you try just searching "Swigtype"?

While I am not 100% sure, I believe Swigtype is referring to this:

http://www.swig.org/

Is there anything specific you are trying to do with them?

TheTurtleofDoom 05-02-2015 16:40

Re: What do the Swigtype classes do in the WPI, I have looked at the documentation
 
Quote:

Originally Posted by nighterfighter (Post 1438877)
Did you try just searching "Swigtype"?

While I am not 100% sure, I believe Swigtype is referring to this:

http://www.swig.org/

Is there anything specific you are trying to do with them?

No I didn't google that, and no I'm not trying to do anything with them, just saw the classes in the api and didn't know what they did, and couldn't find out anything about them.Thank you for this illuminating post.

baumgartensam 05-02-2015 17:28

Re: What do the Swigtype classes do in the WPI, I have looked at the documentation
 
I just dove into the source and the header for all the files named SWIGTYPE_* is:
Code:

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.11
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

Not sure what they are for but they are definitely associated with http://www.swig.org. The uses also seem very strange. Brad Miller will probably have a better explanation :)

UPDATE:
"SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby, and Tcl." Maybe it has to do with the cross-compilation of wpilib?????

James Kuszmaul 05-02-2015 18:11

Re: What do the Swigtype classes do in the WPI, I have looked at the documentation
 
In order to use certain HAL classes (written in C++) in the Java portion of WPILib, we create JNI bindings for those classes/functions. In the case of the new Talon SRX, we used swig to generate the JNI bindings for the CanTalonSRX class and then wrapped that with the CANTalon class. Those odd SWIGTYPE* classes are how swig handles c pointers in the JNI bindings. Teams should not need to use any of the swig-related classes; the CANTalon wrapper should implement all the necessary features.


All times are GMT -5. The time now is 01:46.

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