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;
127 log(
Error) <<
"Could create outputHalf for port "<<port.
getName()<<
": data type not known to CORBA Transport." <<
Logger::endl;
134 log(
Error) <<
"Could create outputHalf for port "<<port.
getName()<<
": data type not known to CORBA Transport." <<
Logger::endl;
138 CORBA::String_var tname = serv->getPropertyTypeName( CORBA::string_dup(vname.c_str()));
139 log(
Warning) <<
"Corba: Remote property '"<< vname <<
"' has unknown type " << tname.in() << endlog();
144 CORBA::String_var tname = serv->getAttributeTypeName( CORBA::string_dup( vname.c_str()));
145 log(
Warning) <<
"Corba: Remote attribute '"<< vname <<
"' has unknown type " << tname.in() << endlog();
150 bool CorbaLibPlugin::registerTransport(std::string name,
TypeInfo* ti)
152 if ( name ==
"unknown_t")
156 if ( name ==
"double" )
158 if ( name ==
"float" )
160 if ( name ==
"uint" )
162 if ( name ==
"llong" )
164 if ( name ==
"ullong" )
166 if ( name ==
"char" )
172 if ( name ==
"bool" )
174 #ifndef RTT_NO_STD_TYPES 175 if ( name ==
"string" )
177 if ( name ==
"array" )
181 if ( name ==
"rt_string")
184 if ( name ==
"void" )
186 if ( name ==
"ConnPolicy")
188 if ( name ==
"TaskContext")
194 std::string CorbaLibPlugin::getTransportName()
const {
198 std::string CorbaLibPlugin::getTypekitName()
const {
202 std::string CorbaLibPlugin::getName()
const {
203 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.
Base class for CORBA channel servers.
A connection policy object describes how a given connection should behave.
virtual CRemoteChannelElement_i * createChannelElement_i(DataFlowInterface *,::PortableServer::POA *poa, const ConnPolicy &) const
Builds a channel element for remote transport in both directions.
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.
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
virtual base::DataSourceBase::shared_ptr createAttributeDataSource(CService_ptr serv, const std::string &vname, bool)
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.