67 #include "xc_utils/src/nucleo/EntCmd.h" 77 class FEM_ObjectBroker;
88 static int numChannel;
90 std::set<int> usedDbTags;
96 inline virtual ~
Channel(
void) {}
99 virtual char *addToProgram(
void) =0;
100 virtual int setUpConnection(
void) =0;
104 virtual bool isDatastore(
void)
const;
105 virtual int getDbTag(
void)
const;
108 void clearDbTags(
void);
109 int getTag(
void)
const;
114 template <
class inputIterator>
115 int sendObjs(
int commitTag,
const inputIterator &first,
const inputIterator &last,
ChannelAddress *theAddress=
nullptr);
116 template <
class inputIterator>
119 virtual int sendMsg(
int dbTag,
int commitTag,
const Message &,
ChannelAddress *theAddress=
nullptr) =0;
122 virtual int sendMatrix(
int dbTag,
int commitTag,
const Matrix &,
ChannelAddress *theAddress=
nullptr) =0;
123 virtual int recvMatrix(
int dbTag,
int commitTag,
Matrix &,
ChannelAddress *theAddress=
nullptr) =0;
125 virtual int sendVector(
int dbTag,
int commitTag,
const Vector &,
ChannelAddress *theAddress=
nullptr) =0;
126 virtual int recvVector(
int dbTag,
int commitTag,
Vector &,
ChannelAddress *theAddress=
nullptr) =0;
128 virtual int sendID(
int dbTag,
int commitTag,
const ID &,
ChannelAddress *theAddress=
nullptr) =0;
129 virtual int recvID(
int dbTag,
int commitTag,
ID &,
ChannelAddress *theAddress=
nullptr) =0;
133 template <
class inputIterator>
137 for(inputIterator i= first;i!=last;i++)
139 retval= sendObj(commitTag,*i,theAddress);
147 template <
class inputIterator>
151 for(inputIterator i= first;i!=last;i++)
153 retval= recvObj(commitTag,*i,ob,theAddress);
int sendObjs(int commitTag, const inputIterator &first, const inputIterator &last, ChannelAddress *theAddress=nullptr)
Send the objects on interval [first,last).
Definition: Channel.h:134
const ID & getUsedTags(void) const
Return the lista de dbTags usados.
Definition: Channel.cpp:86
FEM_ObjectBroker is is an object broker class for the finite element method. All methods are virtual ...
Definition: FEM_ObjectBroker.h:138
int receiveMovable(int commitTag, MovableObject &, FEM_ObjectBroker &)
Recibe el objeto a través de éste canal.
Definition: Channel.cpp:126
Definition: ChannelAddress.h:69
Object that can move between processes.
Definition: MovableObject.h:91
int sendMovable(int commitTag, MovableObject &)
Envía el objeto a través de éste canal.
Definition: Channel.cpp:119
Channel(void)
Constructor.
Definition: Channel.cpp:73
Channel is an abstract base class which defines the channel interface. A channel is a point of commun...
Definition: Channel.h:85
Message between processes.
Definition: Message.h:67
================================================================================
Definition: ContinuaReprComponent.h:34
int recvObjs(int commitTag, const inputIterator &first, const inputIterator &last, FEM_ObjectBroker &, ChannelAddress *theAddress=nullptr)
Recibe una serie de objetos.
Definition: Channel.h:148
bool checkDbTag(const int &dbTag)
Comprueba si ya se ha usado este dbTag.
Definition: Channel.cpp:98