Ignore:
Timestamp:
02/02/08 13:06:37 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/candrv/vmodican.cc

    r8831 r8852  
    4141
    4242#include "MLog.h"
     43#include "MLogManip.h"
    4344
    4445ClassImp(VmodIcan);
     
    8182    while (!Send(&msg));
    8283
    83     gLog << "- CAN Bus Termination set to " << (state?"on":"off") << endl;
     84    gLog << inf2 << "- CAN Bus Termination set to " << (state?"on":"off") << endl;
    8485}
    8586
     
    9596        return 0;
    9697
    97     gLog << "- Starting Receiver Loop." << endl;
     98    gLog << inf2 << "- Starting Receiver Loop." << endl;
    9899
    99100    while (1)
     
    313314    while (!Send(&msg));      /* transmitt to module */
    314315
    315     gLog << "- Baudrate set to " << rate << "kbps" << endl;
     316    gLog << inf2 << "- Baudrate set to " << rate << "kbps" << endl;
    316317}
    317318
     
    342343    while (!Send(&msg));
    343344
    344     gLog << "- Controller connected to bus" << endl;
     345    gLog << inf2 << "- Controller connected to bus" << endl;
    345346}
    346347
     
    387388        return -1;
    388389
    389     gLog << "- Fast Host Interface Enabled" << endl;
     390    gLog << inf2 << "- Fast Host Interface Enabled" << endl;
    390391
    391392    return 0;
     
    415416void VmodIcan::DisableCanBusConnection()
    416417{
    417     gLog << "- Disconnect VmodIcan module from Bus!" << endl;
     418    gLog << inf2 << "- Disconnect VmodIcan module from Bus!" << endl;
    418419
    419420    Message msg;                  /* buffer for module messages */
     
    424425    while (!Send(&msg));
    425426
    426     gLog << "- VmodIcan disconnected." << endl;
     427    gLog << inf2 << "- VmodIcan disconnected." << endl;
    427428}
    428429
     
    451452void VmodIcan::Close()
    452453{
    453     gLog << "- Closing device VmodIcan #" << (int)fd << endl;
     454    gLog << inf2 << "- Closing device VmodIcan #" << (int)fd << endl;
    454455
    455456    Message msg; /* disconnect message */
     
    462463    close(fd);
    463464
    464     gLog << "- Device closed." << endl;
     465    gLog << inf2 << "- Device closed." << endl;
    465466}
    466467
     
    479480    while (!Send(&msg));
    480481
    481     gLog << "- Fifo enabled" << endl;
     482    gLog << inf2 << "- Fifo enabled" << endl;
    482483
    483484    return TRUE;
     
    492493    const int rc = Ioctl(DPM_RESET, 0);
    493494
    494     gLog << "- Reset done." << endl;
     495    gLog << inf2 << "- Reset done." << endl;
    495496
    496497    return rc;
     
    516517    if (fd < 0)
    517518    {
    518         gLog << "Error: Opening device '" << devname << "' (rc=" << fd << ")" << endl;
     519        gLog << err << "Error: Opening device '" << devname << "' (rc=" << fd << ")" << endl;
    519520        gLog << strerror(errno) << endl;
    520521        return FALSE;
    521522    }
    522523
    523     gLog << "- Device " << devname << " #" << fd << " open." << endl;
     524    gLog << inf << "- Device " << devname << " #" << fd << " open." << endl;
    524525
    525526    return TRUE;
     
    582583    Ioctl(DPM_INIT_NEW_HOSTIF_PRIO, &hdp);
    583584
    584     gLog << "- New style host interface enabled" << endl;
     585    gLog << inf2 << "- New style host interface enabled" << endl;
    585586
    586587    return 0;
     
    757758    while (!Send(&msg));
    758759
    759     gLog << "- All CobIds disabled." << endl;
     760    gLog << inf2 << "- All CobIds disabled." << endl;
    760761}
    761762
     
    868869     */
    869870
    870     gLog << "- VmodIcan initialized." << endl;
     871    gLog << inf << "- VmodIcan initialized." << endl;
    871872
    872873}
     
    879880VmodIcan::~VmodIcan()
    880881{
    881     gLog << "- Stopping VmodIcan module." << endl;
     882    gLog << inf2 << "- Stopping VmodIcan module." << endl;
    882883    CancelThread();
    883884    DisableCanBusConnection();
    884885    Close();
    885     gLog << "- VmodIcan stopped." << endl;
    886 }
     886    gLog << inf << "- VmodIcan stopped." << endl;
     887}
Note: See TracChangeset for help on using the changeset viewer.