TwiceAsNice
2019-02-18
|
This is the base class of the MPIA in-house electronic cards with the core commands. More...
#include <Card.h>
Public Member Functions | |
MPIACoreCard (std::string _name, Nice::JointPtr _config, Basda::MPIACoreProtocolPtr _protocol) | |
Constructor. More... | |
~MPIACoreCard () | |
Destructor. More... | |
std::string | version () |
The methods returns the current version string of the MPIA in-house electronic. More... | |
std::vector< unsigned int > | getRegistration () |
The methods returns all registered module and card that are registered at the MPIA in-house electronic. More... | |
void | reset () |
Resets the MPIA in-house electronic software and hardware. More... | |
void | setXonXoff (const ValueSwitch::Constant _enable) |
Enables/disables the XOnXOff protocol. More... | |
bool | getXonXoff () |
Returns the status of the XOnXOff protocol. More... | |
void | setSerialRate (const ValueSerialRate::Constant _baudRate) |
Sets the baud rate of the serial interface. More... | |
unsigned int | getSerialRate () |
Returns the current baud rate. More... | |
void | setCANRate (const ValueCanRate::Constant _canRate) |
Sets the CAN rate of the CAN bus. More... | |
unsigned int | getCANRate () |
Returns the current CAN rate. More... | |
void | setEventFlag (const ValueSwitch::Constant _eventMode) |
Sets the event message flag. More... | |
bool | getEventFlag () |
Returns the current event message flags. More... | |
void | setInfoFlag (const ValueSwitch::Constant _infoMode) |
Sets the event message flag. More... | |
bool | getInfoFlag () |
Returns the current event message flags. More... | |
void | setIPAddress (const std::string _ip) |
Sets the IP address of the MPIA in-house electronic. More... | |
std::string | getIPAddress () |
Returns the current IP address. More... | |
void | setGateAddress (const std::string _gate) |
Sets the gate address of the MPIA in-house electronic. More... | |
std::string | getGateAddress () |
Returns the current gate address. More... | |
void | setMaskAddress (const std::string _mask) |
Sets the mask address of the MPIA in-house electronic. More... | |
std::string | getMaskAddress () |
Returns the current mask address. More... | |
void | setLinkTimeout (const unsigned int _timeout) |
Sets the Ethernet connection timeout. More... | |
int | getLinkTimeout () |
Returns the Ethernet connection timeout. More... | |
void | waitForEvent () |
Waits until an event is received in a certain time (timeout). More... | |
std::string | getFatalError () |
Returns the fatal error message. More... | |
void | resetFatalError () |
Resets the fatal error. More... | |
MPIACoreCard (std::string _name, Nice::JointPtr _config, Basda::MPIACoreProtocolPtr _protocol) | |
Constructor. More... | |
~MPIACoreCard () | |
Destructor. More... | |
std::string | version () |
The methods returns the current version string of the MPIA in-house electronic. More... | |
std::vector< unsigned int > | getRegistration () |
The methods returns all registered module and card that are registered at the MPIA in-house electronic. More... | |
void | reset () |
Resets the MPIA in-house electronic software and hardware. More... | |
void | setXonXoff (const ValueSwitch::Constant _enable) |
Enables/disables the XOnXOff protocol. More... | |
bool | getXonXoff () |
Returns the status of the XOnXOff protocol. More... | |
void | setSerialRate (const ValueSerialRate::Constant _baudRate) |
Sets the baud rate of the serial interface. More... | |
unsigned int | getSerialRate () |
Returns the current baud rate. More... | |
void | setCANRate (const ValueCanRate::Constant _canRate) |
Sets the CAN rate of the CAN bus. More... | |
unsigned int | getCANRate () |
Returns the current CAN rate. More... | |
void | setEventFlag (const ValueSwitch::Constant _eventMode) |
Sets the event message flag. More... | |
bool | getEventFlag () |
Returns the current event message flags. More... | |
void | setInfoFlag (const ValueSwitch::Constant _infoMode) |
Sets the event message flag. More... | |
bool | getInfoFlag () |
Returns the current event message flags. More... | |
void | setIPAddress (const std::string _ip) |
Sets the IP address of the MPIA in-house electronic. More... | |
std::string | getIPAddress () |
Returns the current IP address. More... | |
void | setGateAddress (const std::string _gate) |
Sets the gate address of the MPIA in-house electronic. More... | |
std::string | getGateAddress () |
Returns the current gate address. More... | |
void | setMaskAddress (const std::string _mask) |
Sets the mask address of the MPIA in-house electronic. More... | |
std::string | getMaskAddress () |
Returns the current mask address. More... | |
void | setLinkTimeout (const unsigned int _timeout) |
Sets the Ethernet connection timeout. More... | |
int | getLinkTimeout () |
Returns the Ethernet connection timeout. More... | |
void | waitForEvent () |
Waits until an event is received in a certain time (timeout). More... | |
std::string | getFatalError () |
Returns the fatal error message. More... | |
void | resetFatalError () |
Resets the fatal error. More... | |
Additional Inherited Members | |
![]() | |
MPIACore (std::string _name, Nice::JointPtr _config, const MPIACoreProtocolPtr _protocol) | |
~MPIACore () | |
template<typename Type > | |
Type | checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default) |
template<typename RT > | |
std::vector< RT > | getVector (const std::string &_str) |
This is a generic method to convert a data string to a vector. More... | |
std::string | name () |
MPIACore (std::string _name, Nice::JointPtr _config, const MPIACoreProtocolPtr _protocol) | |
~MPIACore () | |
template<typename Type > | |
Type | checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default) |
template<typename RT > | |
std::vector< RT > | getVector (const std::string &_str) |
This is a generic method to convert a data string to a vector. More... | |
std::string | name () |
![]() | |
template<typename RT > | |
static RT | getValue (const std::string &_str) |
This is a generic method to convert a data string to a number. More... | |
template<typename RT > | |
static RT | getValue (const std::string &_str) |
This is a generic method to convert a data string to a number. More... | |
![]() | |
std::string | m_name |
std::string | m_address |
member of the connection address More... | |
unsigned int | m_cardNo |
member of the card number More... | |
unsigned int | m_moduleNo |
member of the module number More... | |
HandlerPtr | m_handler |
MPIACoreProtocolPtr | m_protocol |
member of the protocol to communicate with the MPIA in-house electronic. More... | |
Nice::JointPtr | m_config |
member of the root of the configuration tree More... | |
bool | m_warning |
This is the base class of the MPIA in-house electronic cards with the core commands.
The MPIA electronic rack is a generic framework that supports different insertion cards. These insertion cards are backplates for the on-board modules and provide general functionalities as well as keep the general configuration like the network settings. This class represents the generic MPIA in-house electronic card with the functionalities that are supported by all MPIA in-house electronic cards. It has to extend with the specific MPIA in-house electronic card functionalities.
Basda::MPIACoreCard::MPIACoreCard | ( | std::string | _name, |
Nice::JointPtr | _config, | ||
Basda::MPIACoreProtocolPtr | _protocol | ||
) |
Basda::MPIACoreCard::~MPIACoreCard | ( | ) |
Destructor.
Basda::MPIACoreCard::MPIACoreCard | ( | std::string | _name, |
Nice::JointPtr | _config, | ||
Basda::MPIACoreProtocolPtr | _protocol | ||
) |
Basda::MPIACoreCard::~MPIACoreCard | ( | ) |
Destructor.
unsigned int Basda::MPIACoreCard::getCANRate | ( | ) |
Returns the current CAN rate.
The indexes of the baud rates are
unsigned int Basda::MPIACoreCard::getCANRate | ( | ) |
Returns the current CAN rate.
The indexes of the baud rates are
bool Basda::MPIACoreCard::getEventFlag | ( | ) |
Returns the current event message flags.
bool Basda::MPIACoreCard::getEventFlag | ( | ) |
Returns the current event message flags.
std::string Basda::MPIACoreCard::getFatalError | ( | ) |
Returns the fatal error message.
If a fatal error occur the MoCon firmware is executing a software reset immediately. An additional message will be added to the MoCon version string. After that reset all firmware commands over 100 are blocked until the error will be reset with the command resetFatalError()
std::string Basda::MPIACoreCard::getFatalError | ( | ) |
Returns the fatal error message.
If a fatal error occur the MoCon firmware is executing a software reset immediately. An additional message will be added to the MoCon version string. After that reset all firmware commands over 100 are blocked until the error will be reset with the command resetFatalError()
std::string Basda::MPIACoreCard::getGateAddress | ( | ) |
Returns the current gate address.
std::string Basda::MPIACoreCard::getGateAddress | ( | ) |
Returns the current gate address.
bool Basda::MPIACoreCard::getInfoFlag | ( | ) |
Returns the current event message flags.
bool Basda::MPIACoreCard::getInfoFlag | ( | ) |
Returns the current event message flags.
std::string Basda::MPIACoreCard::getIPAddress | ( | ) |
Returns the current IP address.
std::string Basda::MPIACoreCard::getIPAddress | ( | ) |
Returns the current IP address.
int Basda::MPIACoreCard::getLinkTimeout | ( | ) |
Returns the Ethernet connection timeout.
int Basda::MPIACoreCard::getLinkTimeout | ( | ) |
Returns the Ethernet connection timeout.
std::string Basda::MPIACoreCard::getMaskAddress | ( | ) |
Returns the current mask address.
std::string Basda::MPIACoreCard::getMaskAddress | ( | ) |
Returns the current mask address.
std::vector< unsigned int > Basda::MPIACoreCard::getRegistration | ( | ) |
The methods returns all registered module and card that are registered at the MPIA in-house electronic.
std::vector<unsigned int> Basda::MPIACoreCard::getRegistration | ( | ) |
The methods returns all registered module and card that are registered at the MPIA in-house electronic.
unsigned int Basda::MPIACoreCard::getSerialRate | ( | ) |
Returns the current baud rate.
The indexes of the baud rates are
unsigned int Basda::MPIACoreCard::getSerialRate | ( | ) |
Returns the current baud rate.
The indexes of the baud rates are
bool Basda::MPIACoreCard::getXonXoff | ( | ) |
Returns the status of the XOnXOff protocol.
bool Basda::MPIACoreCard::getXonXoff | ( | ) |
Returns the status of the XOnXOff protocol.
void Basda::MPIACoreCard::reset | ( | ) |
Resets the MPIA in-house electronic software and hardware.
If this method is called the electronic card software will be reseted. That leads to a disconnection. The connection and the registration has to be done again.
void Basda::MPIACoreCard::reset | ( | ) |
Resets the MPIA in-house electronic software and hardware.
If this method is called the electronic card software will be reseted. That leads to a disconnection. The connection and the registration has to be done again.
void Basda::MPIACoreCard::resetFatalError | ( | ) |
Resets the fatal error.
It is necessary to execute a software reset to get all command functionality back.
void Basda::MPIACoreCard::resetFatalError | ( | ) |
Resets the fatal error.
It is necessary to execute a software reset to get all command functionality back.
void Basda::MPIACoreCard::setCANRate | ( | const ValueCanRate::Constant | _canRate | ) |
Sets the CAN rate of the CAN bus.
_canRate | the index of the baud rate of the CAN bus |
void Basda::MPIACoreCard::setCANRate | ( | const ValueCanRate::Constant | _canRate | ) |
Sets the CAN rate of the CAN bus.
_canRate | the index of the baud rate of the CAN bus |
void Basda::MPIACoreCard::setEventFlag | ( | const ValueSwitch::Constant | _eventMode | ) |
Sets the event message flag.
_eventMode | if true the MPIA in-house electronic will send event messages |
void Basda::MPIACoreCard::setEventFlag | ( | const ValueSwitch::Constant | _eventMode | ) |
Sets the event message flag.
_eventMode | if true the MPIA in-house electronic will send event messages |
void Basda::MPIACoreCard::setGateAddress | ( | const std::string | _gate | ) |
Sets the gate address of the MPIA in-house electronic.
_gate | the gate address e.g. 192.168.3.1 |
void Basda::MPIACoreCard::setGateAddress | ( | const std::string | _gate | ) |
Sets the gate address of the MPIA in-house electronic.
_gate | the gate address e.g. 192.168.3.1 |
void Basda::MPIACoreCard::setInfoFlag | ( | const ValueSwitch::Constant | _infoMode | ) |
Sets the event message flag.
_infoMode | if true the MPIA in-house electronic will send info messages |
void Basda::MPIACoreCard::setInfoFlag | ( | const ValueSwitch::Constant | _infoMode | ) |
Sets the event message flag.
_infoMode | if true the MPIA in-house electronic will send info messages |
void Basda::MPIACoreCard::setIPAddress | ( | const std::string | _ip | ) |
Sets the IP address of the MPIA in-house electronic.
_ip | the IP address e.g. 192.168.3.33 |
void Basda::MPIACoreCard::setIPAddress | ( | const std::string | _ip | ) |
Sets the IP address of the MPIA in-house electronic.
_ip | the IP address e.g. 192.168.3.33 |
void Basda::MPIACoreCard::setLinkTimeout | ( | const unsigned int | _timeout | ) |
Sets the Ethernet connection timeout.
_timeout | the timeout in seconds (5 - 3600) |
void Basda::MPIACoreCard::setLinkTimeout | ( | const unsigned int | _timeout | ) |
Sets the Ethernet connection timeout.
_timeout | the timeout in seconds (5 - 3600) |
void Basda::MPIACoreCard::setMaskAddress | ( | const std::string | _mask | ) |
Sets the mask address of the MPIA in-house electronic.
_mask | the mask address e.g. 255.255.252.1 |
void Basda::MPIACoreCard::setMaskAddress | ( | const std::string | _mask | ) |
Sets the mask address of the MPIA in-house electronic.
_mask | the mask address e.g. 255.255.252.1 |
void Basda::MPIACoreCard::setSerialRate | ( | const ValueSerialRate::Constant | _baudRate | ) |
Sets the baud rate of the serial interface.
_baudRate | the index of the baud rate of the serial interface |
void Basda::MPIACoreCard::setSerialRate | ( | const ValueSerialRate::Constant | _baudRate | ) |
Sets the baud rate of the serial interface.
_baudRate | the index of the baud rate of the serial interface |
void Basda::MPIACoreCard::setXonXoff | ( | const ValueSwitch::Constant | _enable | ) |
Enables/disables the XOnXOff protocol.
_enable | true to enable to XOnXOff protocol; false disables the XOnXOff protocol |
void Basda::MPIACoreCard::setXonXoff | ( | const ValueSwitch::Constant | _enable | ) |
Enables/disables the XOnXOff protocol.
_enable | true to enable to XOnXOff protocol; false disables the XOnXOff protocol |
std::string Basda::MPIACoreCard::version | ( | ) |
The methods returns the current version string of the MPIA in-house electronic.
The version will be stored in the property:
_config | the root of the configuration tree |
std::string Basda::MPIACoreCard::version | ( | ) |
The methods returns the current version string of the MPIA in-house electronic.
The version will be stored in the property:
_config | the root of the configuration tree |
void Basda::MPIACoreCard::waitForEvent | ( | ) |
Waits until an event is received in a certain time (timeout).
void Basda::MPIACoreCard::waitForEvent | ( | ) |
Waits until an event is received in a certain time (timeout).