Download Message Passing Tools for Software Integration

Transcript
int objectmv(namel, name2)
char *namel, *name2;
This routine renames a message data object frome namel to name2. If an object of
namel does not exist, the routine will return -1. Otherwise the routine will return 0.
If an object of name2 already exists in the world of objects, it will be overwritten.
int object_exists (name)
char *name;
This routine tests whether the object refered to by name exists in the world of
object. It returns 1 if it does exist, and 0 otherwise.
char **objects(argc)
int *argc;
This routine routine returns a list of all objects in the world. The returned list is an
array of character strings (argv style). If there are no objects in the world, then an
empty list will be returned. The argc argument is a pointer to a pre-allocated integer. If it is not NULL, then it will be filled in with the number of elements in the
returned list. The returned list will be overwritten on successive calls to the
objects routine. If it is desired to save the list, then it must be copied before the
next call to objects.
void object_slot_set(name, slot, value, type, length)
char *name, *slot;
void *value;
int type, length;
This routine sets a slot within the object refererred to by the name argument. If the
object does not already exist, it will be created. The slot argument is a case sensitive
ASCII string (starting with a letter) which will be used to refer to the slot. The value
argument is a pointer to data which will be copied into the slot. This data is a single
or array of one of the types described in table 23. The type argument specifies the
type of the data and is the integer type value. These type values are also defines as
macros of the type names within the library header file. The length argument, is the
number of elements of the specified type to which value points. For example, to set
a slot to contain a vector of three signed long integers, the value argument would be
a pointer to an array containing three ints, the type would be 9 (or OB_SLONG),
and the length would be 3. This routine copies the data into the message object, so
any further manupilation of the original value will not be reflected within the
object.
void object_slot_rm(name, slot)
char *name, *slot;
This routine removes a slot refered by the slot argument, from the object refered by
the name argument. If the object does not exist in the world, or the slot does not
exist within the object, then the routine will do nothing.
void object_slot_mv(name, slotl, slot2)
char *name, *slotl, *slot2;
This routine renames the slot within the object refered by name, from slotl to slot2.
If the object or slot does not exist, the routine will return -1, otherwise it will return
0. If the destination name refered by slot2 already exists within the object, it will be
overwritten.
Table 24: C Library Routines for Message Packaging
Page 74