Public Member Functions | Private Attributes | List of all members
OCL::HMIConsoleOutput Class Reference

This component can be used to display messages on the standard output. More...

#include <HMIConsoleOutput.hpp>

Inheritance diagram for OCL::HMIConsoleOutput:
Inheritance graph
[legend]

Public Member Functions

void display (const std::string &what)
 Display a message on standard output. More...
 
void displayBool (bool what)
 Display a boolean on standard output. More...
 
void displayDouble (double what)
 Display a double on standard output. More...
 
void displayInt (int what)
 Display an integer on standard output. More...
 
template<class T >
void dolog (const T &what)
 
void enableColor (bool yesno=true)
 
template<class T >
void enqueue (const T &what)
 
 HMIConsoleOutput (const std::string &name="cout")
 
void log (const std::string &what)
 
void logBool (bool what)
 Log a boolean on standard output. More...
 
void logDouble (double what)
 Log a double on standard output. More...
 
void logInt (int what)
 Log an integer on standard output. More...
 
void setPrompt (const std::string &prompt)
 
void updateHook ()
 
 ~HMIConsoleOutput ()
 
- Public Member Functions inherited from RTT::TaskContext
bool addAttribute (const std::string &name, T &attr)
 
bool addAttribute (base::AttributeBase &a)
 
bool addAttribute (base::AttributeBase &a)
 
bool addAttribute (const std::string &name, T &attr)
 
bool addConstant (const std::string &name, const T &attr)
 
bool addConstant (const std::string &name, const T &attr)
 
base::InputPortInterfaceaddEventPort (const std::string &name, base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
base::InputPortInterfaceaddEventPort (base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
Operation< Signature > & addOperation (Operation< Signature > &op)
 
Operation< Signature > & addOperation (Operation< Signature > &op)
 
Operation< typename internal::GetSignature< Func >::Signature > & addOperation (const std::string name, Func func, Service *serv, ExecutionThread et=ClientThread)
 
Operation< Signature > & addOperation (const std::string name, Signature *func, ExecutionThread et=ClientThread)
 
Operation< typename internal::GetSignature< Func >::Signature > & addOperation (const std::string name, Func func, Service *serv, ExecutionThread et=ClientThread)
 
Operation< Signature > & addOperation (const std::string name, Signature *func, ExecutionThread et=ClientThread)
 
virtual bool addPeer (TaskContext *peer, std::string alias="")
 
virtual bool addPeer (TaskContext *peer, std::string alias="")
 
base::PortInterfaceaddPort (const std::string &name, base::PortInterface &port)
 
base::PortInterfaceaddPort (base::PortInterface &port)
 
Property< T > & addProperty (const std::string &name, T &attr)
 
bool addProperty (base::PropertyBase &pb)
 
Property< T > & addProperty (const std::string &name, T &attr)
 
bool addProperty (base::PropertyBase &pb)
 
ConfigurationInterfaceattributes ()
 
ConfigurationInterfaceattributes ()
 
virtual void clear ()
 
virtual bool connectPeers (TaskContext *peer)
 
virtual bool connectPeers (TaskContext *peer)
 
virtual bool connectPorts (TaskContext *peer)
 
virtual bool connectServices (TaskContext *peer)
 
virtual bool connectServices (TaskContext *peer)
 
virtual void disconnect ()
 
virtual void disconnect ()
 
virtual void disconnectPeers (const std::string &name)
 
virtual void disconnectPeers (const std::string &name)
 
base::ActivityInterfacegetActivity ()
 
T * getActivity ()
 
base::AttributeBasegetAttribute (const std::string &name) const
 
base::AttributeBasegetAttribute (const std::string &name) const
 
virtual const std::string & getName () const
 
OperationInterfacePartgetOperation (std::string name)
 
OperationInterfacePartgetOperation (std::string name)
 
virtual TaskContextgetPeer (const std::string &peer_name) const
 
virtual TaskContextgetPeer (const std::string &peer_name) const
 
virtual PeerList getPeerList () const
 
virtual PeerList getPeerList () const
 
base::PortInterfacegetPort (const std::string &name) const
 
base::PropertyBasegetProperty (const std::string &name) const
 
base::PropertyBasegetProperty (const std::string &name) const
 
boost::shared_ptr< ServiceType > getProvider (const std::string &name)
 
boost::shared_ptr< ServiceType > getProvider (const std::string &name)
 
virtual bool hasPeer (const std::string &peer_name) const
 
virtual bool hasPeer (const std::string &peer_name) const
 
bool loadService (const std::string &service_name)
 
bool loadService (const std::string &service_name)
 
OperationInterfaceoperations ()
 
OperationInterfaceoperations ()
 
DataFlowInterfaceports ()
 
const DataFlowInterfaceports () const
 
PropertyBagproperties ()
 
PropertyBagproperties ()
 
Service::shared_ptr provides (const std::string &service_name)
 
Service::shared_ptr provides ()
 
Service::shared_ptr provides ()
 
Service::shared_ptr provides (const std::string &service_name)
 
virtual bool ready ()
 
virtual void removePeer (const std::string &name)
 
virtual void removePeer (TaskContext *peer)
 
virtual void removePeer (TaskContext *peer)
 
virtual void removePeer (const std::string &name)
 
ServiceRequester::shared_ptr requires (const std::string &service_name)
 
ServiceRequester::shared_ptr requires (const std::string &service_name)
 
ServiceRequester::shared_ptr requires ()
 
ServiceRequester::shared_ptr requires ()
 
bool setActivity (base::ActivityInterface *new_act)
 
virtual bool start ()
 
virtual bool stop ()
 
 TaskContext (const std::string &name, TaskState initial_state=Stopped)
 
virtual ~TaskContext ()
 
- Public Member Functions inherited from RTT::base::TaskCore
virtual bool activate ()
 
virtual bool activate ()
 
virtual bool cleanup ()
 
virtual bool cleanup ()
 
virtual bool configure ()
 
virtual bool configure ()
 
const ExecutionEngineengine () const
 
ExecutionEngineengine ()
 
virtual void error ()
 
virtual void error ()
 
virtual unsigned getCpuAffinity () const
 
virtual unsigned getCpuAffinity () const
 
unsigned int getCycleCounter () const
 
unsigned int getIOCounter () const
 
virtual Seconds getPeriod () const
 
virtual Seconds getPeriod () const
 
virtual TaskState getTargetState () const
 
virtual TaskState getTaskState () const
 
unsigned int getTimeOutCounter () const
 
unsigned int getTriggerCounter () const
 
virtual bool inException () const
 
virtual bool inException () const
 
virtual bool inFatalError () const
 
virtual bool inFatalError () const
 
virtual bool inRunTimeError () const
 
virtual bool inRunTimeError () const
 
virtual bool isActive () const
 
virtual bool isActive () const
 
virtual bool isConfigured () const
 
virtual bool isConfigured () const
 
virtual bool isRunning () const
 
virtual bool isRunning () const
 
virtual bool recover ()
 
virtual bool recover ()
 
virtual bool setCpuAffinity (unsigned cpu)
 
virtual bool setCpuAffinity (unsigned cpu)
 
virtual bool setPeriod (Seconds s)
 
virtual bool setPeriod (Seconds s)
 
 TaskCore (TaskState initial_state=Stopped, const std::string &name=std::string())
 
virtual bool trigger ()
 
virtual bool trigger ()
 
virtual bool update ()
 
virtual bool update ()
 
virtual ~TaskCore ()
 

Private Attributes

std::string _prompt
 
std::ostringstream backup
 
std::string coloroff
 
std::string coloron
 
RTT::os::Mutex log_lock
 
std::ostringstream logbackup
 
std::ostringstream logmessages
 
std::ostringstream messages
 
RTT::os::Mutex msg_lock
 

Additional Inherited Members

- Public Types inherited from RTT::TaskContext
typedef std::vector< std::string > PeerList
 
typedef boost::function< void(base::PortInterface *)> SlotFunction
 
- Public Types inherited from RTT::base::TaskCore
enum  TaskState
 
- Public Attributes inherited from RTT::base::TaskCore
 Exception
 
 FatalError
 
 Init
 
 PreOperational
 
 Running
 
 RunTimeError
 
 Stopped
 
- Protected Member Functions inherited from RTT::TaskContext
virtual void dataOnPortCallback (base::PortInterface *port)
 
virtual bool dataOnPortHook (base::PortInterface *port)
 
void forceActivity (base::ActivityInterface *new_act)
 
- Protected Member Functions inherited from RTT::base::TaskCore
virtual bool breakUpdateHook ()
 
virtual void cleanupHook ()
 
virtual bool configureHook ()
 
virtual void errorHook ()
 
virtual void exception ()
 
virtual void exceptionHook ()
 
virtual void fatal ()
 
virtual bool startHook ()
 
virtual void stopHook ()
 
- Protected Attributes inherited from RTT::base::TaskCore
ExecutionEngineee
 
unsigned int mCycleCounter
 
unsigned int mIOCounter
 
std::string mName
 
TaskState mTaskState
 
unsigned int mTimeOutCounter
 
unsigned int mTriggerCounter
 
bool mTriggerOnStart
 

Detailed Description

This component can be used to display messages on the standard output.

It is known as the 'cout' component in scripts.

HMI == Human-Machine Interface

Definition at line 50 of file HMIConsoleOutput.hpp.

Constructor & Destructor Documentation

OCL::HMIConsoleOutput::HMIConsoleOutput ( const std::string &  name = "cout")
inline

Definition at line 65 of file HMIConsoleOutput.hpp.

OCL::HMIConsoleOutput::~HMIConsoleOutput ( )
inline

Definition at line 81 of file HMIConsoleOutput.hpp.

Member Function Documentation

void OCL::HMIConsoleOutput::display ( const std::string &  what)
inline

Display a message on standard output.

Definition at line 131 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::displayBool ( bool  what)
inline

Display a boolean on standard output.

Definition at line 163 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::displayDouble ( double  what)
inline

Display a double on standard output.

Definition at line 179 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::displayInt ( int  what)
inline

Display an integer on standard output.

Definition at line 171 of file HMIConsoleOutput.hpp.

template<class T >
void OCL::HMIConsoleOutput::dolog ( const T &  what)
inline

Definition at line 185 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::enableColor ( bool  yesno = true)
inline

Enable or disable using a colored prompt.

Definition at line 108 of file HMIConsoleOutput.hpp.

template<class T >
void OCL::HMIConsoleOutput::enqueue ( const T &  what)
inline

Put a message in the queue. The message must be convertible to a stream using operator<<().

Definition at line 142 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::log ( const std::string &  what)
inline

Definition at line 203 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::logBool ( bool  what)
inline

Log a boolean on standard output.

Definition at line 210 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::logDouble ( double  what)
inline

Log a double on standard output.

Definition at line 226 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::logInt ( int  what)
inline

Log an integer on standard output.

Definition at line 218 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::setPrompt ( const std::string &  prompt)
inline

Set the prompt text.

Definition at line 122 of file HMIConsoleOutput.hpp.

void OCL::HMIConsoleOutput::updateHook ( )
inlinevirtual

Reimplemented from RTT::base::TaskCore.

Definition at line 86 of file HMIConsoleOutput.hpp.

Member Data Documentation

std::string OCL::HMIConsoleOutput::_prompt
private

Definition at line 55 of file HMIConsoleOutput.hpp.

std::ostringstream OCL::HMIConsoleOutput::backup
private

Definition at line 57 of file HMIConsoleOutput.hpp.

std::string OCL::HMIConsoleOutput::coloroff
private

Definition at line 54 of file HMIConsoleOutput.hpp.

std::string OCL::HMIConsoleOutput::coloron
private

Definition at line 53 of file HMIConsoleOutput.hpp.

RTT::os::Mutex OCL::HMIConsoleOutput::log_lock
private

Definition at line 62 of file HMIConsoleOutput.hpp.

std::ostringstream OCL::HMIConsoleOutput::logbackup
private

Definition at line 59 of file HMIConsoleOutput.hpp.

std::ostringstream OCL::HMIConsoleOutput::logmessages
private

Definition at line 58 of file HMIConsoleOutput.hpp.

std::ostringstream OCL::HMIConsoleOutput::messages
private

Definition at line 56 of file HMIConsoleOutput.hpp.

RTT::os::Mutex OCL::HMIConsoleOutput::msg_lock
private

Definition at line 61 of file HMIConsoleOutput.hpp.


The documentation for this class was generated from the following file:


ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:20