From: Dominic L. <ma...@us...> - 2005-01-02 14:44:44
|
Update of /cvsroot/robotflow/RobotFlow/Pioneer2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19423/Pioneer2/include Modified Files: PSOSPacket.h Pioneer2Connect.h Pioneer2GripperState.h Pioneer2PacketManager.h Log Message: removing all "using namespace std;" in headers. Bumped version to 0.2.6. Preparing for the RobotFlow namespace. Index: Pioneer2GripperState.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/Pioneer2GripperState.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Pioneer2GripperState.h 1 May 2002 19:22:40 -0000 1.2 --- Pioneer2GripperState.h 2 Jan 2005 14:43:58 -0000 1.3 *************** *** 27,41 **** //overload Object::printOn() ! virtual void printOn( ostream &out = cout ) const { ! out << "<TP2GripperState " << endl ! << "<LIFT_FULLY_UP_OR_DOWN " << m_bLiftFullyUpOrDown << ">" << endl ! << "<LIFT_MOVING " << m_bLiftMoving << ">" << endl ! << "<PADDLES_COMPLETELY_OPENED " << m_bPaddlesCompletelyOpened << ">" << endl ! << "<PADDLES_MOVING " << m_bPaddlesMoving << ">" << endl ! << "<RIGHT_PADDLE_PUSHED " << m_bRightPaddlePushed << ">" << endl ! << "<LEFT_PADDLE_PUSHED " << m_bLeftPaddlePushed << ">" << endl ! << "<INNER_BREAKBEAM_CUT " << m_bInnerBreakbeamCut << ">" << endl ! << "<OUTER_BREAKBEAM_CUT " << m_bOuterBreakbeamCut << ">" << " >" << endl; } --- 27,41 ---- //overload Object::printOn() ! virtual void printOn( std::ostream &out = std::cout ) const { ! out << "<TP2GripperState " << std::endl ! << "<LIFT_FULLY_UP_OR_DOWN " << m_bLiftFullyUpOrDown << ">" << std::endl ! << "<LIFT_MOVING " << m_bLiftMoving << ">" << std::endl ! << "<PADDLES_COMPLETELY_OPENED " << m_bPaddlesCompletelyOpened << ">" << std::endl ! << "<PADDLES_MOVING " << m_bPaddlesMoving << ">" << std::endl ! << "<RIGHT_PADDLE_PUSHED " << m_bRightPaddlePushed << ">" << std::endl ! << "<LEFT_PADDLE_PUSHED " << m_bLeftPaddlePushed << ">" << std::endl ! << "<INNER_BREAKBEAM_CUT " << m_bInnerBreakbeamCut << ">" << std::endl ! << "<OUTER_BREAKBEAM_CUT " << m_bOuterBreakbeamCut << ">" << " >" << std::endl; } Index: Pioneer2Connect.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/Pioneer2Connect.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Pioneer2Connect.h 16 Aug 2004 19:20:02 -0000 1.6 --- Pioneer2Connect.h 2 Jan 2005 14:43:58 -0000 1.7 *************** *** 26,30 **** public: ! Pioneer2Connect(string nodeName, ParameterSet params); void calculate(int output_id, int count, Buffer &out); --- 26,30 ---- public: ! Pioneer2Connect(std::string nodeName, ParameterSet params); void calculate(int output_id, int count, Buffer &out); *************** *** 40,44 **** int m_outputConnectID; ! string m_serial_port; bool m_motorEnable; --- 40,44 ---- int m_outputConnectID; ! std::string m_serial_port; bool m_motorEnable; Index: Pioneer2PacketManager.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/Pioneer2PacketManager.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Pioneer2PacketManager.h 16 Aug 2004 19:20:02 -0000 1.5 --- Pioneer2PacketManager.h 2 Jan 2005 14:43:58 -0000 1.6 *************** *** 25,30 **** #include "pseudosem.h" - using namespace std; - // data for all the robots #define P2OS_CYCLETIME_USEC 50000 --- 25,28 ---- *************** *** 72,98 **** unsigned char digout; ! void printOn(ostream &out) const { print(out); } ! void print (ostream &out) const { ! out<<"status : "<<(int)status<<endl; ! out<<"xpos : "<<xpos<<endl; ! out<<"ypos : "<<ypos<<endl; ! out<<"thpos : "<<thpos<<endl; ! out<<"lvel : "<<lvel<<endl; ! out<<"rvel : "<<rvel<<endl; ! out<<"battery : "<<battery<<endl; ! out<<"bumpers : "<<bumpers<<endl; ! out<<"control : "<<control<<endl; ! out<<"ptu : "<<ptu<<endl; for (int i = 0; i < 16; i++) { ! out<<"sonar "<<i<<" : "<<sonars[i]<<endl; } ! out<<"timer : "<<timer<<endl; ! out<<"analog : "<<analog<<endl; ! out<<"digin : "<<(int)digin<<endl; ! out<<"digout : "<<(int)digout<<endl; } --- 70,96 ---- unsigned char digout; ! void printOn(std::ostream &out) const { print(out); } ! void print (std::ostream &out) const { ! out<<"status : "<<(int)status<<std::endl; ! out<<"xpos : "<<xpos<<std::endl; ! out<<"ypos : "<<ypos<<std::endl; ! out<<"thpos : "<<thpos<<std::endl; ! out<<"lvel : "<<lvel<<std::endl; ! out<<"rvel : "<<rvel<<std::endl; ! out<<"battery : "<<battery<<std::endl; ! out<<"bumpers : "<<bumpers<<std::endl; ! out<<"control : "<<control<<std::endl; ! out<<"ptu : "<<ptu<<std::endl; for (int i = 0; i < 16; i++) { ! out<<"sonar "<<i<<" : "<<sonars[i]<<std::endl; } ! out<<"timer : "<<timer<<std::endl; ! out<<"analog : "<<analog<<std::endl; ! out<<"digin : "<<(int)digin<<std::endl; ! out<<"digout : "<<(int)digout<<std::endl; } *************** *** 110,114 **** Pioneer2PacketManager(); virtual ~Pioneer2PacketManager(); ! void initialize(const string &tty); //input accessors --- 108,112 ---- Pioneer2PacketManager(); virtual ~Pioneer2PacketManager(); ! void initialize(const std::string &tty); //input accessors *************** *** 140,144 **** void send_heading_command(short command); void send_rel_heading_command(short command); ! void send_say_command(const string &command); void send_config_command(short command); void send_encoder_command(short command); --- 138,142 ---- void send_heading_command(short command); void send_rel_heading_command(short command); ! void send_say_command(const std::string &command); void send_config_command(short command); void send_encoder_command(short command); *************** *** 156,160 **** void send_gripper_val_command(short command); void send_ptupos_command(short command); ! void send_tty2_command(const string& data); void send_tty2_command(const unsigned char* data, int size); void send_getaux_command(short command); --- 154,158 ---- void send_gripper_val_command(short command); void send_ptupos_command(short command); ! void send_tty2_command(const std::string& data); void send_tty2_command(const unsigned char* data, int size); void send_getaux_command(short command); *************** *** 208,214 **** void send_signed_int_command(unsigned char command, short value); void send_noarg_command(unsigned char command); ! void send_string_command(unsigned char command, const string& data); void send_unsigned_char_command(unsigned char command, const unsigned char* data, int size); ! void configure_parameters(const string &robotType, const string &robotSubType); void reinitialize(); --- 206,212 ---- void send_signed_int_command(unsigned char command, short value); void send_noarg_command(unsigned char command); ! void send_string_command(unsigned char command, const std::string& data); void send_unsigned_char_command(unsigned char command, const unsigned char* data, int size); ! void configure_parameters(const std::string &robotType, const std::string &robotSubType); void reinitialize(); *************** *** 225,229 **** int m_file_descriptor; ! list<PSOSPacket> m_send_list; enum {NO_SYNC, AFTER_FIRST_SYNC, AFTER_SECOND_SYNC, READY} m_psos_state; --- 223,227 ---- int m_file_descriptor; ! std::list<PSOSPacket> m_send_list; enum {NO_SYNC, AFTER_FIRST_SYNC, AFTER_SECOND_SYNC, READY} m_psos_state; Index: PSOSPacket.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/PSOSPacket.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PSOSPacket.h 18 Apr 2002 20:18:50 -0000 1.2 --- PSOSPacket.h 2 Jan 2005 14:43:58 -0000 1.3 *************** *** 20,26 **** #include <iostream> - using namespace std; - - class PSOSPacket { --- 20,23 ---- *************** *** 35,39 **** void send_packet(int filedescriptor); void recv_packet(int filedescriptor); ! void print(ostream &out); unsigned char* get_data(){return &m_packet[0];} unsigned char operator[] (int pos); --- 32,36 ---- void send_packet(int filedescriptor); void recv_packet(int filedescriptor); ! void print(std::ostream &out); unsigned char* get_data(){return &m_packet[0];} unsigned char operator[] (int pos); |