Introduction Manual Class Reference Header Reference

zoidcom_node.h File Reference


Detailed Description

Go to the source code of this file.

Classes

class  ZCom_Node
 ZCom_Node represents one networkable object. More...

Size constants for bitstream embedded data

#define ZCOM_FTRANS_CHUNK_BITS   16
 Size of file chunk ID.
#define ZCOM_FTRANS_ID_BITS   32
 Size of file transfer ID.
#define ZCOM_FTRANS_SIZE_BITS   32
 Size of file length information.

Data replication flags (how to replicate)



#define ZCOM_REPFLAG_INTERCEPT   (1L << 4)
 This data will generate intercept events when an interceptor is assigned.
#define ZCOM_REPFLAG_MOSTRECENT   (1L << 1)
 Replicate reliable, always sending the most recent version of the data.
#define ZCOM_REPFLAG_NONE   0
 no flags
#define ZCOM_REPFLAG_ONLYONCE   (1L << 3)
#define ZCOM_REPFLAG_RARELYCHANGED   (1L << 2)
 Data changes seldomly.
#define ZCOM_REPFLAG_SETUPAUTODELETE   (1L << 6)
 Automatically delete ZCom_ReplicatorSetup object when replicator gets deleted.
#define ZCOM_REPFLAG_SETUPPERSISTS   (1L << 5)
 Allow reference to ZCom_ReplicatorSetup object.
#define ZCOM_REPFLAG_STARTCLEAN   (1L << 7)
 Tell replicator to start clean, i.e. don't mark data dirty.
#define ZCOM_REPFLAG_UNRELIABLE   (1L << 0)
 Replicate unreliably.

Data & event replication rules (when to replicate)

Note:
For event sending, replication rules are only applied to the node from which events are sent. That means that events are not forwarded on the authority automatically if ZCOM_REPRULE_AUTH_2_ALL is used for sending an event from a proxy or owner node.


#define ZCOM_REPRULE_AUTH_2_ALL   (ZCOM_REPRULE_AUTH_2_PROXY|ZCOM_REPRULE_AUTH_2_OWNER)
 replicate to all
#define ZCOM_REPRULE_AUTH_2_OWNER   (1L << 1)
 replicate data from authority -> owner
#define ZCOM_REPRULE_AUTH_2_PROXY   (1L << 0)
 replicate data from authority -> proxy
#define ZCOM_REPRULE_NONE   0
 no rule (no replication)
#define ZCOM_REPRULE_OWNER_2_AUTH   (1L << 2)
 replicate data from owner -> authority


Define Documentation

#define ZCOM_REPFLAG_NONE   0
 

no flags

#define ZCOM_REPFLAG_UNRELIABLE   (1L << 0)
 

Replicate unreliably.

#define ZCOM_REPFLAG_MOSTRECENT   (1L << 1)
 

Replicate reliable, always sending the most recent version of the data.

#define ZCOM_REPFLAG_RARELYCHANGED   (1L << 2)
 

Data changes seldomly.

This data changes relatively seldom, so transmission is optimized upon that assumption. All rarely-changed data is put in a special group. If none of this data needs to be updated, there is zero overhead for having this data registered, but if only one of the rarely-changed data items needs to be updated, all of the other items have to at least send control data stating that they don't need to be updated, which is what normal data is doing all the time.

#define ZCOM_REPFLAG_ONLYONCE   (1L << 3)
 

This data shall be replicated only once, implicates ZCOM_REPFLAG_RARELYCHANGED. Can't be used together with ZCOM_REPFLAG_STARTCLEAN!

#define ZCOM_REPFLAG_INTERCEPT   (1L << 4)
 

This data will generate intercept events when an interceptor is assigned.

#define ZCOM_REPFLAG_SETUPPERSISTS   (1L << 5)
 

Allow reference to ZCom_ReplicatorSetup object.

Use this when you have set up the ZCom_ReplicatorSetup object yourself and it is static or persists longer than all ZCom_Nodes and ZCom_Controls. If set, ZCom_ReplicatorSetup::Duplicate() will just return a pointer to itself instead of duplicating, which saves memory. This is only relevant if ZCom_Node::unregisterNode() is used, which might need to make internal copies of the replicators and their respective setups.

#define ZCOM_REPFLAG_SETUPAUTODELETE   (1L << 6)
 

Automatically delete ZCom_ReplicatorSetup object when replicator gets deleted.

Use this if you want ZCom_Node to automatically delete a dynamically allocated replicator setup on destruction. Do NOT use it if the replicator setup is used in more than one replicator.

Attention:
Never use together with ZCOM_REPFLAG_SETUPPERSISTS.

#define ZCOM_REPFLAG_STARTCLEAN   (1L << 7)
 

Tell replicator to start clean, i.e. don't mark data dirty.

By default, a new replicator marks it's data as dirty. That means, it has to be replicated. With this flag set the replicator will start off clean, not replicating any data until a change in the data triggers replication.

This can be used to optimize bandwidth when creating lots of nodes with replicators during operation. When an object starts off with the same values on the server as on the client, there is no need to replicate that data until it is modified on the server.

Attention:
Can't be used together with ZCOM_REPFLAG_ONLYONCE.

#define ZCOM_REPRULE_NONE   0
 

no rule (no replication)

#define ZCOM_REPRULE_AUTH_2_PROXY   (1L << 0)
 

replicate data from authority -> proxy

#define ZCOM_REPRULE_AUTH_2_OWNER   (1L << 1)
 

replicate data from authority -> owner

#define ZCOM_REPRULE_AUTH_2_ALL   (ZCOM_REPRULE_AUTH_2_PROXY|ZCOM_REPRULE_AUTH_2_OWNER)
 

replicate to all

#define ZCOM_REPRULE_OWNER_2_AUTH   (1L << 2)
 

replicate data from owner -> authority

#define ZCOM_FTRANS_ID_BITS   32
 

Size of file transfer ID.

#define ZCOM_FTRANS_SIZE_BITS   32
 

Size of file length information.

#define ZCOM_FTRANS_CHUNK_BITS   16
 

Size of file chunk ID.


This file is part of the documentation for Zoidcom. Documentation copyright © 2004-2008 by Jörg Rüppel. Generated on Sat Aug 16 15:26:49 2008 for Zoidcom by doxygen 1.4.6-NO