Data Block that contains Object-Metadata. The Metadata of an Object should not (or only very slowly) change during its livetime. More...
#include <kogmo_rtdb_types.h>
Data Fields | |
kogmo_rtdb_objid_t | oid |
(D) Unique Object-ID, will be automatically created and overwritten | |
kogmo_rtdb_objname_t | name |
(U) Name of the Object, doesn't need to be unique | |
kogmo_timestamp_t | created_ts |
(D) Time of Object creation | |
kogmo_rtdb_objid_t | created_proc |
(D) Process-ID of the Process, that created the Object | |
kogmo_timestamp_t | lastmodified_ts |
(D) (unused so far) | |
kogmo_rtdb_objid_t | lastmodified_proc |
(D) (unused so far) | |
kogmo_timestamp_t | deleted_ts |
(D) Time of Object deletion; metadata has to be kept until the last Object dataset is beyond history limit | |
kogmo_rtdb_objid_t | deleted_proc |
(D) Process that deleted the Object (so far only the owner) | |
kogmo_rtdb_objid_t | parent_oid |
(U) Object-ID of the Parent-Object within the Scene-Tree; Could be 0 if unwanted. | |
kogmo_rtdb_objtype_t | otype |
(U) Type of the Object; Default: KOGMO_RTDB_DEFAULT_TYPE | |
kogmo_rtdb_objsize_t | size_max |
(U) Maximum Objectdata-Size that can be used in a commit | |
float | history_interval |
(U) Time Interval in Seconds the History of Object-Data should be kept; 0: use Default | |
float | min_cycletime |
(U) Minimum time between Object-Changes (commits). | |
float | max_cycletime |
(U) Maximum time between Object-Changes (commits); If exceeded, the latest data is regarded stale. | |
struct { | |
uint32_t read_deny: 1 | |
(U) 1: Object Data only readable by own handle; 0: default: public readable | |
uint32_t write_allow: 1 | |
(U) 1: Object writable by others, they can update and delete the object; 0: default: not public writable | |
uint32_t keep_alloc: 1 | |
(U) 1: Allocated Memory for Object will be kept after deletion, and will be re-used for the next new object of the same type created by the same process. | |
uint32_t unique: 1 | |
(U) 1: Object must be unique - a second object with the same name and object type (otype) will be refused; 0: default: not public writable | |
uint32_t cycle_watch: 1 | |
(U) 1: Object Data Updates cannot occur at a higher rate than max_cycletime, | |
uint32_t persistent: 1 | |
< 0: default: do not watch and enforce the maximum update rate; | |
uint32_t parent_delete: 1 | |
(U) 1: Object will be deleted if the parent object is deleted. | |
uint32_t no_notifies: 1 | |
(U) 1: Do not send notifies on object writes. | |
uint32_t immediately_delete: 1 | |
(U) 1: Object will be deleted immediate. | |
uint32_t withhold_stale: 1 | |
(U) 1: If the age of the latest object data is below the specified max_cycletime, | |
} | flags |
int32_t | history_size |
(I) Current calculated amount history slots | |
int32_t | history_slot |
(I) Latest history slot | |
kogmo_rtdb_objsize_t | buffer_idx |
(I) Pointer to Object-Data within the Heap |
Data Block that contains Object-Metadata. The Metadata of an Object should not (or only very slowly) change during its livetime.
Fields are marked as follows:
Definition at line 140 of file kogmo_rtdb_types.h.
(I) Pointer to Object-Data within the Heap
Definition at line 254 of file kogmo_rtdb_types.h.
(D) Process-ID of the Process, that created the Object
Definition at line 152 of file kogmo_rtdb_types.h.
(D) Time of Object creation
Definition at line 149 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::cycle_watch |
(U) 1: Object Data Updates cannot occur at a higher rate than max_cycletime,
Definition at line 220 of file kogmo_rtdb_types.h.
(D) Process that deleted the Object (so far only the owner)
Definition at line 163 of file kogmo_rtdb_types.h.
(D) Time of Object deletion; metadata has to be kept until the last Object dataset is beyond history limit
Definition at line 160 of file kogmo_rtdb_types.h.
struct { ... } kogmo_rtdb_obj_info_t::flags |
(U) Time Interval in Seconds the History of Object-Data should be kept; 0: use Default
Definition at line 177 of file kogmo_rtdb_types.h.
(I) Current calculated amount history slots
Definition at line 250 of file kogmo_rtdb_types.h.
(I) Latest history slot
Definition at line 252 of file kogmo_rtdb_types.h.
(U) 1: Object will be deleted immediate.
Use this only for huge rawdata objects. 0: default: delete after 0.25-0.5 seconds, so an old version of this objects can be used for error recovery.
Definition at line 239 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::keep_alloc |
(U) 1: Allocated Memory for Object will be kept after deletion, and will be re-used for the next new object of the same type created by the same process.
Warning: This is only a hint to the rtdb, don't assume that you'll get the same ids and pointers. Just assume that you get a totally new object, but expect less time for creation. 0: default: free all memory after deletion
Definition at line 208 of file kogmo_rtdb_types.h.
(D) (unused so far)
Definition at line 157 of file kogmo_rtdb_types.h.
(D) (unused so far)
Definition at line 155 of file kogmo_rtdb_types.h.
(U) Maximum time between Object-Changes (commits); If exceeded, the latest data is regarded stale.
If withhold_stale is set, readers will not get this stale data. See also min_cycletime (=avg_cycletime) for notes.
Definition at line 194 of file kogmo_rtdb_types.h.
(U) Minimum time between Object-Changes (commits).
Bad things might happen if exceeded (so far, the history will be shorter). Can be enforced by setting the cycle_watch flag;
Note 1: If min_cycletime > max_cycletime will be automatically swapped internaly when used, but the kogmo_rtdb_obj_info_t will not be touched so far.
Note 2: The meaning of max_cycletime / min_cycletime are swapped since the very first release, because I mixed up max_cycletime and max_cyclefreq.
0: use Default
Definition at line 185 of file kogmo_rtdb_types.h.
(U) Name of the Object, doesn't need to be unique
Definition at line 146 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::no_notifies |
(U) 1: Do not send notifies on object writes.
This makes commiting even faster and is only useful for very high frequent real-time processes. Other processes that use kogmo_rtdb_obj_readdata_waitnext() on this object, will automatically poll for changes (with about 0.1*avg_cycletime). So by concept you get a new value every time you use kogmo_rtdb_obj_readdata(). 0: default: send notifies.
Definition at line 232 of file kogmo_rtdb_types.h.
(D) Unique Object-ID, will be automatically created and overwritten
Definition at line 143 of file kogmo_rtdb_types.h.
(U) Type of the Object; Default: KOGMO_RTDB_DEFAULT_TYPE
Definition at line 170 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::parent_delete |
(U) 1: Object will be deleted if the parent object is deleted.
It's useful in combination with persistent and write_allow. 0: default: survive parent.
Definition at line 228 of file kogmo_rtdb_types.h.
(U) Object-ID of the Parent-Object within the Scene-Tree; Could be 0 if unwanted.
Definition at line 166 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::persistent |
< 0: default: do not watch and enforce the maximum update rate;
(U) 1: Object will remain in RTDB even if the creating process dies. It's recommended to also set write_allow. 0: default: not persistent
Definition at line 224 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::read_deny |
(U) 1: Object Data only readable by own handle; 0: default: public readable
Definition at line 202 of file kogmo_rtdb_types.h.
(U) Maximum Objectdata-Size that can be used in a commit
Definition at line 174 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::unique |
(U) 1: Object must be unique - a second object with the same name and object type (otype) will be refused; 0: default: not public writable
Definition at line 216 of file kogmo_rtdb_types.h.
(U) 1: If the age of the latest object data is below the specified max_cycletime,
Definition at line 243 of file kogmo_rtdb_types.h.
uint32_t kogmo_rtdb_obj_info_t::write_allow |
(U) 1: Object writable by others, they can update and delete the object; 0: default: not public writable
Definition at line 205 of file kogmo_rtdb_types.h.