Posers are created within a module using the following syntax:
int hdl = 13; // handle should be unique
myMessage *m = new myMessage;
m->someData = 34;
POSE_create(mySim(m), hdl, 0);
This creates a mySim object that comes into existence at simulation time zero, and can be referred to by the handle 13.
Creating a poser from outside the module (i.e. from main) is somewhat more complex:
int hdl = 13;
myMessage *m = new myMessage;
m->someData = 34;
m->Timestamp(0);
(*(CProxy_mySim *) & POSE_Objects)[hdl].insert(m);
This is similar to what the module code ultimately gets translated to and should be replaced by a macro with similar syntax soon.
October 08, 2008
POSE Homepage
Charm Homepage