Cat
|
#include <include/SpecsInterface.h>
Public Member Functions | |
SpecsInterface () | |
virtual | ~SpecsInterface () |
virtual void | help () |
virtual StatusCode | init () |
virtual void | reset () |
virtual void | update () |
void | setAddress (unsigned char) |
unsigned char | address () |
void | setOutputSelect (unsigned char) |
unsigned char | outputSelect () |
virtual SpecsSlave * | specsSlave () |
virtual SpecsMaster * | specsMaster () |
virtual SPECSSLAVE * | specsSlaveDevice () |
virtual SPECSMASTER * | specsMasterDevice () |
virtual StatusCode | read (IOdata *io) |
virtual StatusCode | write (IOdata *io) |
bool | specsWriteI2c (unsigned char address, unsigned char nData, U8 *data) |
bool | specsWriteI2c (unsigned char address, std::vector< U8 > data) |
bool | specsReadI2c (unsigned char address, unsigned char nOctects, U8 *i2cWords) |
bool | specsReadI2c (unsigned char address, std::vector< unsigned char > &specsWords) |
bool | specsWriteI2c (unsigned char address, unsigned char subAddress, unsigned char nData, U8 *data) |
bool | specsWriteI2c (unsigned char address, unsigned char outputSel, unsigned char subAddress, unsigned char nData, U8 *data) |
bool | specsReadI2c (unsigned char address, unsigned char subAddress, unsigned char nOctets, U8 *i2cWords) |
bool | specsReadI2c (unsigned char address, unsigned char outputSel, unsigned char subAddress, unsigned char nOctets, U8 *i2cWords) |
bool | specsWriteParallel (unsigned char address, unsigned short data) |
bool | specsReadParallel (unsigned char address, U16 &data) |
bool | specsWriteRegister (unsigned char, unsigned short) |
bool | specsReadRegister (unsigned char, U16 &) |
![]() | |
Interface () | |
Standard constructor. More... | |
virtual | ~Interface () |
Destructor. More... | |
![]() | |
Element () | |
Standard constructor. More... | |
virtual | ~Element () |
Destructor. More... | |
void | recursiveInitElement () |
void | recursiveInitCommunications () |
StatusCode | setConnection (Hierarchy *) |
Hierarchy * | connection () |
![]() | |
Hierarchy () | |
Standard constructor. More... | |
virtual | ~Hierarchy () |
Destructor. More... | |
void | clear () |
void | setParent (Hierarchy *parent) |
Hierarchy * | parent () |
Hierarchy * | parent (std::string) |
Hierarchy * | origin () |
virtual void | addChild (Hierarchy *element) |
std::vector< Hierarchy * > | children () |
Hierarchy * | child (std::string) |
Hierarchy * | childTyped (std::string) |
unsigned long | numberOfChildren () |
bool | hasChildren () |
void | delChild (Hierarchy *) |
void | delChild (std::string) |
std::string | path (std::string=std::string("")) |
std::string | pathTyped (std::string=std::string("")) |
void | tree (std::string indent=std::string("")) |
void | tree () |
![]() | |
Object () | |
Standard constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
std::string | name () const |
std::string | type () |
unsigned char | id () |
std::string | title () |
void | msgSvc (int level, std::string msg, std::string name) |
void | msg (std::string mymsg) |
void | verbose (std::string mymsg) |
void | debug (std::string mymsg) |
void | info (std::string mymsg) |
void | warning (std::string mymsg) |
void | error (std::string mymsg) |
void | fatal (std::string mymsg) |
void | msg (std::string mymsg, std::string name) |
void | verbose (std::string mymsg, std::string name) |
void | debug (std::string mymsg, std::string name) |
void | info (std::string mymsg, std::string name) |
void | warning (std::string mymsg, std::string name) |
void | error (std::string mymsg, std::string name) |
void | fatal (std::string mymsg, std::string name) |
void | setName (std::string name) |
void | setType (std::string type) |
void | setId (unsigned char id) |
void | setTitle (std::string title) |
void | setDllName (std::string dllName) |
std::string | dllName () |
![]() | |
Attrib () | |
Standard constructor. More... | |
virtual | ~Attrib () |
Destructor. More... | |
bool | is (int attribut) |
void | add (int attribut) |
void | remove (int attribut) |
std::string | attributs () |
Protected Attributes | |
unsigned char | m_address |
unsigned char | m_outputSelect |
![]() | |
Hierarchy * | m_connection |
![]() | |
std::string | m_attribString [10] |
Private Attributes | |
int | m_slot |
Additional Inherited Members | |
![]() | |
enum | Attribut { UNDEFINED, PASSIVE, ACTIVE, INTERFACE, IO, IODATA, ELEMENT, HARDWARE, PROCESSUS, SOFTWARE } |
Class to describe general electronics object
Definition at line 54 of file SpecsInterface.h.
SpecsInterface::SpecsInterface | ( | ) |
Definition at line 21 of file SpecsInterface.cpp.
References m_address, m_outputSelect, and Object::setId().
|
inlinevirtual |
Definition at line 57 of file SpecsInterface.h.
unsigned char SpecsInterface::address | ( | ) |
Definition at line 33 of file SpecsInterface.cpp.
References m_address.
Referenced by BOOST_PYTHON_MODULE(), SpecsMezzanine::cmdline(), SpecsSlave::detect(), SpecsSlave::init(), SpecsSlave::reset(), SpecsSlave::resetInternal(), and setAddress().
|
inlinevirtual |
printout help for the element
Implements Interface.
Reimplemented in SpecsParallelBus, SpecsMezzanine, and SpecsGlue.
Definition at line 63 of file SpecsInterface.h.
Referenced by BOOST_PYTHON_MODULE().
|
inlinevirtual |
init the component
Implements Interface.
Reimplemented in SpecsSlave, and SpecsParallelBus.
Definition at line 69 of file SpecsInterface.h.
References StatusCode::SUCCESS.
Referenced by BOOST_PYTHON_MODULE().
unsigned char SpecsInterface::outputSelect | ( | ) |
Definition at line 41 of file SpecsInterface.cpp.
References m_outputSelect.
Referenced by BOOST_PYTHON_MODULE(), setOutputSelect(), specsReadI2c(), and specsWriteI2c().
|
inlinevirtual |
Implements Interface.
Definition at line 124 of file SpecsInterface.h.
References StatusCode::SUCCESS.
|
inlinevirtual |
Resets the Element so that is is in a standard and safe situation. Different from Element::init which configure the Element. Element::reset() is more an Emergency pull. It is often/usually called by the recursiveInitElement method at the start of the program.
Implements Interface.
Reimplemented in SpecsSlave, and SpecsParallelBus.
Definition at line 81 of file SpecsInterface.h.
Referenced by BOOST_PYTHON_MODULE().
void SpecsInterface::setAddress | ( | unsigned char | address | ) |
Definition at line 29 of file SpecsInterface.cpp.
References address(), and m_address.
Referenced by BOOST_PYTHON_MODULE().
void SpecsInterface::setOutputSelect | ( | unsigned char | outputSelect | ) |
Definition at line 37 of file SpecsInterface.cpp.
References m_outputSelect, and outputSelect().
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Get the closest master in the element hierarchy
Definition at line 57 of file SpecsInterface.cpp.
References Hierarchy::parent(), and specsMaster().
Referenced by BOOST_PYTHON_MODULE(), SpecsSlave::detect(), and specsMaster().
|
virtual |
Get the closest master in the element hierarchy
Definition at line 76 of file SpecsInterface.cpp.
References Hierarchy::parent(), and specsMasterDevice().
Referenced by SpecsSlave::detect(), SpecsSlave::init(), and specsMasterDevice().
bool SpecsInterface::specsReadI2c | ( | unsigned char | address, |
unsigned char | nOctects, | ||
U8 * | i2cWords | ||
) |
Read nOctets from i2c slave address. specsWords contains nSpecsWords containing the i2c data.
[in] | address | i2c Slave address |
[in] | nOctect | number of octets to read |
[in] | nSpecsWords | number of specs words to retrieve |
[out] | specsWords | contains the specs words with the i2c data |
Definition at line 191 of file SpecsInterface.cpp.
References itos(), outputSelect(), specsSlaveDevice(), Object::verbose(), and Object::warning().
Referenced by SpecsMezzanine::cmdline(), and specsReadI2c().
bool SpecsInterface::specsReadI2c | ( | unsigned char | address, |
std::vector< unsigned char > & | specsWords | ||
) |
Read a vector of given size from i2c slave address.
[in] | address | i2c Slave address |
[out] | specsWords | contains the specs words with the i2c data |
Definition at line 216 of file SpecsInterface.cpp.
References specsReadI2c(), and Object::warning().
bool SpecsInterface::specsReadI2c | ( | unsigned char | address, |
unsigned char | subAddress, | ||
unsigned char | nOctets, | ||
U8 * | i2cWords | ||
) |
Read nOctets from i2c slave address at subAddress. specsWords contains nSpecsWords containing the i2c data.
[in] | address | i2c Slave address |
[in] | nOctect | number of octets to read |
[in] | nSpecsWords | number of specs words to retrieve |
[out] | specsWords | contains the specs words with the i2c data |
Definition at line 235 of file SpecsInterface.cpp.
References itos(), outputSelect(), specsSlaveDevice(), Object::verbose(), and Object::warning().
bool SpecsInterface::specsReadI2c | ( | unsigned char | address, |
unsigned char | outputSel, | ||
unsigned char | subAddress, | ||
unsigned char | nOctets, | ||
U8 * | i2cWords | ||
) |
Read nOctets from i2c slave address at subAddress. specsWords contains nSpecsWords containing the i2c data.
[in] | address | i2c Slave address |
[in] | outputSel | i2c Slave output select |
[in] | nOctect | number of octets to read |
[in] | nSpecsWords | number of specs words to retrieve |
[out] | specsWords | contains the specs words with the i2c data |
Definition at line 263 of file SpecsInterface.cpp.
References itos(), specsSlaveDevice(), Object::verbose(), and Object::warning().
bool SpecsInterface::specsReadParallel | ( | unsigned char | address, |
U16 & | data | ||
) |
Read data at address on parallel bus
[in] | address | address bus |
[in] | data | data bus |
Definition at line 323 of file SpecsInterface.cpp.
References itos(), specsSlaveDevice(), Object::verbose(), and Object::warning().
bool SpecsInterface::specsReadRegister | ( | unsigned char | reg, |
U16 & | value | ||
) |
Read Register data
[in] | register | register number |
[in] | data | data |
Definition at line 383 of file SpecsInterface.cpp.
References itos(), specsSlaveDevice(), Object::verbose(), and Object::warning().
Referenced by SpecsMezzanine::cmdline(), SpecsGlue::date(), SpecsMezzanine::date(), SpecsGlue::i2cClkMode(), SpecsGlue::led(), SpecsMezzanine::led(), SpecsGlue::setI2cClkMode(), SpecsGlue::setLed(), and SpecsMezzanine::setLed().
|
virtual |
Get the closest slave in the element hierarchy
Definition at line 49 of file SpecsInterface.cpp.
References Hierarchy::parent(), and specsSlave().
Referenced by BOOST_PYTHON_MODULE(), SpecsSlave::detect(), SpecsSlave::init(), SpecsSlave::setAddress(), specsSlave(), and SpecsSlave::specsSlaveDevice().
|
virtual |
Get the closest slave in the element hierarchy
Reimplemented in SpecsSlave.
Definition at line 66 of file SpecsInterface.cpp.
References Hierarchy::parent(), and specsSlaveDevice().
Referenced by specsReadI2c(), specsReadParallel(), specsReadRegister(), specsSlaveDevice(), specsWriteI2c(), specsWriteParallel(), and specsWriteRegister().
bool SpecsInterface::specsWriteI2c | ( | unsigned char | address, |
unsigned char | nData, | ||
U8 * | data | ||
) |
Write nData stored in data to i2c slave address
[in] | address | i2c Slave address |
[in] | nData | number of octets to send |
[in] | data | contains the data to send |
Definition at line 85 of file SpecsInterface.cpp.
References itos(), outputSelect(), specsSlaveDevice(), Object::verbose(), and Object::warning().
Referenced by SpecsMezzanine::cmdline(), and specsWriteI2c().
bool SpecsInterface::specsWriteI2c | ( | unsigned char | address, |
std::vector< U8 > | data | ||
) |
Write data to i2c slave address
[in] | address | i2c Slave address |
[in] | data | contains the data to send |
Definition at line 111 of file SpecsInterface.cpp.
References specsWriteI2c(), and Object::warning().
bool SpecsInterface::specsWriteI2c | ( | unsigned char | address, |
unsigned char | subAddress, | ||
unsigned char | nData, | ||
U8 * | data | ||
) |
Write nData stored in data to i2c slave address at subAddress
[in] | address | i2c Slave address |
[in] | nData | number of octets to send |
[in] | data | contains the data to send |
Definition at line 129 of file SpecsInterface.cpp.
References itos(), outputSelect(), specsSlaveDevice(), Object::verbose(), and Object::warning().
bool SpecsInterface::specsWriteI2c | ( | unsigned char | address, |
unsigned char | outputSel, | ||
unsigned char | subAddress, | ||
unsigned char | nData, | ||
U8 * | data | ||
) |
Write nData stored in data to i2c slave address at subAddress
[in] | address | i2c Slave address |
[in] | outputSel | i2c Slave output select |
[in] | nData | number of octets to send |
[in] | data | contains the data to send |
Definition at line 159 of file SpecsInterface.cpp.
References itos(), specsSlaveDevice(), Object::verbose(), and Object::warning().
bool SpecsInterface::specsWriteParallel | ( | unsigned char | address, |
unsigned short | data | ||
) |
Write address / data on parallel bus
[in] | address | address bus |
[in] | data | data bus |
Definition at line 295 of file SpecsInterface.cpp.
References itos(), specsSlaveDevice(), Object::verbose(), and Object::warning().
bool SpecsInterface::specsWriteRegister | ( | unsigned char | reg, |
unsigned short | value | ||
) |
Write Register data
[in] | register | register number |
[in] | data | data bus |
Definition at line 351 of file SpecsInterface.cpp.
References itos(), specsSlaveDevice(), Object::verbose(), and Object::warning().
Referenced by SpecsMezzanine::cmdline(), SpecsGlue::setI2cClkMode(), SpecsGlue::setLed(), and SpecsMezzanine::setLed().
|
inlinevirtual |
Update the Element configuration from the actual hardware
Implements Interface.
Reimplemented in SpecsParallelBus.
Definition at line 86 of file SpecsInterface.h.
Referenced by BOOST_PYTHON_MODULE().
|
inlinevirtual |
Implements Interface.
Definition at line 125 of file SpecsInterface.h.
References shell::data(), and StatusCode::SUCCESS.
|
protected |
Definition at line 268 of file SpecsInterface.h.
Referenced by address(), SpecsSlave::setAddress(), setAddress(), and SpecsInterface().
|
protected |
Definition at line 269 of file SpecsInterface.h.
Referenced by outputSelect(), setOutputSelect(), and SpecsInterface().
|
private |
Definition at line 266 of file SpecsInterface.h.