/** * * Set the port name of a contact. * */ YARP_DEFINE(int) yarpContactSetName(yarpContactPtr contact, const char *name) { YARP_OK(contact); // contact class is very awkward YARP_CONTACT(contact) = Contact::byName(name); return 0; }
/** * * Open a port, using advanced contact information. * */ YARP_DEFINE(int) yarpPortOpenEx(yarpPortPtr port, yarpContactPtr contact) { YARP_OK(port); YARP_OK(contact); bool ok = YARP_PORT(port).open(YARP_CONTACT(contact)); return ok?0:-1; }