ToolTalk User's Guide

Updating Object Specs

To update existing object spec properties, use tt_spec_prop_set and tt_spec_prop_add specifying the objid of the existing spec. Once the spec properties are updated, use tt_spec_write to write the changes into the ToolTalk database.

When you are updating an existing spec and the ToolTalk service returns TT_WRN_STALE_OBJID when you call tt_spec_write, it has found a forwarding pointer to the object in the ToolTalk database that indicates the object has been moved. To obtain the new objid, create an object message that contains the old objid and send it. The ToolTalk service will return the same status code, TT_WRN_STALE_OBJID, but updates the message objid attribute to contain the new objid. Use tt_message_object to retrieve the new objid from the message and put the new objid into your internal data structure.