Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ippPtMeasOrGetResponse.cpp

Go to the documentation of this file.
00001 // 
00002 // DISCLAIMER: 
00003 //  This software was produced by the National Institute of Standards 
00004 //  and Technology (NIST), an agency of the U.S. government, and by statute is 
00005 //  not subject to copyright in the United States.  Recipients of this 
00006 //  software assume all responsibility associated with its operation,
00007 //  modification,maintenance, and subsequent redistribution. 
00008 //
00009 //  See NIST Administration Manual 4.09.07 b and Appendix I. 
00010 //
00011 #include "stdafx.h"
00012 #include "ippdme/Response/ippPtMeasOrGetResponse.h"
00013 #include "ippdme/misc/ippStringBuilder.h"
00014 
00015 ippPtMeasOrGetResponse::ippPtMeasOrGetResponse(unsigned int inTagNumber)
00016   : ippXYZResponse(inTagNumber, (inTagNumber == 0 ) ? EventTag : CommandTag, DataPtMeasOrGet)
00017    , _hasER(false)
00018    , _theER(0.0)
00019    , _hasIJK(false)
00020    , _hasQ(false)
00021    , _theQ(0.0)
00022    , _hasIJKAct(false)
00023    , _theIJKAct(0)
00024 {
00025 
00026 }
00027 
00028 
00029 ippPtMeasOrGetResponse::ippPtMeasOrGetResponse(
00030   unsigned int inTagNumber,
00031   bool inHasER, bool inHasIJK,bool inHasIJKAct,bool inHasQ,
00032   bool inHasR, 
00033   bool inHasToolA, bool inHasToolB, bool inHasToolC,
00034   bool inHasX, bool inHasY, bool inHasZ,
00035   double inTheER, double inI, double inJ, double inK,int inIJKAct,
00036   double inQ,
00037   double inR, double inToolA, double inToolB, double inToolC, 
00038   double inX, double inY, double inZ
00039 )
00040   :  ippXYZResponse(inTagNumber, (inTagNumber == 0 ) ? EventTag : CommandTag, DataPtMeasOrGet, inHasR,
00041                 inHasToolA, inHasToolB, inHasToolC, inHasX, inHasY, inHasZ,
00042                 inR, inToolA, inToolB, inToolC, inX, inY, inZ)
00043 {
00044   _hasER = inHasER;
00045   _hasIJK = inHasIJK;
00046   _hasQ   = inHasQ;
00047   _hasIJKAct = inHasIJKAct;
00048   
00049   _theER = inTheER;
00050   _theIJK.setValues(inI, inJ, inK);
00051   _theQ = inQ;
00052   _theIJKAct = inIJKAct;
00053 
00054 }
00055 
00056 std::string ippPtMeasOrGetResponse::getResponseString() const
00057 {
00058   ippStringBuilder str(_tag,_tag.getTagNumber()==0?"!":"#");
00059 
00060   if (_tag.getTagNumber() == 0 ) { 
00061    str.StartFunc("PtMeas");
00062   } 
00063   if (_hasIJK)    { str.AppendFunc("IJK",getI(), getJ(), getK()); }  
00064   if (_hasIJKAct) { str.AppendFunc("IJKAct",_theIJKAct); }  
00065   if (_hasER)     { str.AppendFunc("ER", _theER);}
00066   if (_hasQ)      { str.AppendFunc("Q", _theQ);}
00067   getResponseStringEnd(str);
00068   if (_tag.getTagNumber() == 0 ) { 
00069    str.EndFunc();
00070   } 
00071 
00072   return str.ToString();
00073 }
00074 

Generated on Wed Nov 8 00:20:06 2006 for IPPDME by  doxygen 1.4.1