Changeset 19847

Show
Ignore:
Timestamp:
03/02/07 11:53:15 (2 years ago)
Author:
patrick
Message:

Updated for VPR 1.1.42.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/ChangeLog

    r19827 r19847  
    11DATE        AUTHOR      CHANGE 
    22----------- ----------- ------------------------------------------------------- 
     3Mar-02-2007 patrick     Updated for VPR 1.1.42. 
    34Feb-20-2007 patrick     Initial Unicode support for gadget::KeyEvent. 
    45                        NEW VERSION: 1.1.24 
  • juggler/trunk/modules/gadgeteer/cluster/ClusterDelta.cpp

    r19729 r19847  
    175175   void ClusterDelta::sendAndClear() 
    176176   { 
    177       vpr::Uint32 bytes_just_sent = 0; 
    178177      if ( !mWriter.getData()->empty() ) 
    179178      { 
    180          mSocketStream->send(*(mWriter.getData()),mWriter.getData()->size(),bytes_just_sent); 
     179         mSocketStream->send(*(mWriter.getData()), mWriter.getData()->size()); 
    181180      } 
    182181      mWriter.mData->clear(); 
     
    185184   void ClusterDelta::getPacket(unsigned num) 
    186185   {                                      // Need to delete the old Object Readers 
    187       vpr::Uint32 bytes_read; 
    188186      syncPacket.clear(); 
    189187      mReader->setCurPos(0); 
    190188      //mSocketStream->readn(syncPacket,SYNC_PACKET_LENGTH,bytes_read); 
    191       mSocketStream->readn(syncPacket,num ,bytes_read); 
     189      mSocketStream->readn(syncPacket,num); 
    192190   } 
    193191   void ClusterDelta::clearIntervals() 
  • juggler/trunk/modules/gadgeteer/cluster/Packets/Header.cpp

    r19729 r19847  
    6464         try 
    6565         { 
    66             stream->readn( mData, Header::RIM_PACKET_HEAD_SIZE, bytes_read ); 
     66            bytes_read = stream->readn(mData, Header::RIM_PACKET_HEAD_SIZE); 
    6767         } 
    6868         catch (vpr::IOException& ex) 
     
    173173 
    174174      // -Send the data in this packet 
    175       vpr::Uint32 bytes_written; 
    176        
    177175      try 
    178176      { 
    179          socket->send( mData, RIM_PACKET_HEAD_SIZE, bytes_written ); 
     177         socket->send(mData, RIM_PACKET_HEAD_SIZE); 
    180178      } 
    181179      catch (vpr::IOException&) 
  • juggler/trunk/modules/gadgeteer/configure.ac

    r19745 r19847  
    160160# Checks for libraries. 
    161161# ----------------------------------------------------------------------------- 
    162 MIN_VPR_VERSION='1.1.35
     162MIN_VPR_VERSION='1.1.42
    163163VPR_PATH([$MIN_VPR_VERSION], , 
    164164         [AC_MSG_ERROR([*** VPR required for Gadgeteer ***])]) 
  • juggler/trunk/modules/gadgeteer/drivers/5DT/DataGlove/DataGloveStandalone.cpp

    r19729 r19847  
    110110   unsigned char buf[10];   // Define buffer 
    111111   unsigned char packet[10];   // Define packet 
    112    vpr::Uint32 written; 
    113  
    114    mPort->read(buf, 1, written); 
     112 
     113   mPort->read(buf, 1); 
    115114   while(buf[0]!=0x80) // Read data untill read the header. 
    116115   { 
    117       mPort->read(buf, 1, written); 
     116      mPort->read(buf, 1); 
    118117   } 
    119118   // If read the start buffer, read the rest 9 data. 
    120    mPort->read(&packet, 9, written); 
     119   mPort->read(&packet, 9); 
    121120    
    122121   /////////////////////////////////////////////////////  
     
    171170   //char buf[BUFFER_LEN]; 
    172171   //int cnt; 
    173    //vpr::Uint32 written; 
    174172 
    175173   // Create new serial port 
  • juggler/trunk/modules/gadgeteer/drivers/ART/DTrack/DTrackStandalone.cpp

    r19523 r19847  
    254254                try 
    255255                { 
    256                         d_udpsock->recvfrom((void *)d_udpbuf, d_udpbufsize - 1, 
    257                                             addr, len, d_udptimeout); 
     256                        len = d_udpsock->recvfrom((void *)d_udpbuf, d_udpbufsize - 1, 
     257                                                 addr, d_udptimeout); 
    258258                } 
    259259                catch (vpr::TimeoutException&) 
     
    627627{ 
    628628   std::ostringstream cmd_stream; 
    629         vpr::Uint32 bytes; 
    630  
    631629        if(!valid()){ 
    632630                return false; 
     
    673671        { 
    674672                d_udpsock->sendto(cmd_stream.str(), cmd_stream.str().length(), 
    675                                   d_remote, bytes, d_udptimeout); 
     673                                  d_remote, d_udptimeout); 
    676674        } 
    677675        catch (vpr::IOException&) 
  • juggler/trunk/modules/gadgeteer/drivers/Ascension/Flock/FlockStandalone.cpp

    r19729 r19847  
    458458               try 
    459459               { 
    460                   mSerialPort->read(temp_data_record, bytes_remaining, 
    461                                     bytes_read, mReadTimeout); 
     460                  bytes_read = mSerialPort->read(temp_data_record, 
     461                                                 bytes_remaining, 
     462                                                 mReadTimeout); 
    462463                  // Append the temp data onto the end of the data record 
    463464                  data_record.insert(data_record.end(), temp_data_record.begin(), 
     
    511512            do 
    512513            { 
    513                mSerialPort->read(&buffer, 1, bytes_read, mReadTimeout); 
    514                if(1 != bytes_read
     514               bytes_read = mSerialPort->read(&buffer, 1, mReadTimeout); 
     515               if ( 1 != bytes_read
    515516               { 
    516517                  throw Flock::CommandFailureException( 
     
    529530               try 
    530531               { 
    531                   mSerialPort->read(temp_data_record, bytes_remaining, 
    532                                     bytes_read, mReadTimeout); 
     532                  bytes_read = mSerialPort->read(temp_data_record, 
     533                                                 bytes_remaining, 
     534                                                 mReadTimeout); 
    533535                  // Append the temp data onto the end of the data record 
    534536                  data_record.insert(data_record.end(), temp_data_record.begin(), 
     
    13411343   } 
    13421344 
    1343    unsigned int bytes_written; 
    1344     
    13451345   try 
    13461346   { 
    1347       mSerialPort->write(&cmd, 1, bytes_written); 
     1347      mSerialPort->write(&cmd, 1); 
    13481348   } 
    13491349   catch (vpr::IOException&) 
     
    13581358      try 
    13591359      { 
    1360          mSerialPort->write(&(data[0]), data.size(), bytes_written); 
     1360         mSerialPort->write(&(data[0]), data.size()); 
    13611361      } 
    13621362      catch (vpr::IOException&) 
     
    14371437   exam_cmd[1] = attrib; 
    14381438   vpr::Uint32 bytes_written; 
    1439    vpr::Uint32 bytes_read; 
    14401439 
    14411440   if ( NULL == mSerialPort ) 
     
    14601459 
    14611460   // Send command 
    1462    mSerialPort->write(exam_cmd, 2, bytes_written); 
     1461   bytes_written = mSerialPort->write(exam_cmd, 2); 
    14631462   vprASSERT(2 == bytes_written); 
    14641463   mSerialPort->drainOutput(); 
     
    14741473   // Read response and then flush the port to make sure we don't leave 
    14751474   // anything extra. 
    1476    mSerialPort->readn(respData, respSize, bytes_read); 
     1475   vpr::Uint32 bytes_read = mSerialPort->readn(respData, respSize); 
    14771476   mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    14781477 
     
    15091508 
    15101509   // Send command 
    1511    mSerialPort->write(change_cmd, 2, bytes_written); 
     1510   bytes_written = mSerialPort->write(change_cmd, 2); 
    15121511   if(bytes_written != sizeof(change_cmd)) 
    15131512   { 
     
    15191518   if(!attribData.empty()) 
    15201519   { 
    1521       mSerialPort->write(attribData, attribData.size(), bytes_written); 
     1520      bytes_written = mSerialPort->write(attribData, attribData.size()); 
    15221521      if(bytes_written != attribData.size()) 
    15231522      { 
  • juggler/trunk/modules/gadgeteer/drivers/Ascension/MotionStar/MotionStarStandalone.cpp

    r19803 r19847  
    20402040   try 
    20412041   { 
    2042       m_socket->send(packet, packetSize, bytes); 
     2042      bytes = m_socket->send(packet, packetSize); 
    20432043   } 
    20442044   // An error occurred while trying to send the packet. 
     
    20882088   try 
    20892089   { 
    2090       m_socket->recvn(packet, packetSize, bytes); 
     2090      bytes = m_socket->recvn(packet, packetSize); 
    20912091   } 
    20922092   // An error occurred while trying to receive the packet. 
  • juggler/trunk/modules/gadgeteer/drivers/Ascension/Wanda/WandaStandalone.cpp

    r19729 r19847  
    144144   // '3'. If that is not the case, then we have a problem. 
    145145   std::vector<vpr::Uint8> buffer(2); 
    146    vpr::Uint32 bytes_read(0); 
    147    mPort->readn(buffer, 2, bytes_read); 
     146   const vpr::Uint32 bytes_read = mPort->readn(buffer, 2); 
    148147 
    149148   if ( bytes_read == 2 ) 
     
    201200      // that case. 
    202201      vpr::Uint8 byte; 
    203       vpr::Uint32 bytes_read; 
    204       mPort->read(&byte, 1, bytes_read, mTimeout); 
     202      mPort->read(&byte, 1, mTimeout); 
    205203      mDataBuffer.push_back(byte); 
    206204   } 
     
    324322{ 
    325323   std::vector<vpr::Uint8> buffer(length); 
    326    vpr::Uint32 bytes_read; 
    327    mPort->read(buffer, length, bytes_read, timeout); 
     324   const vpr::Uint32 bytes_read = mPort->read(buffer, length, timeout); 
    328325 
    329326   for ( vpr::Uint32 i = 0; i < bytes_read; ++i ) 
  • juggler/trunk/modules/gadgeteer/drivers/Elexol/Ether24/Ether24Standalone.cpp

    r19729 r19847  
    140140   // Broadcast command. 
    141141   std::string msg("IO24"); 
    142    vpr::Uint32 bytes_sent; 
    143    socket->sendto(msg, 4, broadcast_addr, bytes_sent); 
     142   socket->sendto(msg, 4, broadcast_addr); 
    144143 
    145144   std::vector<vpr::Uint8> response(12); 
    146145 
    147146   vpr::InetAddr from; 
    148    vpr::Uint32 bytes_read; 
    149147 
    150148   Elexol::device_map_t mac_to_addr_map; 
     
    158156      { 
    159157         vpr::Interval read_timeout(1, vpr::Interval::Sec); 
    160          socket->recvfrom(response, 12, from, bytes_read, read_timeout); 
     158         socket->recvfrom(response, 12, from, read_timeout); 
    161159         vpr::BufferObjectReader reader(&response); 
    162160         std::string cmd_string((char*)reader.readRaw(4)); 
     
    232230      << std::endl << vprDEBUG_FLUSH; 
    233231 
    234    vpr::Uint32 bytes_sent; 
    235    mSocket->sendto(cmd, cmd.size(), mAddress, bytes_sent); 
     232   mSocket->sendto(cmd, cmd.size(), mAddress); 
    236233 
    237234   vpr::InetAddr from; 
    238    vpr::Uint32 bytes_read; 
    239235   std::vector<vpr::Uint8> response(0); 
    240236   vpr::Interval read_timeout(100, vpr::Interval::Msec); 
    241    mSocket->recvfrom(response, cmd.size() + 1, from, bytes_read, read_timeout); 
     237   mSocket->recvfrom(response, cmd.size() + 1, from, read_timeout); 
    242238 
    243239   if (Elexol::Command::Value == command) 
     
    287283      << std::endl << vprDEBUG_FLUSH; 
    288284 
    289    vpr::Uint32 bytes_sent; 
    290    mSocket->sendto(cmd, cmd.size(), mAddress, bytes_sent); 
     285   mSocket->sendto(cmd, cmd.size(), mAddress); 
    291286} 
    292287 
     
    493488   //   << std::endl << vprDEBUG_FLUSH; 
    494489 
    495    vpr::Uint32 bytes_sent; 
    496    mSocket->sendto(read_cmd, 5, mAddress, bytes_sent); 
     490   mSocket->sendto(read_cmd, 5, mAddress); 
    497491 
    498492   vpr::InetAddr from; 
    499    vpr::Uint32 bytes_read; 
    500493   std::vector<vpr::Uint8> response(0); 
    501494 
    502495   vpr::Interval read_timeout(50, vpr::Interval::Msec); 
    503    mSocket->recvfrom(response, 4, from, bytes_read, read_timeout); 
     496   mSocket->recvfrom(response, 4, from, read_timeout); 
    504497 
    505498   if (Elexol::Command::ReadWord != response[0]) 
     
    531524      << write_enable_cmd << "]" << std::endl << vprDEBUG_FLUSH; 
    532525 
    533    vpr::Uint32 bytes_sent; 
    534    mSocket->sendto(write_enable_cmd, 5, mAddress, bytes_sent); 
     526   mSocket->sendto(write_enable_cmd, 5, mAddress); 
    535527} 
    536528 
     
    549541      << write_enable_cmd << "]" << std::endl << vprDEBUG_FLUSH; 
    550542 
    551    vpr::Uint32 bytes_sent; 
    552    mSocket->sendto(write_enable_cmd, 5, mAddress, bytes_sent); 
     543   mSocket->sendto(write_enable_cmd, 5, mAddress); 
    553544} 
    554545 
     
    567558      << write_disable_cmd << "]" << std::endl << vprDEBUG_FLUSH; 
    568559 
    569    vpr::Uint32 bytes_sent; 
    570    mSocket->sendto(write_disable_cmd, 5, mAddress, bytes_sent); 
     560   mSocket->sendto(write_disable_cmd, 5, mAddress); 
    571561} 
    572562 
     
    584574   vprASSERT(5 == write_cmd.size()); 
    585575 
    586    vpr::Uint32 bytes_sent; 
    587     
    588576   //vprDEBUG(vprDBG_ALL, vprDBG_HVERB_LVL) 
    589577   //vprDEBUG(vprDBG_ALL, 0) 
    590578   //   << "Ether24Standalone::setWordValue(): Sending command [" << write_cmd << "]" 
    591579   //   << std::endl << vprDEBUG_FLUSH; 
    592    mSocket->sendto(write_cmd, 5, mAddress, bytes_sent); 
     580   mSocket->sendto(write_cmd, 5, mAddress); 
    593581} 
    594582 
  • juggler/trunk/modules/gadgeteer/drivers/Fakespace/PinchGlove/PinchGloveStandalone.cpp

    r19729 r19847  
    283283                                          const vpr::Uint8& second) 
    284284   { 
    285       vpr::Uint32 written; 
    286285      unsigned char buf[10]; 
    287286 
     
    295294      // way we are clearing the PinchGloves input buffer. 
    296295 
    297       mPort->write(&first, 1, written); 
    298       try 
    299       { 
    300          mPort->read(&buf[0], 10, written, read_timeout); 
     296      mPort->write(&first, 1); 
     297      try 
     298      { 
     299         mPort->read(&buf[0], 10, read_timeout); 
    301300         // If read without an error. 
    302          mPort->write(&first, 1, written); 
     301         mPort->write(&first, 1); 
    303302      } 
    304303      catch (vpr::IOException&) 
     
    308307      vpr::System::msleep(100); 
    309308      // Wait between sending bytes. 
    310       mPort->write(&second, 1, written); 
     309      mPort->write(&second, 1); 
    311310   } 
    312311 
     
    321320      try 
    322321      { 
    323          mPort->read(&temp_byte, 1, read, read_timeout); 
     322         read = mPort->read(&temp_byte, 1, read_timeout); 
    324323      } 
    325324      catch (vpr::IOException&) 
     
    334333         try 
    335334         { 
    336             mPort->read(&temp_byte, 1, read, read_timeout); 
     335            read = mPort->read(&temp_byte, 1, read_timeout); 
    337336         } 
    338337         catch (vpr::IOException&) 
     
    349348      try 
    350349      { 
    351          mPort->read(&temp_byte, 1, read, read_timeout); 
     350         read = mPort->read(&temp_byte, 1, read_timeout); 
    352351      } 
    353352      catch (vpr::IOException&) 
     
    366365         try 
    367366         { 
    368             mPort->read(&temp_byte, 1, read, read_timeout); 
     367            read = mPort->read(&temp_byte, 1, read_timeout); 
    369368         } 
    370369         catch (vpr::IOException&) 
  • juggler/trunk/modules/gadgeteer/drivers/Immersion/IBox/IBoxStandalone.cpp

    r19729 r19847  
    209209bool IBoxStandalone::autoSync() 
    210210{ 
    211    vpr::Uint32 written; 
    212211   char temp[4]; 
    213212   vpr::Interval timeout(100, vpr::Interval::Msec); 
     
    225224      try 
    226225      { 
    227          mSerialPort->write(SIGNON_STR, sizeof(SIGNON_STR) - 1, written); 
    228          mSerialPort->read(&temp, 1, written, timeout); 
     226         mSerialPort->write(SIGNON_STR, sizeof(SIGNON_STR) - 1); 
     227         mSerialPort->read(&temp, 1, timeout); 
    229228 
    230229         if ( temp[0] == 'I' ) 
    231230         { 
    232             mSerialPort->read(&temp, 3, written, timeout); 
     231            mSerialPort->read(&temp, 3, timeout); 
    233232             
    234233            if ( temp[0] == 'M' && temp[1] == 'M' && temp[2] == 'C' ) 
     
    250249bool IBoxStandalone::beginCommunication() 
    251250{ 
    252    vpr::Uint32 written; 
    253251   mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    254    mSerialPort->write(BEGIN_STR, sizeof(BEGIN_STR) - 1, written); 
     252   mSerialPort->write(BEGIN_STR, sizeof(BEGIN_STR) - 1); 
    255253    
    256254   try 
     
    266264void IBoxStandalone::sendEndCommand() 
    267265{ 
    268    vpr::Uint32 written; 
    269266   mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    270267 
    271    mSerialPort->write(END_STR, sizeof(END_STR) - 1, written); 
     268   mSerialPort->write(END_STR, sizeof(END_STR) - 1); 
    272269} 
    273270 
     
    281278bool IBoxStandalone::sendStringCommand(const vpr::Uint8 command) const 
    282279{ 
    283    vpr::Uint32 written; 
    284280   vpr::Uint8 response; 
    285281   vpr::Interval timeout(100, vpr::Interval::Msec); 
    286282 
    287283   mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    288    mSerialPort->write(&command, 1, written); 
    289    mSerialPort->read(&response, 1, written, timeout); 
     284   mSerialPort->write(&command, 1); 
     285   mSerialPort->read(&response, 1, timeout); 
    290286    
    291287   // If the returned command does not match the sent command 
     
    293289   { 
    294290      mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    295       mSerialPort->write(&command, 1, written); 
     291      mSerialPort->write(&command, 1); 
    296292      try 
    297293      { 
    298          mSerialPort->read(&response, 1, written, timeout); 
     294         mSerialPort->read(&response, 1, timeout); 
    299295      } 
    300296      catch (vpr::IOException&) 
     
    315311   char buffer[MAX_STRING_SIZE]; 
    316312   char* buffer_ptr = buffer; 
    317    vpr::Uint32 written; 
    318313   char ch; 
    319314   vpr::Interval timeout(100, vpr::Interval::Msec); 
    320315 
    321    mSerialPort->read(&ch,1,written, timeout); 
     316   mSerialPort->read(&ch, 1, timeout); 
    322317 
    323318   while ( 0 != ch ) 
    324319   { 
    325320      *(buffer_ptr++) = (char) ch; 
    326       mSerialPort->read(&ch,1,written, timeout); 
     321      mSerialPort->read(&ch, 1, timeout); 
    327322   } 
    328323   return (std::string(buffer)); 
     
    362357                                 const int numEncoders) const 
    363358{ 
    364    vpr::Uint32 written; 
    365359   vpr::Uint8 command = getCommandByte(timerFlag, numAnalogs, numEncoders); 
    366    mSerialPort->write(&command, 1, written); 
     360   mSerialPort->write(&command, 1); 
    367361} 
    368362 
    369363void IBoxStandalone::sendSimpleConfigCommand(const vpr::Uint8 command) const 
    370364{ 
    371    vpr::Uint32 written; 
    372    mSerialPort->write(&command, 1, written); 
     365   mSerialPort->write(&command, 1); 
    373366} 
    374367 
     
    377370{ 
    378371   vpr::Uint8 response; 
    379    vpr::Uint32 bytes_written; 
    380    vpr::Uint32 bytes_read; 
    381372   vpr::Interval timeout(100, vpr::Interval::Msec); 
    382373 
    383374   // Write command 
    384    mSerialPort->write(&command, 1, bytes_written); 
    385    mSerialPort->read(&response, 1, bytes_read, timeout); 
     375   mSerialPort->write(&command, 1); 
     376   mSerialPort->read(&response, 1, timeout); 
    386377 
    387378   while ( response != command ) 
    388379   { 
    389       mSerialPort->read(&response, 1, bytes_read, timeout); 
    390    } 
    391  
    392    mSerialPort->write(mSerialNumber.c_str(), strlen(mSerialNumber.c_str()), bytes_written); 
     380      mSerialPort->read(&response, 1, timeout); 
     381   } 
     382 
     383   mSerialPort->write(mSerialNumber.c_str(), strlen(mSerialNumber.c_str())); 
    393384   // Send NULL to terminate. 
    394    mSerialPort->write(NULL, 1, bytes_written); 
    395    mSerialPort->read(&response, 1, bytes_read, timeout); 
     385   mSerialPort->write(NULL, 1); 
     386   mSerialPort->read(&response, 1, timeout); 
    396387   if ( response != PASSWD_OK ) 
    397388   { 
    398389      throw IBoxException("Password not accepted.", VPR_LOCATION); 
    399390   } 
    400    mSerialPort->write(args, args.size(), bytes_written); 
     391   mSerialPort->write(args, args.size()); 
    401392} 
    402393 
     
    404395{ 
    405396   sendSimpleConfigCommand(INSERT_MARKER); 
    406    vpr::Uint32 bytes_written; 
    407    mSerialPort->write( &marker, 1, bytes_written); 
     397   mSerialPort->write(&marker, 1); 
    408398} 
    409399 
     
    478468{ 
    479469   boost::ignore_unused_variable_warning(active_btns); 
    480    vpr::Uint32 written; 
    481470   vpr::Uint8 temp; 
    482471   vpr::Uint8 command = getCommandByte(timer_flag, analog_reports, encoder_reports); 
     
    484473   // Command Byte 4F or CF 
    485474   temp = REPORT_MOTION; 
    486    mSerialPort->write(&temp, 1, written); 
     475   mSerialPort->write(&temp, 1); 
    487476 
    488477   // Minimum delay between packets, 16 bit integer, ticks are ~1 ms 
    489478   temp = (vpr::Uint16)delay; 
    490    mSerialPort->write(&temp, 1, written); 
     479   mSerialPort->write(&temp, 1); 
    491480 
    492481   // Send the command that we are to act like we are responding to     (Byte 3) 
    493    mSerialPort->write(&command, 1, written); 
     482   mSerialPort->write(&command, 1); 
    494483 
    495484   // Does each button click generate a packet 
    496485   temp = 0xFF; 
    497    mSerialPort->write(&temp, 1, written); 
     486   mSerialPort->write(&temp, 1); 
    498487 
    499488   // Send the minimum analog changes to generate a packet. 
    500489   analog_deltas.resize(NUM_ENCODERS); 
    501    mSerialPort->write(analog_deltas, analog_deltas.size(), written); 
     490   mSerialPort->write(analog_deltas, analog_deltas.size()); 
    502491 
    503492   // Send the minimum encoder change to generate a packet. 
    504493   encoder_deltas.resize(NUM_ENCODERS); 
    505    mSerialPort->write(encoder_deltas, encoder_deltas.size(), written); 
     494   mSerialPort->write(encoder_deltas, encoder_deltas.size()); 
    506495} 
    507496 
    508497void IBoxStandalone::stopMotionMode() 
    509498{ 
    510    vpr::Uint32 written; 
    511    mSerialPort->write(0, 1, written); 
     499   mSerialPort->write(0, 1); 
    512500   mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    513501} 
     
    528516{ 
    529517   vpr::Uint8 packet_type; 
    530    vpr::Uint32 written; 
    531518   vpr::Interval timeout(100, vpr::Interval::Msec); 
    532519 
    533520   try 
    534521   { 
    535       mSerialPort->read(&packet_type, 1, written, timeout); 
     522      mSerialPort->read(&packet_type, 1, timeout); 
    536523   } 
    537524   catch (vpr::IOException&) 
     
    558545      mPacket.num_bytes_needed = getPacketSize(packet_type); 
    559546 
    560       mSerialPort->read(mPacket.data_ptr, mPacket.num_bytes_needed, written, timeout); 
     547      mSerialPort->read(mPacket.data_ptr, mPacket.num_bytes_needed, timeout); 
    561548   } 
    562549} 
  • juggler/trunk/modules/gadgeteer/drivers/Polhemus/Fastrak/FastrakStandalone.cpp

    r19778 r19847  
    169169   std::vector<vpr::Uint8> temp_data_record;    // Temp buffer for reading data 
    170170 
    171    vpr::Uint32 bytes_read; 
    172171   vpr::Uint32 bytes_remaining; 
    173172 
     
    184183      try 
    185184      { 
    186          mSerialPort->read(temp_data_record, bytes_remaining, 
    187                            bytes_read, mReadTimeout); 
     185         const vpr::Uint32 bytes_read = 
     186            mSerialPort->read(temp_data_record, bytes_remaining, mReadTimeout); 
    188187         // Append the temp data onto the end of the data record 
    189188         data_record.insert(data_record.end(), temp_data_record.begin(), 
     
    292291      throw vpr::Exception("Failed to flush queue before command.", VPR_LOCATION); 
    293292   } 
    294    vpr::Uint32 bytes_written; 
    295    mSerialPort->write(&cmd, 1, bytes_written); 
     293   mSerialPort->write(&cmd, 1); 
    296294   if(!data.empty()) 
    297295   { 
    298       mSerialPort->write(data, data.size(), bytes_written); 
     296      const vpr::Uint32 bytes_written = mSerialPort->write(data, data.size()); 
    299297      vprASSERT(data.size() == bytes_written); 
    300298   } 
     
    319317   sendCommand(Fastrak::Command::StationStatus, data); 
    320318   std::vector<vpr::Uint8> data_record; 
    321    vpr::Uint32 bytes_read; 
    322319 
    323320   try 
    324321   { 
    325       mSerialPort->read(data_record, 9, 
    326                         bytes_read, mReadTimeout); 
     322      mSerialPort->read(data_record, 9, mReadTimeout); 
    327323   } 
    328324   catch (vpr::IOException&) 
     
    349345void FastrakStandalone::printStatus() 
    350346{ 
    351    vpr::Uint32 bytes_read; 
    352347   std::vector<vpr::Uint8> respData; 
    353348   unsigned int respSize = 55; 
     
    363358   // Read response and then flush the port to make sure we don't leave 
    364359   // anything extra. 
    365    mSerialPort->readn(respData, respSize, bytes_read); 
     360   const vpr::Uint32 bytes_read = mSerialPort->readn(respData, respSize); 
    366361   mSerialPort->flushQueue(vpr::SerialTypes::IO_QUEUES); 
    367362 
  • juggler/trunk/modules/gadgeteer/drivers/USDigital/SerialEncoder/SEIBus.h

    r19729 r19847  
    354354   int write(char *data,int size) 
    355355   { 
    356       vpr::Uint32 amount; 
    357       port->write(data,size,amount); 
     356      const vpr::Uint32 amount = port->write(data, size); 
    358357 
    359358      if ( amount==0 ) 
     
    367366   int read(char *data,int size,int timeout) 
    368367   { 
    369       vpr::Uint32 amount; 
    370368      port->setTimeout(timeout/100); 
    371       port->read(data,size,amount,vpr::Interval(timeout,vpr::Interval::Msec)); 
     369      const vpr::Uint32 amount = 
     370         port->read(data, size, vpr::Interval(timeout,vpr::Interval::Msec)); 
    372371 
    373372      if ( amount==0 ) 
  • juggler/trunk/modules/gadgeteer/drivers/configure.ac

    r19729 r19847  
    162162# ----------------------------------------------------------------------------- 
    163163 
    164 VPR_PATH([1.1.31], , [AC_MSG_ERROR([*** VPR required for Device Drivers ***])]) 
     164VPR_PATH([1.1.42], , [AC_MSG_ERROR([*** VPR required for Device Drivers ***])]) 
    165165GADGETEER_PATH([1.1.16], , 
    166166               [AC_MSG_ERROR(*** Gadgeteer required for Device Drivers ***)]) 
  • juggler/trunk/modules/gadgeteer/gadget/Node.cpp

    r19729 r19847  
    342342   } 
    343343 
    344    vpr::Uint32 bytes_written; 
    345  
    346344   if(mHeader->getPacketLength() == cluster::Header::RIM_PACKET_HEAD_SIZE) 
    347345   { 
     
    357355      { 
    358356         mSockStream->send(*packet_data, 
    359             mHeader->getPacketLength() - cluster::Header::RIM_PACKET_HEAD_SIZE, 
    360             bytes_written); 
     357            mHeader->getPacketLength() - cluster::Header::RIM_PACKET_HEAD_SIZE); 
    361358      } 
    362359      catch (vpr::IOException&) 
     
    375372      try 
    376373      { 
    377          mSockStream->send(*packet_data, size, bytes_written); 
     374         mSockStream->send(*packet_data, size); 
    378375      } 
    379376      catch (vpr::IOException&) 
     
    407404      try 
    408405      { 
    409          mSockStream->send(*(temp_data_packet->getDeviceData()),temp_data_packet->getDeviceData()->size(),bytes_written); 
     406         mSockStream->send(*(temp_data_packet->getDeviceData()), 
     407                           temp_data_packet->getDeviceData()->size()); 
    410408      } 
    411409      catch (vpr::IOException&) 
     
    486484   else 
    487485   { 
    488       vpr::Uint32 bytes_read; 
    489  
    490486      try 
    491487      { 
    492488         // Get packet data. 
    493          mSockStream->recvn( incoming_data, 
    494                              packet_head->getPacketLength() - 
    495                              cluster::Header::RIM_PACKET_HEAD_SIZE, 
    496                              bytes_read ); 
     489         mSockStream->recvn( 
     490            incoming_data, 
     491            packet_head->getPacketLength() - cluster::Header::RIM_PACKET_HEAD_SIZE 
     492         ); 
    497493      } 
    498494      catch (vpr::IOException&) 
     
    502498            << " Reading packet data failed. Expecting: " 
    503499            << packet_head->getPacketLength() - cluster::Header::RIM_PACKET_HEAD_SIZE 
    504             << " But got: " << bytes_read << std::endl << vprDEBUG_FLUSH; 
     500            << " bytes" << std::endl << vprDEBUG_FLUSH; 
    505501 
    506502         // TODO: setCause(ex) 
  • juggler/trunk/modules/gadgeteer/plugins/SwapLockTCPPlugin/SwapLockTCPPlugin.cpp

    r19729 r19847  
    307307      vprASSERT(mActive==true && "Barrier is not active!"); 
    308308 
    309       vpr::Uint32 bytes_read; 
    310309      vpr::Guard<vpr::Mutex> guard(mSyncClientsLock); 
    311310 
     
    322321               << std::endl << vprDEBUG_FLUSH; 
    323322 
    324             (*i)->recvn(&temp , 1, bytes_read); 
     323            (*i)->recvn(&temp , 1); 
    325324         } 
    326325 
    327326         try 
    328327         { 
    329             (*i)->send(&SYNC_SIGNAL, 1, bytes_read, vpr::Interval::NoWait); 
     328            (*i)->send(&SYNC_SIGNAL, 1, vpr::Interval::NoWait); 
    330329         } 
    331330         // Ignore timeout exceptions. These will be thrown on Windows due to 
     
    342341      vprASSERT(mActive==true && "Barrier is not active!"); 
    343342 
    344       vpr::Uint32 bytes_read; 
    345343      vpr::Uint8 temp; 
    346344       
     
    352350         try 
    353351         { 
    354             (*i)->recv(&temp , 1, bytes_read,read_timeout); 
     352            (*i)->recv(&temp , 1, read_timeout); 
    355353         } 
    356354         // If we time out while trying to receive a synchronization packet, 
     
    383381*/             
    384382         } 
    385          //vprASSERT(1==bytes_read && "SwapLockTCPPlugin: Master Barrier received timeout"); 
    386383      }  
    387384   } 
     
    393390      vpr::Uint8 temp; 
    394391 
    395       vpr::Uint32 bytes_read; 
    396        
    397392      while (mSyncServerSock