33 debug(
"SpecsSlave built.",
"SpecsSlave::SpecsSlave");
75 warning(
"SpecsSlave " +
name() +
"could not be initialized correctly [code:" +
76 itos(status) +
"].",
"SpecsSlave::initSpecs");
81 for (
int i=0 ; i<nAttempts ; ++i){
83 U16 wr = (
U16)(rand()&&0xFFFC);
89 itos(i)+
"/"+
itos (nAttempts)+
"]. Further use of this slave is hazardeous.",
94 info(
"SpecsSlave "+
name()+
" initialized and connected to master.",
"SpecsSlave::init");
98 fatal(
"Could not initialize SpecsSlave "+
name()+
".",
"SpecsSlave::init");
102 debug(
"Compilation in the _NODEVICE_ mode.",
"SpecsSlave::init");
125 info(
"SpecsSlave "+
name()+
"could not be initialized correctly [code:"+
126 itos(status) +
"].",
"initSpecs");
132 warning(
"Could not reach proper Specs Master and/or Slave.",
133 "SpecsElement::specsWriteI2c");
139 status = specs_register_read ( specsSlv , reg , &value );
142 debug(
"No SpecsSlave detected at address " +
144 "specsSlave::detect");
149 info(
"SpecsSlave detected at address " +
151 "specsSlave::detect");
165 std::vector<Hierarchy*> list = this->
children();
166 std::vector<Hierarchy*>::iterator iter;
167 for (iter=list.begin() ; iter!=list.end() ; ++iter){
178 debug(element->
name()+
" added to the i2c child tree.",
"SpecsSlave::addI2c");
187 SpecsError status = specs_slave_internal_reset ( specsSlv );
190 ": failure in performing the internal reset [code:" +
192 "SpecsSlave::reset" ); }
194 info(
"internal reset of the specs slave "+
196 "SpecsSlave::resetInternal");
207 SpecsError status = specs_slave_external_reset ( specsSlv );
210 ": failure in performing the SpecsSlave reset [code:" +
212 "SpecsSlave::reset" ); }
214 debug(
"reset of the specs slave "+
216 "SpecsSlave::reset");
void info(std::string mymsg)
void setParent(Hierarchy *parent)
virtual SpecsMaster * specsMaster()
void recursiveInitCommunications()
std::vector< Hierarchy * > children()
void fatal(std::string mymsg)
void setType(std::string type)
void setId(unsigned char id)
void debug(std::string mymsg)
SPECSSLAVE * specsSlaveDevice()
virtual SPECSMASTER * specsMasterDevice()
virtual SpecsSlave * specsSlave()
void setAddress(unsigned char)
virtual void addChild(Hierarchy *element)
void warning(std::string mymsg)