Go to Post ...Al Skierk, uh, Skierwike, uh, you know who I mean - Gary Dillard [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

 
Reply
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 15-12-2009, 22:15
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
replace WPILib part

In the C programming manual that comes with WPILib, I remember it saying you can replace parts of WPILib by adding the source code to your class, and then just compiling. I was testing a modified Dashboard class (removed all functions, except Printf and Finalize, both renamed Add and Send (and inner code tweaked), and no matter what I tried, It would give either a compiler or linker error. The one tricky thing is I must get my custom dashboard class from ds->GetDashboardPacker() because it needs access to a shared status pointer the dashboard updates. How do I get this to work?

Things I have tried:
Dashboard.c & h in project dir
copy h to WPILib folder, overwriting original h
delete my .h
#if trickery (from my c new, else old, and a few other...)
h style trickery (forward declarations, etc...)
restore my h
combine my H and c
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #2   Spotlight this post!  
Unread 18-12-2009, 05:31
rfrank's Avatar
rfrank rfrank is offline
Programmer
AKA: Russell Frank
FRC #0041 (RoboWarriors)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2007
Location: Somerset, New Jersey
Posts: 19
rfrank will become famous soon enough
Re: replace WPILib part

Could you post the compile errors you get?
__________________

FRC 41: RoboWarriors Alumni. www.team41robotics.com Winners of 2008 NY Regional.
Bassist of Obviatus. www.dreamdefined.com Personal site: www.russfrank.us
Reply With Quote
  #3   Spotlight this post!  
Unread 18-12-2009, 15:28
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: replace WPILib part

hmm, I can't seem to get the compiler errors at home, but they were along the lines of
error: 'class Dashboard' has no member named 'Add'
and the linking error was a standard linking error (x was not found,do you want to proceed with launch

when I compile it at home, I also get this warning:
function `void Dashboard::Add(const char*, const char*)' used but never defined
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 21-12-2009, 10:29
rfrank's Avatar
rfrank rfrank is offline
Programmer
AKA: Russell Frank
FRC #0041 (RoboWarriors)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2007
Location: Somerset, New Jersey
Posts: 19
rfrank will become famous soon enough
Re: replace WPILib part

Quote:
Originally Posted by byteit101 View Post
error: 'class Dashboard' has no member named 'Add'
Quote:
Originally Posted by byteit101 View Post
`void Dashboard::Add(const char*, const char*)' used but never defined
Both of these imply that you haven't declared and/or defined this function correctly. The first looks like you tried to define 'Add' without declaring it, and the second looks like you tried to use the function without ever declaring or defining it.

Post your modified WPILib files (.cpp and .h).
__________________

FRC 41: RoboWarriors Alumni. www.team41robotics.com Winners of 2008 NY Regional.
Bassist of Obviatus. www.dreamdefined.com Personal site: www.russfrank.us
Reply With Quote
  #5   Spotlight this post!  
Unread 28-12-2009, 21:37
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: replace WPILib part

Header:
PHP Code:
#ifndef __DASHBOARD_H__
#define __DASHBOARD_H__

#include "ErrorBase.h"
#include "NetworkCommunication/FRCComm.h"

#include <VxWorks.h>
#include <stack>
#include <vector>
using namespace std;
typedef unsigned int uint;
/**
 * Pack data into the "user data" field that gets sent to the dashboard laptop
 * via the driver station.
 */
class Dashboard : public ErrorBase
{
        
// Can only be constructed by the DriverStation class.
        
friend class DriverStation;

    public:
        
        
inline void Add(string namestring value);
        
inline void Add(string nameint value);
        
inline void Add(string namefloat value);
        
inline void Add(string namedouble value);
        
inline void Add(const charnameint value);
        
inline void Add(const charnamefloat value);
        
inline void Add(const charnamedouble value);
        
inline void Add(const charname, const charvalue);

        
void AddDebugVariable(const charname, const charvalue);
        
inline void AddDebugVariable(string namestring value);
        
inline void AddDebugVariable(string nameint value);
        
inline void AddDebugVariable(string namefloat value);
        
inline void AddDebugVariable(string namedouble value);
        
inline void AddDebugVariable(const charnameint value);
        
inline void AddDebugVariable(const charnamefloat value);
        
inline void AddDebugVariable(const charnamedouble value);

        
//AddDebugVariable renamed for convenience
        
inline void var(const charname, const charvalue);
        
inline void var(string namestring value);
        
inline void var(string nameint value);
        
inline void var(string namefloat value);
        
inline void var(string namedouble value);
        
inline void var(const charnameint value);
        
inline void var(const charnamefloat value);
        
inline void var(const charnamedouble value);

        
void AddRaw(const char *rawuint length);

        
INT32 Send();
    private:
        
Dashboard(char **userStatus);
        
virtual ~Dashboard();

        static const 
INT32 kMaxDashboardDataSizeUSER_STATUS_DATA_SIZE sizeof(UINT32) * sizeof(UINT8); // 13 bytes needed for 3 size parameters and the sequence number

        // Usage Guidelines...
        
DISALLOW_COPY_AND_ASSIGN(Dashboard)
        ;

        
int location;
        
char **m_userStatus;
        
char *m_localBuffer;
        
char *raw;
        
uint rawLength;
        
SEM_ID m_printSemaphore;
        
UINT8 m_sequence;
};

#endif 
Source:
PHP Code:
//include my dashboard heade
#include "Dashboard.h"
#include "Synchronized.h"
#include "Utility.h"
#include "WPIStatus.h"
#include <strLib.h>
#include <sstream>

using namespace std;
/**
 * Dashboard constructor.
 * 
 * This is only called once when the DriverStation constructor is called.
 */
Dashboard::Dashboard(char **userStatus):
    
m_userStatus(userStatus), m_localBuffer(NULL), m_printSemaphore(0), m_sequence(0)
{
    
//Syntax: @@@451:|name=value|dbg=name: value|name=value|:451@@@
    
m_localBuffer = new char[kMaxDashboardDataSize 2];
    
    
m_localBuffer[0] = '@';
    
m_localBuffer[1] = '@';
    
m_localBuffer[2] = '@';
    
m_localBuffer[3] = '4';
    
m_localBuffer[4] = '5';
    
m_localBuffer[5] = '1';
    
m_localBuffer[6] = ':';
    
m_localBuffer[7] = '|';
    
m_localBuffer[8] = 0;
    
raw = new char[kMaxDashboardDataSize 2];
    
raw[0]=4;
    
raw[1]=5;
    
raw[2]=1;
    
raw[3]=32;
    
m_printSemaphore semMCreate(SEM_DELETE_SAFE SEM_INVERSION_SAFE); // synchronize access to multi-value registers
}

/**
 * Dashboard destructor.
 * 
 * Called only when the DriverStation class is destroyed.
 */
Dashboard::~Dashboard()
{
    
m_userStatus NULL;
    
delete [] m_localBuffer;
    
m_localBuffer NULL;
}

/**
 * Print a string to the UserData text on the Dashboard.
 * 
 * This will add text to the buffer to send to the dashboard.
 * You must call Finalize() periodically to actually send the buffer to the dashboard if you are not using the packed dashboard data.
 */

void Dashboard::Add(string namestring value)
{
    
this->Add(name.c_str(), value.c_str());
}
void Dashboard::Add(string nameint value)
{
    
stringstream out;
    
out << value;
    
this->Add(name.c_str(), out.str().c_str());
}
//Add clones removed...

void Dashboard::AddDebugVariable(string namestring value)
{
    
this->AddDebugVariable(name.c_str(), value.c_str());
}
void Dashboard::AddDebugVariable(string nameint value)
{
    
stringstream out;
    
out << value;
    
this->AddDebugVariable(name.c_str(), out.str().c_str());
}
//AddDebugVariable clones removed...
//AddDebugVariable renamed for convenience
void Dashboard::var(const charname, const charvalue)
{
    
this->AddDebugVariable(namevalue);
}
void Dashboard::var(string namestring value)
{
    
this->AddDebugVariable(namevalue);
}
//var clones removed...
void Dashboard::AddRaw(const char *rawuint length)
{
    {
        
Synchronized sync(m_printSemaphore);
        
memcpy(this->raw+4rawlength);//keep intact the beginning

        
this->rawLength=length;
    }
    if (
length+(uint)strlen(m_localBuffer) > (uint)kMaxDashboardDataSize)
    {
        
wpi_fatal(DashboardDataOverflow);
    }
    
}
void Dashboard::AddDebugVariable(const charname, const charvalue)
{
    
string fv=name;
    
fv+=": ";
    
fv+=value;
    
this->Add("dbg",fv.c_str());//TEST:this might fail the cast
}
void Dashboard::Add(const charname, const charvalue)
{
    
INT32 size;
    {
        
Synchronized sync(m_printSemaphore);
        
memcpy(m_localBuffer strlen(m_localBuffer), namestrlen(name));
        
m_localBuffer[strlen(m_localBuffer)+1]=0;//keep null to allow strlen to function
        
m_localBuffer[strlen(m_localBuffer)]='=';
        
memcpy(m_localBuffer strlen(m_localBuffer), valuestrlen(value));
        
m_localBuffer[strlen(m_localBuffer)+1]=0;//keep null to allow strlen to function
                
m_localBuffer[strlen(m_localBuffer)]='|';
        
//m_localBuffer + strlen(m_localBuffer), writeFmt, args);
        
size strlen(m_localBuffer);
    }
    if (
size kMaxDashboardDataSize)
    {
        
wpi_fatal(DashboardDataOverflow);
    }
}

/**
 * Indicate that the packing is complete and commit the buffer to the DriverStation.
 * 
 * The packing of the dashboard packet is complete.
 * If you are not using the packed dashboard data, you can call Finalize() to commit the Printf() buffer and the error string buffer.
 * In effect, you are packing an empty structure.
 * Prepares a packet to go to the dashboard...
 * Pack the sequence number, Printf() buffer, the errors messages (not implemented yet), and packed dashboard data buffer.
 * @return The total size of the data packed into the userData field of the status packet.
 */
INT32 Dashboard::Send()
{
    if (*
m_userStatus == NULL)
    {
        
wpi_fatal(NullParameter);
        return 
0;
    }
    
    
INT32 size 0;
    
// QUE: Is this necessary? 
    // Sequence number
    
memcpy(*m_userStatus size, &m_sequencesizeof(m_sequence));
    
size += sizeof(m_sequence);
    
m_sequence++;
    
    
INT32 printSize;
    {
        
//Raw data (images, etc)
        
Synchronized sync(m_printSemaphore);
        
        
memcpy(*m_userStatus size, &rawLengthsizeof(rawLength));
        
size += sizeof(rawLength);
        
memcpy(*m_userStatus sizerawrawLength);
        
size += printSize;
        
//        raw[0]=4;
        //        raw[1]=5;
        //        raw[2]=1;
        //        raw[3]=32;
        //skip this because don't ever overwrite it

        // User printed strings
        
printSize strlen(m_localBuffer);
        
memcpy(*m_userStatus sizem_localBufferprintSize);
        
size += printSize;
        
string end="|:451@@@";
        
memcpy(*m_userStatus sizeend.c_str(), end.length());
                
size += end.length();
        
m_localBuffer[0] = '@';
        
m_localBuffer[1] = '@';
        
m_localBuffer[2] = '@';
        
m_localBuffer[3] = '4';
        
m_localBuffer[4] = '5';
        
m_localBuffer[5] = '1';
        
m_localBuffer[6] = ':';
        
m_localBuffer[7] = '|';
        
m_localBuffer[8] = 0;
    }
    
    return 
size;

main code:
PHP Code:
//...
DriverStation::GetInstance()->ds.GetDashboardPacker().Add("gsgs","fsdfds");
DriverStation::GetInstance()->ds.GetDashboardPacker().Send();
//... 
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #6   Spotlight this post!  
Unread 30-12-2009, 08:40
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: replace WPILib part

I'm just glancing at this quick, but IIRC, inline functions need the function body along with the declaration. You can't give a function prototype in a header, mark it as inline, and then go put the actual definition of the function somewhere else. I could be wrong though.
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 30-12-2009, 11:46
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: replace WPILib part

Quote:
Originally Posted by slavik262 View Post
I'm just glancing at this quick, but IIRC, inline functions need the function body along with the declaration. You can't give a function prototype in a header, mark it as inline, and then go put the actual definition of the function somewhere else. I could be wrong though.
You are somewhat correct:
http://www.parashift.com/c++-faq-lit...s.html#faq-9.7
http://www.parashift.com/c++-faq-lit...s.html#faq-9.8
http://www.parashift.com/c++-faq-lit...s.html#faq-9.9
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #8   Spotlight this post!  
Unread 01-01-2010, 17:40
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: replace WPILib part

Just out of curiosity, why are you making them all inline?
__________________
Reply With Quote
  #9   Spotlight this post!  
Unread 01-01-2010, 18:58
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: replace WPILib part

Quote:
Originally Posted by slavik262 View Post
Just out of curiosity, why are you making them all inline?
the clones are inline to only (hopefully) incur 1 function call, because they are small, and call the main function
normal:
Auto()
> var("x",5)
> > AddDebugVariable("x",5)
> > > AddDebugVariable("x","5")
> > > > Add("dbg","x: 5")

Inline:
Auto()
var("x",5)
AddDebugVariable("x",5)
AddDebugVariable("x","5")
> Add("dbg","x: 5")

Normal makes 4 function calls, Inline only 1
EDIT: I accidentally put inline on void Add(const char* name, const char* value); instead of void AddDebugVariable(const char* name, const char* value);
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 01-01-2010 at 19:02.
Reply With Quote
  #10   Spotlight this post!  
Unread 26-02-2010, 15:19
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: replace WPILib part

I have this issue again on a different file, AxisCamera. I was adding a saving function, and it started doing it. I was editing it, save, compile, add more, etc... and I added one line, and it started doing it, and won't stop. I commented my chages, even completely replaced the files with the default WPILib's, but it does the error now. Rebuilds make no different.
errors:
Code:
Build Started in Project 'Breakaway':   2010-02-26 15:17:08
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.3
Command: make --no-print-directory BUILD_SPEC=PPC603gnu DEBUG_MODE=1 TRACE=1
Working Directory: C:/WindRiver/workspace/Breakaway/PPC603gnu
if [ ! -d "`dirname "Breakaway_partialImage/Debug/Objects/Breakaway/AxisCamera.o"`" ]; then mkdir -p "`dirname "Breakaway_partialImage/Debug/Objects/Breakaway/AxisCamera.o"`"; fi;echo "building Breakaway_partialImage/Debug/Objects/Breakaway/AxisCamera.o"; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -ansi -Wall  -MD -MP -mlongcall  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/WPILib -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL    -o "Breakaway_partialImage/Debug/Objects/Breakaway/AxisCamera.o" -c "C:/WindRiver/workspace/Breakaway/AxisCamera.cpp"
building Breakaway_partialImage/Debug/Objects/Breakaway/AxisCamera.o
if [ ! -d "`dirname "Breakaway_partialImage/Debug/Objects/Breakaway/Main.o"`" ]; then mkdir -p "`dirname "Breakaway_partialImage/Debug/Objects/Breakaway/Main.o"`"; fi;echo "building Breakaway_partialImage/Debug/Objects/Breakaway/Main.o"; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -ansi -Wall  -MD -MP -mlongcall  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/WPILib -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL    -o "Breakaway_partialImage/Debug/Objects/Breakaway/Main.o" -c "C:/WindRiver/workspace/Breakaway/Main.cpp"
building Breakaway_partialImage/Debug/Objects/Breakaway/Main.o
if [ ! -d "`dirname "Breakaway_partialImage/Debug/Objects/Breakaway/PCVideoServer.o"`" ]; then mkdir -p "`dirname "Breakaway_partialImage/Debug/Objects/Breakaway/PCVideoServer.o"`"; fi;echo "building Breakaway_partialImage/Debug/Objects/Breakaway/PCVideoServer.o"; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -ansi -Wall  -MD -MP -mlongcall  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/WPILib -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL    -o "Breakaway_partialImage/Debug/Objects/Breakaway/PCVideoServer.o" -c "C:/WindRiver/workspace/Breakaway/PCVideoServer.cpp"
building Breakaway_partialImage/Debug/Objects/Breakaway/PCVideoServer.o
if [ ! -d "`dirname "Breakaway_partialImage/Debug/Breakaway_partialImage.o"`" ]; then mkdir -p "`dirname "Breakaway_partialImage/Debug/Breakaway_partialImage.o"`"; fi;echo "building Breakaway_partialImage/Debug/Breakaway_partialImage.o"; ccppc -r -nostdlib -Wl,-X  -o "Breakaway_partialImage/Debug/Breakaway_partialImage.o" Breakaway_partialImage/Debug/Objects/Breakaway/Array.o Breakaway_partialImage/Debug/Objects/Breakaway/AxisCamera.o Breakaway_partialImage/Debug/Objects/Breakaway/BTR.o Breakaway_partialImage/Debug/Objects/Breakaway/Main.o Breakaway_partialImage/Debug/Objects/Breakaway/Mechs.o Breakaway_partialImage/Debug/Objects/Breakaway/PCVideoServer.o Breakaway_partialImage/Debug/Objects/Breakaway/Ptr.o Breakaway_partialImage/Debug/Objects/Breakaway/ZDashboard.o      && if [ "0" = "1" ]; then plink "Breakaway_partialImage/Debug/Breakaway_partialImage.o";fi
building Breakaway_partialImage/Debug/Breakaway_partialImage.o
if [ ! -d "`dirname "Breakaway/Debug/Breakaway.out"`" ]; then mkdir -p "`dirname "Breakaway/Debug/Breakaway.out"`"; fi;echo "building Breakaway/Debug/Breakaway.out";rm -f "Breakaway/Debug/Breakaway.out";nmppc Breakaway_partialImage/Debug/Breakaway_partialImage.o C:/WindRiver/vxworks-6.3/target/lib/WPILib.a  | tclsh C:/WindRiver/vxworks-6.3/host/resource/hutils/tcl/munch.tcl -c ppc > Breakaway/Debug/ctdt.c; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -fdollars-in-identifiers -Wall  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/WPILib -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL     -o Breakaway/Debug/ctdt.o -c Breakaway/Debug/ctdt.c; ccppc -r -nostdlib -Wl,-X -T C:/WindRiver/vxworks-6.3/target/h/tool/gnu/ldscripts/link.OUT -o "Breakaway/Debug/Breakaway.out" Breakaway/Debug/ctdt.o Breakaway_partialImage/Debug/Breakaway_partialImage.o C:/WindRiver/vxworks-6.3/target/lib/WPILib.a       && if [ "0" = "1" ]; then plink "Breakaway/Debug/Breakaway.out";fi
building Breakaway/Debug/Breakaway.out
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.bss+0x0):C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:25: multiple definition of `AxisCamera::m_instance'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.bss+0x4):C:/WindRiver/workspace/Breakaway/Array.cpp:2: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1a7c): In function `AxisCamera::s_ImageStreamTaskFunction(AxisCamera*)':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:183: multiple definition of `AxisCamera::s_ImageStreamTaskFunction(AxisCamera*)'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x1e2c):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:185: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x5b0): In function `AxisCamera::~AxisCamera()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:43: multiple definition of `AxisCamera::~AxisCamera()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x7f4):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:45: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCamera::~AxisCamera()' changed from 992 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 884 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x924): In function `AxisCamera::~AxisCamera()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:43: multiple definition of `AxisCamera::~AxisCamera()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0xbd4):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:45: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCamera::~AxisCamera()' changed from 992 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 884 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0xc98): In function `AxisCamera::~AxisCamera()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:43: multiple definition of `AxisCamera::~AxisCamera()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0xfb4):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:45: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCamera::~AxisCamera()' changed from 992 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 884 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x11f4): In function `AxisCamera::DeleteInstance()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:78: multiple definition of `AxisCamera::DeleteInstance()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x15a0):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:80: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1258): In function `AxisCamera::IsFreshImage()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:87: multiple definition of `AxisCamera::IsFreshImage()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x1604):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:89: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1288): In function `AxisCamera::GetNewImageSem()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:100: multiple definition of `AxisCamera::GetNewImageSem()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x1634):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:102: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x130c): In function `AxisCamera::GetImage(Image_struct*)':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:113: multiple definition of `AxisCamera::GetImage(Image_struct*)'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x16b8):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:115: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1520): In function `AxisCamera::GetImage()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:140: multiple definition of `AxisCamera::GetImage()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x18cc):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:142: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCamera::GetImage()' changed from 356 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 352 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1680): In function `AxisCamera::CopyJPEG(char**, int&, int&)':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:157: multiple definition of `AxisCamera::CopyJPEG(char**, int&, int&)'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x1a30):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:159: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1ac8): In function `AxisCamera::ImageStreamTaskFunction()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:193: multiple definition of `AxisCamera::ImageStreamTaskFunction()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x1e78):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:195: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1b50): In function `AxisCamera::ReadImagesFromCamera()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:218: multiple definition of `AxisCamera::ReadImagesFromCamera()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x1f00):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:220: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x1e90): In function `AxisCamera::UpdatePublicImageFromCamera(char*, int)':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:301: multiple definition of `AxisCamera::UpdatePublicImageFromCamera(char*, int)'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2240):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:303: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x21b0): In function `AxisCamera::RestartCameraTask()':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:336: multiple definition of `AxisCamera::RestartCameraTask()'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2560):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:338: first defined here
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x224c): In function `AxisCameraStart':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:346: multiple definition of `AxisCameraStart'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x25fc):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:348: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraStart' changed from 72 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 60 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2288): In function `AxisCameraGetImage':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:351: multiple definition of `AxisCameraGetImage'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2644):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:353: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetImage' changed from 112 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 100 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x22ec): In function `AxisCameraWriteBrightness':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:356: multiple definition of `AxisCameraWriteBrightness'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x26b4):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:358: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteBrightness' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2348): In function `AxisCameraGetBrightness':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:361: multiple definition of `AxisCameraGetBrightness'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x271c):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:363: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetBrightness' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x23a4): In function `AxisCameraWriteWhiteBalance':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:366: multiple definition of `AxisCameraWriteWhiteBalance'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2784):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:368: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteWhiteBalance' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2400): In function `AxisCameraGetWhiteBalance':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:371: multiple definition of `AxisCameraGetWhiteBalance'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x27ec):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:373: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetWhiteBalance' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x245c): In function `AxisCameraWriteColorLevel':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:376: multiple definition of `AxisCameraWriteColorLevel'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2854):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:378: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteColorLevel' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x24b8): In function `AxisCameraGetColorLevel':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:381: multiple definition of `AxisCameraGetColorLevel'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x28bc):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:383: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetColorLevel' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2514): In function `AxisCameraWriteExposureControl':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:386: multiple definition of `AxisCameraWriteExposureControl'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2924):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:388: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteExposureControl' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2570): In function `AxisCameraGetExposureControl':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:391: multiple definition of `AxisCameraGetExposureControl'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x298c):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:393: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetExposureControl' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x25cc): In function `AxisCameraWriteExposurePriority':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:396: multiple definition of `AxisCameraWriteExposurePriority'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x29f4):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:398: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteExposurePriority' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2628): In function `AxisCameraGetExposurePriority':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:401: multiple definition of `AxisCameraGetExposurePriority'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2a5c):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:403: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetExposurePriority' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2684): In function `AxisCameraWriteMaxFPS':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:406: multiple definition of `AxisCameraWriteMaxFPS'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2ac4):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:408: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteMaxFPS' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x26e0): In function `AxisCameraGetMaxFPS':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:411: multiple definition of `AxisCameraGetMaxFPS'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2b2c):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:413: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetMaxFPS' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x273c): In function `AxisCameraWriteResolution':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:416: multiple definition of `AxisCameraWriteResolution'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2b94):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:418: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteResolution' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2798): In function `AxisCameraGetResolution':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:421: multiple definition of `AxisCameraGetResolution'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2bfc):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:423: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetResolution' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x27f4): In function `AxisCameraWriteCompression':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:426: multiple definition of `AxisCameraWriteCompression'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2c64):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:428: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteCompression' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2850): In function `AxisCameraGetCompression':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:431: multiple definition of `AxisCameraGetCompression'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2ccc):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:433: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetCompression' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x28ac): In function `AxisCameraWriteRotation':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:436: multiple definition of `AxisCameraWriteRotation'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2d34):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:438: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraWriteRotation' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2908): In function `AxisCameraGetRotation':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:441: multiple definition of `AxisCameraGetRotation'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2d9c):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:443: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraGetRotation' changed from 104 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 92 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x2964): In function `AxisCameraDeleteInstance':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:446: multiple definition of `AxisCameraDeleteInstance'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2e04):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:448: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraDeleteInstance' changed from 96 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 84 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)(.text+0x29b8): In function `AxisCameraFreshImage':
C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp:451: multiple definition of `AxisCameraFreshImage'
Breakaway_partialImage/Debug/Breakaway_partialImage.o(.text+0x2e64):C:/WindRiver/workspace/Breakaway/AxisCamera.cpp:453: first defined here
c:/windriver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../../x86-win32/powerpc-wrs-vxworks/bin/ld.exe: Warning: size of symbol `AxisCameraFreshImage' changed from 112 in Breakaway_partialImage/Debug/Breakaway_partialImage.o to 100 in C:/WindRiver/vxworks-6.3/target/lib/WPILib.a(AxisCamera.o)
collect2: ld returned 256 exit status
make: built targets of C:/WindRiver/workspace/Breakaway/PPC603gnu
Build Finished in Project 'Breakaway':   2010-02-26 15:17:16   (Elapsed Time: 00:08)
Header:
Code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.							  */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
/*----------------------------------------------------------------------------*/

#ifndef __AXIS_CAMERA_H__
#define __AXIS_CAMERA_H__

#include <taskLib.h>
#include <vxWorks.h> 
#include <sockLib.h> 
#include <inetLib.h>

#include "Vision/AxisCameraParams.h"
#include "Vision/ColorImage.h"
#include "Vision/HSLImage.h"
#include "nivision.h"
#include <set>
#include "Task.h"

/**
 * AxisCamera class.
 * This class handles everything about the Axis 206 FRC Camera.
 * It starts up 2 tasks each using a different connection to the camera:
 * - image reading task that reads images repeatedly from the camera
 * - parameter handler task in the base class that monitors for changes to
 *     parameters and updates the camera
 */
class AxisCamera: public AxisCameraParams
{
	AxisCamera(const char *cameraIP = "192.168.0.90",bool filesave=false, const char *fpath="img/");
public:
	virtual ~AxisCamera();
	static AxisCamera& GetInstance(bool filesave=false, const char *fpath="img/");
	void DeleteInstance();

	bool IsFreshImage();
	SEM_ID GetNewImageSem();

	int GetImage(Image *imaqImage);
	int GetImage(ImageBase *image);
	ImageBase *GetImage();
	//Image *GetimaqImage();

	int CopyJPEG(char **destImage, int &destImageSize, int &destImageBufferSize);

private:
	static int s_ImageStreamTaskFunction(AxisCamera *thisPtr);
	int ImageStreamTaskFunction();

	int ReadImagesFromCamera();
	void UpdatePublicImageFromCamera(char *imgBuffer, int imgSize);

	virtual void RestartCameraTask();
	static int s_SaveImageFunction(AxisCamera *thisPtr);
	int SaveImageFunction();

	static AxisCamera *m_instance;
	int m_cameraSocket;
	typedef std::set<SEM_ID> SemSet_t;
	SemSet_t m_newImageSemSet;

	char* m_protectedImageBuffer;
	int m_protectedImageBufferLength;
	int m_protectedImageSize;
	SEM_ID m_protectedImageSem;
	bool m_freshImage;

	Task m_imageStreamTask;
	Task m_imageSaveTask;
	const char *fpathSave;
};

extern "C" {
	void AxisCameraStart();
	int AxisCameraGetImage(Image *image);
	void AxisCameraDeleteInstance();
	int AxisCameraFreshImage();

	// Mid-stream gets & writes
	void AxisCameraWriteBrightness(int brightness);
	int AxisCameraGetBrightness();
	void AxisCameraWriteWhiteBalance(AxisCameraParams::WhiteBalance_t whiteBalance);
	AxisCameraParams::WhiteBalance_t AxisCameraGetWhiteBalance();
	void AxisCameraWriteColorLevel(int colorLevel);
	int AxisCameraGetColorLevel();
	void AxisCameraWriteExposureControl(AxisCameraParams::Exposure_t exposure);
	AxisCameraParams::Exposure_t AxisCameraGetExposureControl();
	void AxisCameraWriteExposurePriority(int exposurePriority);
	int AxisCameraGetExposurePriority();
	void AxisCameraWriteMaxFPS(int maxFPS);
	int AxisCameraGetMaxFPS();

	// New-Stream gets & writes
	void AxisCameraWriteResolution(AxisCameraParams::Resolution_t resolution);
	AxisCameraParams::Resolution_t AxisCameraGetResolution();
	void AxisCameraWriteCompression(int compression);
	int AxisCameraGetCompression();
	void AxisCameraWriteRotation(AxisCameraParams::Rotation_t rotation);
	AxisCameraParams::Rotation_t AxisCameraGetRotation();
}

#endif
Source (cpp):
Code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.							  */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
/*----------------------------------------------------------------------------*/

#include <string.h>
#include "Synchronized.h"
#include "AxisCamera.h"
#include "PCVideoServer.h"

/** Private NI function to decode JPEG */ 
IMAQ_FUNC int Priv_ReadJPEGString_C(Image* _image, const unsigned char* _string, UINT32 _stringLength); 

// Max packet without jumbo frames is 1500... add 36 because??
#define kMaxPacketSize 1536
#define kImageBufferAllocationIncrement 1000

AxisCamera* AxisCamera::m_instance = NULL;

/**
 * AxisCamera constructor
 */
AxisCamera::AxisCamera(const char *ipAddress,bool filesave, const char *fpath)
	: AxisCameraParams(ipAddress)
	, m_cameraSocket (0)
	, m_protectedImageBuffer(NULL)
	, m_protectedImageBufferLength (0)
	, m_protectedImageSize (0)
	, m_protectedImageSem (NULL)
	, m_freshImage (false)
, m_imageStreamTask("cameraTask", (FUNCPTR)s_ImageStreamTaskFunction)
, m_imageSaveTask("cameraSaveTask", (FUNCPTR)s_SaveImageFunction)
{
	m_protectedImageSem = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE);

	m_imageStreamTask.Start((int)this);
	//fpathSave=fpath;
}

/**
 * Destructor
 */
AxisCamera::~AxisCamera()
{
	m_imageStreamTask.Stop();
	close(m_cameraSocket);

	SemSet_t::iterator it = m_newImageSemSet.begin();
	SemSet_t::iterator end = m_newImageSemSet.end();
	for (;it != end; it++)
	{
		semDelete(*it);
	}
	m_newImageSemSet.clear();

	semDelete(m_protectedImageSem);
	m_instance = NULL;
}

/**
 * Get a pointer to the AxisCamera object, if the object does not exist, create it
 * @return reference to AxisCamera object
 */
AxisCamera& AxisCamera::GetInstance(bool filesave, const char *fpath)
{
	if (NULL == m_instance) {
		// Since this is a singleton for now, just use the default IP address.
		m_instance = new AxisCamera("192.168.0.90",filesave,fpath);
		// TODO: Keep track of this so it can be shut down!
		new PCVideoServer();
	}
	return *m_instance;
}

/**
 * Called by Java to delete the camera... how thoughtful
 */
void AxisCamera::DeleteInstance()
{
	delete m_instance;
}

/**
 * Return true if the latest image from the camera has not been retrieved by calling GetImage() yet.
 * @return true if the image has not been retrieved yet.
 */
bool AxisCamera::IsFreshImage()
{
	return m_freshImage;
}

/**
 * Get the semaphore to be used to synchronize image access with camera acquisition
 * 
 * Call semTake on the returned semaphore to block until a new image is acquired.
 * 
 * The semaphore is owned by the AxisCamera class and will be deleted when the class is destroyed.
 * @return A semaphore to notify when new image is received
 */
SEM_ID AxisCamera::GetNewImageSem()
{
	SEM_ID sem = semBCreate (SEM_Q_PRIORITY, SEM_EMPTY);
	m_newImageSemSet.insert(sem);
	return sem;
}

/**
 * Get an image from the camera and store it in the provided image.
 * @param image The imaq image to store the result in. This must be an HSL or RGB image
 * This function is called by Java.
 * @return 1 upon success, zero on a failure
 */
int AxisCamera::GetImage(Image* imaqImage)
{
	if (m_protectedImageBuffer == NULL)
		return 0;
	Synchronized sync(m_protectedImageSem);
	Priv_ReadJPEGString_C(imaqImage,
		(unsigned char*)m_protectedImageBuffer, m_protectedImageSize);
	m_freshImage = false;
	return 1;
}

/**
 * Get an image from the camera and store it in the provided image.
 * @param image The image to store the result in. This must be an HSL or RGB image
 * @return 1 upon success, zero on a failure
 */
int AxisCamera::GetImage(ImageBase* image)
{
	return GetImage(image->GetImaqImage());
}

/**
 * Instantiate a new image object and fill it with the latest image from the camera.
 * 
 * The returned pointer is owned by the caller and is their responsibility to delete.
 * @return a pointer to an HSLImage object
 */
ImageBase* AxisCamera::GetImage()
{
    ImageBase *image = new ImageBase(IMAQ_IMAGE_RGB);
	GetImage(image);
	return image;
}

/**
 * Copy an image into an existing buffer.
 * This copies an image into an existing buffer rather than creating a new image
 * in memory. That way a new image is only allocated when the image being copied is
 * larger than the destination.
 * This method is called by the PCVideoServer class.
 * @param imageData The destination image.
 * @param numBytes The size of the destination image.
 * @return 0 if failed (no source image or no memory), 1 if success.
 */
int AxisCamera::CopyJPEG(char **destImage, int &destImageSize, int &destImageBufferSize)
{
	Synchronized sync(m_protectedImageSem);
	wpi_assert(destImage != NULL);
	if (m_protectedImageBuffer == NULL) return 0; // if no source image
	if (destImageBufferSize < m_protectedImageSize) // if current destination buffer too small
	{
		if (*destImage != NULL) delete [] *destImage;
		destImageBufferSize = m_protectedImageSize + kImageBufferAllocationIncrement;
		*destImage = new char[destImageBufferSize];
		if (*destImage == NULL) return 0;
	}
	// copy this image into destination buffer
	wpi_assert(*destImage != NULL);
	wpi_assert(m_protectedImageBuffer != NULL);
	wpi_assert(m_protectedImageSize > 0);
	// TODO: Is this copy realy necessary... perhaps we can simply transmit while holding the protected buffer
	memcpy(*destImage, m_protectedImageBuffer, m_protectedImageSize);
	destImageSize = m_protectedImageSize;
	return 1;
}

/**
 * Static interface that will cause an instantiation if necessary.
 * This static stub is directly spawned as a task to read images from the camera.
 */
int AxisCamera::s_ImageStreamTaskFunction(AxisCamera *thisPtr)
{
	return thisPtr->ImageStreamTaskFunction();
}

/**
 * Task spawned by AxisCamera constructor to receive images from cam
 * If setNewImageSem has been called, this function does a semGive on each new image
 * Images can be accessed by calling getImage()
 */
int AxisCamera::ImageStreamTaskFunction()
{
	// Loop on trying to setup the camera connection. This happens in a background
	// thread so it shouldn't effect the operation of user programs.
	while (1)
	{
		char * requestString = "GET /mjpg/video.mjpg HTTP/1.1\n\
User-Agent: HTTPStreamClient\n\
Connection: Keep-Alive\n\
Cache-Control: no-cache\n\
Authorization: Basic RlJDOkZSQw==\n\n";
		m_cameraSocket = CreateCameraSocket(requestString);
		if (m_cameraSocket == 0)
		{
			// Don't hammer the camera if it isn't ready.
			taskDelay(1000);
			continue;
		}
		ReadImagesFromCamera();
	}
}

/**
 * This function actually reads the images from the camera.
 */
int AxisCamera::ReadImagesFromCamera()
{
	char *imgBuffer = NULL;
	int imgBufferLength = 0;
	//Infinite loop, task deletion handled by taskDeleteHook
	// Socket cleanup handled by destructor
	
	// TODO: these recv calls must be non-blocking. Otherwise if the camera
	// fails during a read, the code hangs and never retries when the camera comes
	// back up.

	int counter = 2;
	while (1)
	{
		char initialReadBuffer[kMaxPacketSize] = "";
		char intermediateBuffer[1];
		char *trailingPtr = initialReadBuffer;
		int trailingCounter = 0;
		while (counter)
		{
			// TODO: fix me... this cannot be the most efficient way to approach this, reading one byte at a time.
			if(recv(m_cameraSocket, intermediateBuffer, 1, 0) == ERROR)
			{
				perror ("AxisCamera: Failed to read image header");
				close (m_cameraSocket);
				return (ERROR);
			}
			strncat(initialReadBuffer, intermediateBuffer, 1);
			// trailingCounter ensures that we start looking for the 4 byte string after
			// there is at least 4 bytes total. Kind of obscure.
			// look for 2 blank lines (\r\n)
			if (NULL != strstr(trailingPtr, "\r\n\r\n"))
			{
				--counter;
			}
			if (++trailingCounter >= 4)
			{
				trailingPtr++;
			}
		}
		counter = 1;
		char *contentLength = strstr(initialReadBuffer, "Content-Length: ");
		if (contentLength == NULL)
		{
			perror("AxisCamera: No content-length token found in packet");
			close(m_cameraSocket);
			return(ERROR);
		}
		contentLength = contentLength + 16; // skip past "content length"
		int readLength = atol(contentLength); // get the image byte count

		// Make sure buffer is large enough
		if (imgBufferLength < readLength)
		{
			if (imgBuffer) delete[] imgBuffer;
			imgBufferLength = readLength + kImageBufferAllocationIncrement;
			imgBuffer = new char[imgBufferLength];
			if (imgBuffer == NULL)
			{
				imgBufferLength = 0;
				continue;
			}
		}

		// Read the image data for "Content-Length" bytes
		int bytesRead = 0;
		int remaining = readLength;
		while(bytesRead < readLength)
		{
			int bytesThisRecv = recv(m_cameraSocket, &imgBuffer[bytesRead], remaining, 0);
			bytesRead += bytesThisRecv;
			remaining -= bytesThisRecv;
		}
		// Update image
		UpdatePublicImageFromCamera(imgBuffer, readLength);
	}
}

/**
 * Copy the image from private buffer to shared buffer.
 * @param imgBuffer The buffer containing the image
 * @param bufLength The length of the image
 */
void AxisCamera::UpdatePublicImageFromCamera(char *imgBuffer, int imgSize)
{
	{
		Synchronized sync(m_protectedImageSem);

		// Adjust the buffer size if current destination buffer is too small.
		if (m_protectedImageBufferLength < imgSize)
		{
			if (m_protectedImageBuffer != NULL) delete [] m_protectedImageBuffer;
			m_protectedImageBufferLength = imgSize + kImageBufferAllocationIncrement;
			m_protectedImageBuffer = new char[m_protectedImageBufferLength];
			if (m_protectedImageBuffer == NULL)
			{
				m_protectedImageBufferLength = 0;
				return;
			}
		}

		memcpy(m_protectedImageBuffer, imgBuffer, imgSize);
		m_protectedImageSize = imgSize;
	}

	m_freshImage = true;
	// Notify everyone who is interested.
	SemSet_t::iterator it = m_newImageSemSet.begin();
	SemSet_t::iterator end = m_newImageSemSet.end();
	for (;it != end; it++)
	{
		semGive(*it);
	}
}

/**
 * Implement the pure virtual interface so that when parameter changes require a restart, the image task can be bounced.
 */
void AxisCamera::RestartCameraTask()
{
	m_imageStreamTask.Stop();
	m_imageStreamTask.Start((int)this);
}


// C bindings used by Java
// These need to stay as is or Java has to change

void AxisCameraStart()
{
	AxisCamera::GetInstance();
}

int AxisCameraGetImage (Image* image)
{
	return AxisCamera::GetInstance().GetImage(image);
}

void AxisCameraWriteBrightness(int brightness)
{
	AxisCamera::GetInstance().WriteBrightness(brightness);
}

int AxisCameraGetBrightness()
{
	return AxisCamera::GetInstance().GetBrightness();
}

void AxisCameraWriteWhiteBalance(AxisCameraParams::WhiteBalance_t whiteBalance)
{
	AxisCamera::GetInstance().WriteWhiteBalance(whiteBalance);
}

AxisCameraParams::WhiteBalance_t AxisCameraGetWhiteBalance()
{
	return AxisCamera::GetInstance().GetWhiteBalance();
}

void AxisCameraWriteColorLevel(int colorLevel)
{
	AxisCamera::GetInstance().WriteColorLevel(colorLevel);
}

int AxisCameraGetColorLevel()
{
	return AxisCamera::GetInstance().GetColorLevel();
}

void AxisCameraWriteExposureControl(AxisCameraParams::Exposure_t exposure)
{
	AxisCamera::GetInstance().WriteExposureControl(exposure);
}

AxisCameraParams::Exposure_t AxisCameraGetExposureControl()
{
	return AxisCamera::GetInstance().GetExposureControl();
}

void AxisCameraWriteExposurePriority(int exposure)
{
	AxisCamera::GetInstance().WriteExposurePriority(exposure);
}

int AxisCameraGetExposurePriority()
{
	return AxisCamera::GetInstance().GetExposurePriority();
}

void AxisCameraWriteMaxFPS(int maxFPS)
{
	AxisCamera::GetInstance().WriteMaxFPS(maxFPS);
}

int AxisCameraGetMaxFPS()
{
	return AxisCamera::GetInstance().GetMaxFPS();
}

void AxisCameraWriteResolution(AxisCameraParams::Resolution_t resolution)
{
	AxisCamera::GetInstance().WriteResolution(resolution);
}

AxisCameraParams::Resolution_t AxisCameraGetResolution()
{
	return AxisCamera::GetInstance().GetResolution();
}

void AxisCameraWriteCompression(int compression)
{
	AxisCamera::GetInstance().WriteCompression(compression);
}

int AxisCameraGetCompression()
{
	return AxisCamera::GetInstance().GetCompression();
}

void AxisCameraWriteRotation(AxisCameraParams::Rotation_t rotation)
{
	AxisCamera::GetInstance().WriteRotation(rotation);
}

AxisCameraParams::Rotation_t AxisCameraGetRotation()
{
	return AxisCamera::GetInstance().GetRotation();
}

void AxisCameraDeleteInstance()
{
	AxisCamera::GetInstance().DeleteInstance();
}

int AxisCameraFreshImage()
{
	return AxisCamera::GetInstance().IsFreshImage();
}
Edit: as you can see in the error box, I also have PCVideoServer, but it does not have any errors.
Edit2: Array.cpp is all comments
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 26-02-2010 at 15:23.
Reply With Quote
  #11   Spotlight this post!  
Unread 26-02-2010, 17:54
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: replace WPILib part

try a make clean. the writers of WPILib have been having compiler troubles too apparently and a clean seemed to help it
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #12   Spotlight this post!  
Unread 26-02-2010, 19:52
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: replace WPILib part

rebuild is a clean, build all in one. I tried multiple times, but no luck. I did get it working by commenting out AxisCamera.h in the includes, but this is sub-optimal because it effects all the projects. I have not had any issues with PCVideoServer, although I have not made any changes to the API/H file. I did change the API for AxixCamera, but it compiled for a while before dying
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #13   Spotlight this post!  
Unread 27-02-2010, 17:19
stevethetinker stevethetinker is offline
Registered User
FRC #1288 (RAVEN)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: St. Charles, MO
Posts: 35
stevethetinker is an unknown quantity at this point
Re: replace WPILib part

To answer the original question: when you pull the source for a library file into your project, DON"T DELETE ANYTHING. What happens when you delete something is this: somewhere (doesn't have to be in anything you did) there is likely to be a reference to the thing(s) you delete. The linker notices the references to your new stuff and pulls your new object file in. Then it notices that there is a reference to this something that is satisfied by the original object file in the library and pulls it in too. You get double definitions for the things that appear in both.

The bit about being somewhat correct about inline functions is a dig. It is absolutely correct that you can't just add inline to function declarations - you have to move the body of the function to where it is declared.
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
can we replace the joystick with a steering? mahmosh Technical Discussion 2 25-01-2009 19:08
Could this replace the Segway? Wayne Doenges Chit-Chat 1 01-05-2008 11:01
A warning regarding MPLAB and find/replace Tom Line Programming 0 24-01-2008 17:35
REPLACE VEX with us bill mc gowan General Forum 20 23-03-2006 11:12
Call me Steve Irwin... 'cept replace the crocs with bats... Mini-D67 Chit-Chat 7 14-12-2004 21:52


All times are GMT -5. The time now is 03:28.

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