VOS Object Type Definition

property

OTD #001; Revision 3.

Group: property.

Stores data. You can read and write all or part of the data, or replace it all in one big swoop. Data also has metadata, or data type. You can "listen" to a property and get an "update" message when the property changes.

Authors

Vos Developers, InterReality (http://www.interreality.org)

Child Objects

this type expects no child objects.

Messages

 

read []

Request value data from a property. The entire value may be requested, or a subset of the value (as bytes). To request the entire value, use "0" for "start" and "-1" for "length".

Fields:

start (optional)

Byte offset of desired subset (inclusive). The first byte is 0.

length (optional)

Number of bytes to return, starting at "start" field. A value of "-1" means "until the end".

Replies:

 

update []

Notification of new property data to overwrite old data, beginning with a given byte offset. Also includes data type (in case this is the first update). Also may indicate any error that has occured.

Fields:

error (optional)

The presence of this field indicates that an error occured in acting on the message referred to by the "in-reply-to" field. In this condition, no other field will be present; usually they all are. The value of this field describes the error.

data (optional)

The (new) property data.

start (optional)

The byte offset of the "data" field, within the whole property value. This field is used when only a subset of the property is being communicated (e.g. only some of the value has changed).

datatype (optional)

A data type identifier. The syntax is described in "typechain.txt". The datatype indicates the format or type of the property data.

Replies:

 

write []

Use this message to overwrite property data, starting with a given byte offset.

Fields:

start (optional)

Byte offset of the new data. The old data will be overwritten beginning with this offset (possibly increasing the length of the data).

data (optional)

The new data.

Replies:

 

replace []

Replace whole value of property data (possibly increasing or decreasing the length of the data), and set new datatype.

Fields:

data (optional)

New data.

datatype (optional)

New data type indentifier. The syntax of this identifier is described in "typechain.txt".

Replies:

 

replace-update []

Notification that property data should be entirely replaced by new data with a new datatype.

Fields:

data (optional)

New data.

datatype (optional)

New datatype. The syntax of the data type identifier is described in "typechain.txt".

Replies:

 

get-length []

Request number of bytes in property's value.

Fields:

Replies:

 

length-update []

Notification of number of bytes in property's value. May also indicate an error.

Fields:

error (optional)

The presence of this field (and it may be the only one) indicates that an error occured in acting on the message referred to by the "in-reply-to" field. The value of this field describes the error.

len (optional)

Number of bytes in property's value.

Replies:

 

start-listening []

Start listening to this object: If the "listen" field contains the value "property", a "property:update" or "property:replace-update" message is sent immediatly after the property changes.

Fields:

listen (optional)

Must be "property" to recieve property updates.

Replies:

 

stop-listening []

Stop listening to this object: If the "listen" field contains the value "property", updates will no longer be sent.

Fields:

listen (optional)

Must be "property" to stop property updates.

Replies:

History of this document

Revision 0 (Mon Sep 24 20:56:59 EDT 2001):
Created. (rh)
Revision 1 (Thu Dec 6 11:19:24 EST 2001):
Modified (rh)
Revision 2 (Wed Mar 13 13:07:26 EST 2002):
Updated to new DTD (reorganization of messages and replies, and history) [rh]
Revision (Tue Aug 27 01:35:57 EDT 2002):
Changed group to "property".