Ignore:
Timestamp:
01/30/08 15:41:38 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc

    r8378 r8840  
    22
    33#include <iostream>
     4
     5#include "MLog.h"
    46
    57#include "MString.h"
     
    79using namespace std;
    810
     11/*
     12 // THIS COULD NEVER WORK BECAUSE IT IGNORES WHETHER
     13 // WE SEND STARGUIDER OR DRIVE REPORTS!
     14bool MCeCoCom::SendMsg(const char *msg, bool force=kFALSE)
     15{
     16    const MTime t(-1);
     17
     18    if ((double)t-(double)fTime<0.001*fSendInterval && !force)
     19          return true;
     20
     21    if (lout.Lock("MTcpIpIO::Send"))
     22    {
     23        //const Int_t rc = lout.IsOutputDeviceEnabled(MLog::eGui);
     24        //lout.DisableOutputDevice(MLog::eGui);
     25        lout << msg << flush;
     26        lout.UnLock("MTcpIpIO::Send");
     27        //if (rc)
     28        //    lout.EnableOutputDevice(MLog::eGui);
     29    }
     30
     31    fTime = t;
     32
     33    return Send(msg, strlen(msg));
     34}
     35*/
    936bool MCeCoCom::InterpreteCmd(TString cmd, TString str)
    1037{
     
    114141             str);
    115142
    116     const bool rc = MTcpIpIO::Send(msg, force);
     143    // Send report to CC
     144    const bool rc = Send(msg, strlen(msg));
    117145    fComStat = rc ? kNoCmdReceived : kComProblem;
     146
     147    // Write report to stream
     148    if (fOut)
     149        if (fOut->Lock("MTcpIpIO::Send"))
     150        {
     151            *fOut << msg << flush;
     152            fOut->UnLock("MTcpIpIO::Send");
     153        }
     154
    118155    return rc;
    119156}
Note: See TracChangeset for help on using the changeset viewer.