17 #include <JANA/jerror.h>
18 #include <JANA/JObject.h>
43 size_t pos = nameval.find(
"=");
44 if(pos != nameval.npos){
45 name = nameval.substr(0, pos);
46 sval = nameval.substr(pos+1);
48 stringstream ss(
sval);
57 if( (fval==0.0) && (ival!=0.0) ) fval = (double)ival;
72 void toStrings(vector<pair<string,string> > &items)
const{
74 timestr[timestr.length()-1] = 0;
75 AddString(items,
"timestamp",
"%d",
timestamp);
76 AddString(items,
"name",
"%s",
name.c_str());
77 AddString(items,
"sval",
"%s",
sval.substr(0, 255).c_str());
78 AddString(items,
"ival",
"%d",
ival);
79 AddString(items,
"fval",
"%f", (
float)
fval);
80 AddString(items,
"t",
"%s", timestr.c_str());
84 #endif // _DEPICSvalue_
DEPICSvalue(time_t timestamp, string &nameval)
JOBJECT_PUBLIC(DEPICSvalue)
void toStrings(vector< pair< string, string > > &items) const
A DEPICSvalue object holds information for a single EPICS value read from the data stream...