Orocos Real-Time Toolkit
2.6.0
|
Old-style SequenceTypeInfo which offers type info for sequences which can be sent over flow ports. More...
#include <rtt/types/SequenceTypeInfo.hpp>
Public Types | |
typedef T | UserType |
The given T parameter is the type for reading DataSources. | |
typedef T | DataType |
The given T parameter is the type of the DataSources. | |
Public Member Functions | |
SequenceTypeInfo (std::string name) | |
bool | installTypeInfoObject (TypeInfo *ti) |
base::AttributeBase * | buildVariable (std::string name, int size) const |
virtual bool | composeType (base::DataSourceBase::shared_ptr dssource, base::DataSourceBase::shared_ptr dsresult) const |
Specialize to resize result given the size of source. | |
virtual bool | resize (base::DataSourceBase::shared_ptr arg, int size) const |
virtual base::DataSourceBase::shared_ptr | decomposeType (base::DataSourceBase::shared_ptr source) const |
Use getMember() for decomposition... | |
virtual std::vector< std::string > | getMemberNames () const |
virtual base::DataSourceBase::shared_ptr | getMember (base::DataSourceBase::shared_ptr item, const std::string &name) const |
virtual base::DataSourceBase::shared_ptr | getMember (base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const |
virtual base::ChannelElementBase::shared_ptr | buildRemoteChannelOutput (base::OutputPortInterface &output_port, types::TypeInfo const *type_info, base::InputPortInterface &input, const ConnPolicy &policy) |
boost::shared_ptr < PrimitiveTypeInfo< T, use_ostream > > | getSharedPtr () |
TypeInfo * | getTypeInfoObject () const |
Returns the TypeInfo object of this type, or null if none exists yet. | |
virtual const std::string & | getTypeName () const |
Return the type name for which this generator generates type info features. | |
virtual std::ostream & | write (std::ostream &os, base::DataSourceBase::shared_ptr in) const |
virtual std::istream & | read (std::istream &os, base::DataSourceBase::shared_ptr out) const |
virtual bool | isStreamable () const |
virtual bool | decomposeType (base::DataSourceBase::shared_ptr source, PropertyBag &targetbag) const |
base::AttributeBase * | buildConstant (std::string name, base::DataSourceBase::shared_ptr dsb) const |
base::AttributeBase * | buildVariable (std::string name) const |
base::AttributeBase * | buildAttribute (std::string name, base::DataSourceBase::shared_ptr in) const |
base::AttributeBase * | buildAlias (std::string name, base::DataSourceBase::shared_ptr in) const |
base::DataSourceBase::shared_ptr | buildActionAlias (base::ActionInterface *action, base::DataSourceBase::shared_ptr in) const |
virtual base::PropertyBase * | buildProperty (const std::string &name, const std::string &desc, base::DataSourceBase::shared_ptr source=0) const |
virtual base::DataSourceBase::shared_ptr | buildValue () const |
virtual base::DataSourceBase::shared_ptr | buildReference (void *ptr) const |
base::InputPortInterface * | inputPort (std::string const &name) const |
base::OutputPortInterface * | outputPort (std::string const &name) const |
base::ChannelElementBase::shared_ptr | buildDataStorage (ConnPolicy const &policy) const |
base::ChannelElementBase::shared_ptr | buildChannelOutput (base::InputPortInterface &port) const |
base::ChannelElementBase::shared_ptr | buildChannelInput (base::OutputPortInterface &port) const |
virtual bool | composeTypeImpl (const PropertyBag &source, typename internal::AssignableDataSource< T >::reference_t result) const |
User, implement this function in case you want to control reading the XML data format. | |
virtual bool | decomposeTypeImpl (typename internal::AssignableDataSource< T >::const_reference_t source, PropertyBag &targetbag) const |
User, implement this function in case you want to control writing the XML data format. | |
virtual base::DataSourceBase::shared_ptr | convertType (base::DataSourceBase::shared_ptr source) const |
Specialize this function to return an alternate type which represents this one in a compatible way. | |
Type building/factory functions | |
Used to create objects that hold data of a certain type. | |
virtual base::AttributeBase * | buildConstant (std::string name, base::DataSourceBase::shared_ptr, int sizehint) const |
Build a non modifyable instance of this type. | |
Conversion to/from text | |
Used to convert data to human readable text and vice versa. | |
virtual std::string | toString (base::DataSourceBase::shared_ptr in) const |
Usability function which converts data to a string. | |
virtual bool | fromString (const std::string &value, base::DataSourceBase::shared_ptr out) const |
Usability function which converts a string to data. | |
Inspecting data structures. | |
Used to write a complex type to an external representation, like XML. | |
virtual bool | getMember (internal::Reference *ref, base::DataSourceBase::shared_ptr item, const std::string &name) const |
Stores a reference to a member of a struct identified by its name. | |
Static Public Member Functions | |
template<typename T > | |
static base::ChannelElementBase * | buildDataStorage (ConnPolicy const &policy, const T &initial_value=T()) |
This method creates the connection element that will store data inside the connection, based on the given policy. | |
template<typename T > | |
static base::ChannelElementBase::shared_ptr | buildChannelOutput (InputPort< T > &port, ConnID *conn_id) |
During the process of building a connection between two ports, this method builds the output part of the channel, that is the half that is connected to the input port. | |
template<typename T > | |
static base::ChannelElementBase::shared_ptr | buildChannelInput (OutputPort< T > &port, ConnID *conn_id, base::ChannelElementBase::shared_ptr output_channel) |
During the process of building a connection between two ports, this method builds the input half (starting from the OutputPort). | |
template<typename T > | |
static base::ChannelElementBase::shared_ptr | buildBufferedChannelInput (OutputPort< T > &port, ConnID *conn_id, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr output_channel) |
Extended version of buildChannelInput that also installs a buffer after the channel input endpoint, according to a policy. | |
template<typename T > | |
static base::ChannelElementBase::shared_ptr | buildBufferedChannelOutput (InputPort< T > &port, ConnID *conn_id, ConnPolicy const &policy, T const &initial_value=T()) |
Extended version of buildChannelOutput that also installs a buffer before the channel output endpoint, according to a policy. | |
template<typename T > | |
static bool | createConnection (OutputPort< T > &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy) |
Creates a connection from a local output_port to a local or remote input_port. | |
template<class T > | |
static bool | createStream (OutputPort< T > &output_port, ConnPolicy const &policy) |
Creates, attaches and checks an outbound stream to an Output port. | |
template<class T > | |
static bool | createStream (InputPort< T > &input_port, ConnPolicy const &policy) |
Creates, attaches and checks an inbound stream to an Input port. | |
static bool | createAndCheckStream (base::OutputPortInterface &output_port, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr chan, StreamConnID *conn_id) |
Static Protected Member Functions | |
static bool | createAndCheckStream (base::InputPortInterface &input_port, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr outhalf, StreamConnID *conn_id) |
static bool | createAndCheckConnection (base::OutputPortInterface &output_port, base::InputPortInterface &input_port, base::ChannelElementBase::shared_ptr channel_input, ConnPolicy policy) |
static base::ChannelElementBase::shared_ptr | createRemoteConnection (base::OutputPortInterface &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy) |
template<class T > | |
static base::ChannelElementBase::shared_ptr | createOutOfBandConnection (OutputPort< T > &output_port, InputPort< T > &input_port, ConnPolicy const &policy) |
This code is for setting up an in-process out-of-band connection. | |
static base::ChannelElementBase::shared_ptr | createAndCheckOutOfBandConnection (base::OutputPortInterface &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr output_half, StreamConnID *conn_id) |
Protected Attributes | |
const std::string | tname |
boost::shared_ptr < PrimitiveTypeInfo< T, use_ostream > > | mshared |
Old-style SequenceTypeInfo which offers type info for sequences which can be sent over flow ports.
Definition at line 17 of file SequenceTypeInfo.hpp.
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildBufferedChannelInput | ( | OutputPort< T > & | port, |
ConnID * | conn_id, | ||
ConnPolicy const & | policy, | ||
base::ChannelElementBase::shared_ptr | output_channel | ||
) | [inline, static, inherited] |
Extended version of buildChannelInput that also installs a buffer after the channel input endpoint, according to a policy.
port | The output port to which the connection will be added by client code. |
conn_id | A unique connection id which identifies this connection |
policy | The policy dictating which kind of buffer must be installed. The transport and other parameters are ignored. |
output_channel | Optional. If present, the buffer will be connected to this element. |
Definition at line 219 of file ConnFactory.hpp.
References RTT::base::ChannelElementBase::setOutput().
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildBufferedChannelOutput | ( | InputPort< T > & | port, |
ConnID * | conn_id, | ||
ConnPolicy const & | policy, | ||
T const & | initial_value = T() |
||
) | [inline, static, inherited] |
Extended version of buildChannelOutput that also installs a buffer before the channel output endpoint, according to a policy.
port | The input port to which the connection is added. |
conn_id | A unique connection id which identifies this connection |
policy | The policy dictating which kind of buffer must be installed. The transport and other parameters are ignored. |
initial_value | The value to use to initialize the connection's storage buffer. |
Definition at line 255 of file ConnFactory.hpp.
References RTT::base::ChannelElementBase::setOutput().
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildChannelInput | ( | OutputPort< T > & | port, |
ConnID * | conn_id, | ||
base::ChannelElementBase::shared_ptr | output_channel | ||
) | [inline, static, inherited] |
During the process of building a connection between two ports, this method builds the input half (starting from the OutputPort).
The output_channel
argument is the connection element that has been returned by buildChannelOutput.
Definition at line 199 of file ConnFactory.hpp.
References RTT::base::ChannelElementBase::setOutput().
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildChannelOutput | ( | InputPort< T > & | port, |
ConnID * | conn_id | ||
) | [inline, static, inherited] |
During the process of building a connection between two ports, this method builds the output part of the channel, that is the half that is connected to the input port.
The returned value is the connection element that should be connected to the end of the input-half.
Definition at line 238 of file ConnFactory.hpp.
AttributeBase * RTT::ValueFactory::buildConstant | ( | std::string | name, |
base::DataSourceBase::shared_ptr | dsb, | ||
int | sizehint | ||
) | const [virtual, inherited] |
Build a non modifyable instance of this type.
sizehint | For variable size instances, use it to hint the size of the instance. |
Definition at line 14 of file ValueFactory.cpp.
static base::ChannelElementBase* RTT::internal::ConnFactory::buildDataStorage | ( | ConnPolicy const & | policy, |
const T & | initial_value = T() |
||
) | [inline, static, inherited] |
This method creates the connection element that will store data inside the connection, based on the given policy.
Contra: needs T in typelib.
Definition at line 139 of file ConnFactory.hpp.
References RTT::ConnPolicy::lock_policy, RTT::ConnPolicy::size, and RTT::ConnPolicy::type.
base::DataSourceBase::shared_ptr CompositionFactory::convertType | ( | base::DataSourceBase::shared_ptr | source | ) | const [virtual, inherited] |
Specialize this function to return an alternate type which represents this one in a compatible way.
For example, a short converts to an long or an enum to an int or a string.
Definition at line 6 of file CompositionFactory.cpp.
bool ConnFactory::createAndCheckStream | ( | base::OutputPortInterface & | output_port, |
ConnPolicy const & | policy, | ||
base::ChannelElementBase::shared_ptr | chan, | ||
StreamConnID * | conn_id | ||
) | [static, inherited] |
Definition at line 122 of file ConnFactory.cpp.
References RTT::base::OutputPortInterface::addConnection(), RTT::types::TypeTransporter::createStream(), RTT::ConnPolicy::data_size, RTT::base::OutputPortInterface::getDataSource(), RTT::base::PortInterface::getName(), RTT::types::TypeInfo::getProtocol(), RTT::types::TypeMarshaller::getSampleSize(), RTT::base::PortInterface::getTypeInfo(), RTT::types::TypeInfo::getTypeName(), RTT::ConnPolicy::name_id, and RTT::ConnPolicy::transport.
static bool RTT::internal::ConnFactory::createConnection | ( | OutputPort< T > & | output_port, |
base::InputPortInterface & | input_port, | ||
ConnPolicy const & | policy | ||
) | [inline, static, inherited] |
Creates a connection from a local output_port to a local or remote input_port.
This function contains all logic to decide on how connections must be created to local or remote input ports.
In order to set up out-of-band communication between input_port and output_port, use a different transport number in the policy parameter than the transport of the input port.
Definition at line 274 of file ConnFactory.hpp.
References RTT::OutputPort< T >::getLastWrittenValue(), RTT::base::PortInterface::getName(), RTT::base::PortInterface::getPortID(), RTT::base::PortInterface::isLocal(), and RTT::ConnPolicy::transport.
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::createOutOfBandConnection | ( | OutputPort< T > & | output_port, |
InputPort< T > & | input_port, | ||
ConnPolicy const & | policy | ||
) | [inline, static, protected, inherited] |
This code is for setting up an in-process out-of-band connection.
This means that both input and output port are present in the same process. This function is used when the policy dictates a transport protocol, but both ports are local.
Definition at line 370 of file ConnFactory.hpp.
References RTT::ConnPolicy::name_id.
static bool RTT::internal::ConnFactory::createStream | ( | OutputPort< T > & | output_port, |
ConnPolicy const & | policy | ||
) | [inline, static, inherited] |
Creates, attaches and checks an outbound stream to an Output port.
output_port | The port to connect the stream to. |
policy | The policy dictating which transport to use. |
Definition at line 327 of file ConnFactory.hpp.
References RTT::ConnPolicy::name_id.
static bool RTT::internal::ConnFactory::createStream | ( | InputPort< T > & | input_port, |
ConnPolicy const & | policy | ||
) | [inline, static, inherited] |
Creates, attaches and checks an inbound stream to an Input port.
input_port | The port to connect the stream to. |
policy | The policy dictating which transport to use. |
Definition at line 345 of file ConnFactory.hpp.
References RTT::ConnPolicy::name_id, and RTT::base::InputPortInterface::removeConnection().
virtual bool RTT::types::TemplateCompositionFactory< T >::decomposeTypeImpl | ( | typename internal::AssignableDataSource< T >::const_reference_t | source, |
PropertyBag & | targetbag | ||
) | const [inline, virtual, inherited] |
User, implement this function in case you want to control writing the XML data format.
Add the structural elements of source to targetbag.
Definition at line 69 of file TemplateCompositionFactory.hpp.
virtual bool RTT::types::MemberFactory::getMember | ( | internal::Reference * | ref, |
base::DataSourceBase::shared_ptr | item, | ||
const std::string & | name | ||
) | const [virtual, inherited] |
Stores a reference to a member of a struct identified by its name.
This method does not allocate memory when item is assignable..
ref | The reference object in which to store the reference. |
item | The item of which to return a reference to a member. It must be assignable, otherwise, a reference to a copy of item will be returned. This copy will allocate memory. |
name | The name of a member within item. |
TypeInfo* RTT::types::PrimitiveTypeInfo< T, use_ostream >::getTypeInfoObject | ( | ) | const [inline, virtual, inherited] |
Returns the TypeInfo object of this type, or null if none exists yet.
Implements RTT::types::TypeInfoGenerator.
Definition at line 83 of file PrimitiveTypeInfo.hpp.
virtual const std::string& RTT::types::PrimitiveTypeInfo< T, use_ostream >::getTypeName | ( | ) | const [inline, virtual, inherited] |
Return the type name for which this generator generates type info features.
This name will be aliased by the TypeInfo object.
Implements RTT::types::TypeInfoGenerator.
Definition at line 87 of file PrimitiveTypeInfo.hpp.
Referenced by RTT::types::EnumTypeInfo< T >::decomposeType().