RobWorkProject  23.9.11-
Public Types | Public Member Functions | Public Attributes | List of all members
Mathematica::Link Struct Reference

Representation of a link. More...

#include <Mathematica.hpp>

Public Types

typedef rw::core::Ptr< const LinkPtr
 Smart pointer to a link.
 

Public Member Functions

 Link ()
 Constructor.
 
 ~Link ()
 Destructor.
 
bool isOpen () const
 Check if the link is open. More...
 
bool ready () const
 Check if there is anything available on link. More...
 
bool wait () const
 Wait until packet becomes available. More...
 
const Linkoperator<< (const Packet &packet) const
 Send packet on link. More...
 
const Linkoperator<< (const Expression &expression) const
 Send an expression on link in a EvaluatePacket. More...
 
const Linkoperator<< (const ToExpression &expression) const
 Send a text string with an expression on link in a EvaluatePacket. More...
 
void operator>> (rw::core::Ptr< Packet > &result) const
 Get the next packet on link (blocks until packet is available). More...
 

Public Attributes

std::string name
 Name of the link if name was given.
 
rw::core::Ptr< const LinkImpl > impl
 Internals.
 

Detailed Description

Representation of a link.

Member Function Documentation

◆ isOpen()

bool isOpen ( ) const

Check if the link is open.

Returns
true if open, false otherwise.

◆ operator<<() [1/3]

const Link& operator<< ( const Expression expression) const

Send an expression on link in a EvaluatePacket.

Parameters
expression[in] the expression to send.
Returns
a reference to the link for chaining.

◆ operator<<() [2/3]

const Link& operator<< ( const Packet packet) const

Send packet on link.

Parameters
packet[in] the packet to send.
Returns
a reference to the link for chaining.

◆ operator<<() [3/3]

const Link& operator<< ( const ToExpression expression) const

Send a text string with an expression on link in a EvaluatePacket.

Parameters
expression[in] the expression to send.
Returns
a reference to the link for chaining.

◆ operator>>()

void operator>> ( rw::core::Ptr< Packet > &  result) const

Get the next packet on link (blocks until packet is available).

Parameters
result[out] a pointer to the retrieved packet.

◆ ready()

bool ready ( ) const

Check if there is anything available on link.

Returns
true if a packet is available.

◆ wait()

bool wait ( ) const

Wait until packet becomes available.

Returns
false if error occurred.

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