xc
Public Member Functions | List of all members
XC::Shadow Class Reference

Local object associated with an remote actor. More...

#include <Shadow.h>

Inheritance diagram for XC::Shadow:
Inheritance graph
[legend]
Collaboration diagram for XC::Shadow:
Collaboration graph
[legend]

Public Member Functions

 Shadow (Channel &theChannel, FEM_ObjectBroker &)
 Constructor. More...
 
 Shadow (Channel &theChannel, FEM_ObjectBroker &, ChannelAddress &theAddress)
 Constructor. More...
 
 Shadow (int actorType, FEM_ObjectBroker &, MachineBroker &, int compDemand)
 Constructor. More...
 
virtual int sendObject (MovableObject &theObject)
 Send object. More...
 
virtual int recvObject (MovableObject &theObject)
 Receive object. More...
 
virtual int sendMessage (const Message &theMessage)
 Receive message. More...
 
virtual int recvMessage (Message &theMessage)
 Send message. More...
 
virtual int sendMatrix (const Matrix &theMatrix)
 Send matrix. More...
 
virtual int recvMatrix (Matrix &theMatrix)
 Receive matrix. More...
 
virtual int sendVector (const Vector &theVector)
 Send vector. More...
 
virtual int recvVector (Vector &theVector)
 Receive vector. More...
 
virtual int sendID (const ID &theID)
 Send integer vector. More...
 
virtual int recvID (ID &theID)
 Receive integer vector. More...
 
ChannelAddressgetActorAddressPtr (void) const
 Return a pointer to the channel in the actors address space.
 
- Public Member Functions inherited from XC::ShadowActorBase
 ShadowActorBase (Channel &theChannel, FEM_ObjectBroker &)
 Constructor. More...
 
 ShadowActorBase (int actorType, FEM_ObjectBroker &myBroker, MachineBroker &theMachineBroker, int compDemand)
 Constructor. More...
 
void setCommitTag (int commitTag)
 Set the value for #commitTag.
 
int getCommitTag (void) const
 Return the #commitTag member.
 
ChannelgetChannelPtr (void) const
 Returns a pointer to the object channel theChannel.
 
virtual int barrierCheck (int result)
 barrier check.
 
- Public Member Functions inherited from XC::ObjectWithObjBroker
 ObjectWithObjBroker (FEM_ObjectBroker *)
 Object broker to use. More...
 
 ObjectWithObjBroker (FEM_ObjectBroker &)
 Constructor. Sets the broker.
 
FEM_ObjectBrokergetObjectBrokerPtr (void) const
 Returns a pointer to the broker #theBroker.
 

Additional Inherited Members

- Protected Attributes inherited from XC::ShadowActorBase
ChanneltheChannel
 Communication channel to use.
 
- Protected Attributes inherited from XC::ObjectWithObjBroker
FEM_ObjectBrokertheBroker
 

Detailed Description

Local object associated with an remote actor.

Object associated with an Actor object which may exist in another process. The Shadow acts like a normal object in the users address space, data and processing that is done by the Shadow may be stored and processed in a remote process, the Actor object resides in this remote address space. The Actor and the Shadow both have a Channel, a communication port. This allows the two to communicate with each other.

Constructor & Destructor Documentation

◆ Shadow() [1/3]

XC::Shadow::Shadow ( Channel theChan,
FEM_ObjectBroker myBroker 
)

Constructor.

Sets the channel and the broker.

This constructor is used when the actor process is already up and running. The constructor sets its channel to be theChan, its associated object broker to be myBroker.

◆ Shadow() [2/3]

XC::Shadow::Shadow ( Channel theChan,
FEM_ObjectBroker myBroker,
ChannelAddress theAddress 
)

Constructor.

Sets the channel, the broker, and the address to send data.

This constructor is used when the actor process is already up and running. The constructor sets its channel to be theChan, its associated object broker to be myBroker, and the address to which it will send data to be thaAddress.

◆ Shadow() [3/3]

XC::Shadow::Shadow ( int  actorType,
FEM_ObjectBroker myBroker,
MachineBroker theMachineBroker,
int  compDemand 
)

Constructor.

Sets the channel and the broker and gets the channel from the machine broker.

Member Function Documentation

◆ recvID()

int XC::Shadow::recvID ( ID theID)
virtual

Receive integer vector.

Will cause to read the theID from the channel. It will return the result of invoking recvObj(0,0,theID, theBroker, theActorsAddress) on the shadows associated channel theChannel.

◆ recvMatrix()

int XC::Shadow::recvMatrix ( Matrix theMatrix)
virtual

Receive matrix.

Will cause to read the theMatrix from the channel. It will return the result of invoking recvObj(0,0,theMatrix, theBroker, theActorsAddress) on the shadows associated channel theChannel.

◆ recvMessage()

int XC::Shadow::recvMessage ( Message theMessage)
virtual

Send message.

Will send the theMessage to the actor message through the shadows channel. It returns the result of invoking sendObj(0,0,theMessage, theBroker, theActorsAddress) on the shadow's associated channel theChannel.

◆ recvObject()

int XC::Shadow::recvObject ( MovableObject theObject)
virtual

Receive object.

Will cause the object to read the MovableObject theObject from the channel. It will return the result of invoking recvObj(0,0,theObject, theBroker, theActorsAddress) on the shadows associated channel theChannel.

◆ recvVector()

int XC::Shadow::recvVector ( Vector theVector)
virtual

Receive vector.

Will cause to read the theVector from the channel. It will return the result of invoking recvObj(0,0,theVector, theBroker, theActorsAddress) on the shadows associated channel theChannel.

◆ sendID()

int XC::Shadow::sendID ( const ID theID)
virtual

Send integer vector.

Will send the theID to the actor integer vector through the shadows channel. It returns the result of invoking sendObj(0,0,theID, theBroker, theActorsAddress) on the shadow's associated channel theChannel.

◆ sendMatrix()

int XC::Shadow::sendMatrix ( const Matrix theMatrix)
virtual

Send matrix.

Will send the theMatrix to the actor matrix through the shadows channel. It returns the result of invoking sendObj(0,0,theMatrix, theBroker, theActorsAddress) on the shadow's associated channel theChannel.

◆ sendMessage()

int XC::Shadow::sendMessage ( const Message theMessage)
virtual

Receive message.

Will cause to read the theMessage from the channel. It will return the result of invoking recvObj(0,0,theMessage, theBroker, theActorsAddress) on the shadows associated channel theChannel.

◆ sendObject()

int XC::Shadow::sendObject ( MovableObject theObject)
virtual

Send object.

Will send the MovableObject theObject to the actor object through the shadows channel. It returns the result of invoking sendObj(0,0,theObject, theBroker, theActorsAddress) on the shadow's associated channel theChannel.

◆ sendVector()

int XC::Shadow::sendVector ( const Vector theVector)
virtual

Send vector.

Will send the theVector to the actor vector through the shadows channel. It returns the result of invoking sendObj(0,0,theVector, theBroker, theActorsAddress) on the shadow's associated channel theChannel.


The documentation for this class was generated from the following files: