next up previous contents
Next: Rotor Up: Elements Previous: Loadable Element   Contents

Subsections

Output Elements

Output elements take care of inter-process communication. These elements can use specific communication means, depending on the type of simulation they are used for, and can communicate specific types of data.


Stream output

This is a special element which takes care of sending output to external processes by means of either local or inet sockets during batch or real-time simulations. This topic is under development, so expect frequent changes, and please do not count too much on backward compatibility.

The syntax is:

    <elem_type> ::= stream output

    <arglist> ::=
        stream name , " <stream_name> " ,
        create , { yes | no } ,
        [ { local , " <socket_name> " , |
            [ port , <port_number> , ]
            [ host , " <host_name> " , ] } ]
        [ { [ no ] signal
            | [ non ] blocking
            | [ no ] send first
            | [ do not ] abort if broken } [ , ... ] , ]
        [ output every, <steps> , ]
        [ echo , <file_name>
            [ , precision , <precision> ]
            [ , shift , <shift> ] , ]
        <content>
The stream output allows MBDyn to send streamed outputs to remote processes during both batch and real-time simulations, using sockets either in the local or in the inet namespace. If the simulation is run in real-time using RTAI, RTAI mailboxes are used instead.

This element, when used with the motion content type, obsoletes the stream motion output element (see Section 8.19.3). When the simulation is executed in real-time using RTAI, this element obsoletes the RTAI output element (see Section 8.19.2).

Streamed output

Different types of data can be sent. The most general form is called values, consisting in an arbitrary set of independent scalar channels. A form specifically intended to communicate the motion of a mechanical system is called motion, consisting in a subset of the kinematics of a set of structural nodes:
    <content> ::= { <values> | <motion> }

    <values> ::= [ values , ]
        <channel_number> ,
            <value>
            [ , ... ]

    <value> ::= {
        [ nodedof , ] (node_dof) <output_dof>
        | drive , (DriveCaller) <drive_data>
    }

    <motion> ::= motion ,
        [ output flags ,
            { position
            | orientation matrix
            | orientation matrix transpose
            | velocity
            | angular velocity } [ , ... ] , ]
        { all | <struct_node_label> [ , ... ] }
where

Non real-time simulation

During non real-time simulations, streams operate in blocking mode. The meaning of the parameters is: If no socket type is specified, i.e. none of the local, port and host keywords are given, a socket is opened by default in the internet namespace with the default IP and port; the create keyword is mandatory.

Real-time simulation

During real-time simulations, streams wrap non-blocking RTAI mailboxes. The meaning of the parameters is:


RTAI output

This element is actually used only when the simulation is scheduled using RTAI; otherwise, the corresponding stream output element is used (see Section 8.19.1). As a consequence, its explicit use is discouraged and deprecated. The stream output element should be used instead.


Stream motion output

This element type is obsoleted by the stream output element with the motion content type (see Section 8.19.3). The syntax is:
    <elem_type> ::= stream motion output

    <arglist> ::= 
        stream name , " <stream_name> " ,
        create , { yes | no } ,
        [ { local , " <socket_name> " , |
            [ port , <port_number> , ]
            [ host , " <host_name> " , ] } ]
        [ { [ no ] signal
            | [ non ] blocking
            | [ no ] send first
            | [ do not ] abort if broken } [ , ... ] , ]
        <motion>
Its support may be discontinued in the future.


Structural output

TODO.


next up previous contents
Next: Rotor Up: Elements Previous: Loadable Element   Contents
MBDyn: MultiBody Dynamics Software
Document version: 1.X-Devel
Last update: Wed Oct 28, 2009
Maintained by mbdyn@aero.polimi.it