42 #include <tao/PortableServer/PortableServer.h> 44 #include <omniORB4/CORBA.h> 45 #include <omniORB4/poa.h> 51 #include "../../types/TransportPlugin.hpp" 52 #include "../../types/TypekitPlugin.hpp" 54 #include "../../rt_string.hpp" 77 log(
Error) <<
"Could not send data of type '"<< source->getTypeName()<<
"' : data type not known to CORBA Transport." <<
Logger::endl;
80 return new CORBA::Any();
87 log(
Error) <<
"Could not send data of type '"<< source->getTypeName()<<
"' : data type not known to CORBA Transport." <<
Logger::endl;
105 log(
Error) <<
"Could not update type '"<<target->getTypeName()<<
"' with received data : data type not known to CORBA Transport." <<
Logger::endl;
112 log(
Error) <<
"Could create Stream for port '"<<port->
getName()<<
"' : data type not known to CORBA Transport." <<
Logger::endl;
120 log(
Error) <<
"Could create Channel : data type not known to CORBA Transport." <<
Logger::endl;
128 log(
Error) <<
"Could create outputHalf for port "<<port.
getName()<<
": data type not known to CORBA Transport." <<
Logger::endl;
135 log(
Error) <<
"Could create outputHalf for port "<<port.
getName()<<
": data type not known to CORBA Transport." <<
Logger::endl;
139 CORBA::String_var tname = serv->getPropertyTypeName( CORBA::string_dup(vname.c_str()));
140 log(
Warning) <<
"Corba: Remote property '"<< vname <<
"' has unknown type " << tname.in() << endlog();
145 CORBA::String_var tname = serv->getAttributeTypeName( CORBA::string_dup( vname.c_str()));
146 log(
Warning) <<
"Corba: Remote attribute '"<< vname <<
"' has unknown type " << tname.in() << endlog();
151 bool CorbaLibPlugin::registerTransport(std::string name,
TypeInfo* ti)
153 if ( name ==
"unknown_t")
157 if ( name ==
"double" )
159 if ( name ==
"float" )
161 if ( name ==
"uint" )
163 if ( name ==
"char" )
169 if ( name ==
"bool" )
171 #ifndef RTT_NO_STD_TYPES 172 if ( name ==
"string" )
174 if ( name ==
"array" )
178 if ( name ==
"rt_string")
181 if ( name ==
"void" )
183 if ( name ==
"ConnPolicy")
185 if ( name ==
"TaskContext")
191 std::string CorbaLibPlugin::getTransportName()
const {
195 std::string CorbaLibPlugin::getTypekitName()
const {
199 std::string CorbaLibPlugin::getName()
const {
200 return "rtt-corba-types";
#define ORO_TYPEKIT_PLUGIN(TYPEKIT)
Once you defined your TypekitPlugin or TransportPlugin class, you can use this macro to make it avail...
This protocol is used for all types which did not get a protocol.
The Interface of a TaskContext which exposes its data-flow ports.
const std::string & getName() const
Get the name of this Port.
For each transportable type T, specify the conversion functions.
virtual ChannelElementBase::shared_ptr createStream(base::PortInterface *port, const ConnPolicy &policy, bool is_sender) const
The CORBA transport does not support creating 'CORBA' streams.
virtual base::DataSourceBase::shared_ptr createAttributeDataSource(CService_ptr serv, const std::string &vname)
Base class for CORBA channel servers.
A connection policy object describes how a given connection should behave.
The base class of each OutputPort.
basic_ostreams & endl(basic_ostreams &s)
Flush and newline.
Convenient short notation for every sub-namespace of RTT.
virtual base::DataSourceBase::shared_ptr createDataSource(const CORBA::Any *any) const
Create a Data Source from an any.
virtual CRemoteChannelElement_i * createChannelElement_i(DataFlowInterface *,::PortableServer::POA *poa, bool) const
Builds a channel element for remote transport in both directions.
A class for representing a user type, and which can build instances of that type. ...
virtual base::DataSourceBase::shared_ptr createPropertyDataSource(CService_ptr serv, const std::string &vname)
Create a data source for an attribute or property.
bool addProtocol(int protocol_id, TypeTransporter *tt)
Register a protocol for data transport over a network.
boost::intrusive_ptr< ChannelElementBase > shared_ptr
virtual base::ChannelElementBase * buildChannelOutput(base::InputPortInterface &port, ConnPolicy const &policy) const
Notify the Logger in which 'module' the message occured.
#define ORO_CORBA_PROTOCOL_ID
virtual bool updateAny(base::DataSourceBase::shared_ptr source, CORBA::Any &any) const
Evaluate source and update an any which contains the value of source.
The CORBA transport plugin.
virtual CORBA::Any * createAny(DataSourceBase::shared_ptr source) const
Evaluate source and create an any which contains the value of source.
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
In the data flow implementation, a channel is created by chaining ChannelElementBase objects...
The base class of every data flow port.
CorbaFallBackProtocol(bool do_warn=true)
virtual base::ChannelElementBase * buildDataStorage(ConnPolicy const &policy) const
Extends the TypeTransporter in order to allow the creation of channel elements or output halves for a...
virtual base::ChannelElementBase * buildChannelInput(base::OutputPortInterface &port, ConnPolicy const &policy) const
virtual bool updateFromAny(const CORBA::Any *blob, DataSourceBase::shared_ptr target) const
Update target with the contents of blob which is an object of a protocol.