Uniform Driver Interface: Difference between revisions

Explained handles
[unchecked revision][unchecked revision]
(Added more realistic configuration file and udi_cb_t definition)
(Explained handles)
Line 33:
===Channels===
 
The only way for regions to communicate is through channels. Channels are a bi-directional communication mechanism. Each of the two channel endpoints provide an ops vector, which is a set of entry points. They are referenced via handles of type udi_channel_t (check the definition of handles below). The channel operations along with the associated functionality is defined by metalanguages. Metalanguages are separately defined for each class of drivers, but we'll get to that soon.
 
All channel operation invocations have the following form:
Line 97:
##
meta 1 udi_gio # Generic I/O Metalanguage
child_bind_ops 1 0 1 # GIO meta, primary region, ops_index 1
Line 117:
Region-local data is data private to a region. Being private makes it okay to move the region to a different location or domain without affecting any of the neighbouring regions. Region-global is data that is not particular to a channel or operation.
 
However, none of these are actually data objects. The difference between variables of certain data types and data objects is that data objects get allocated via an UDI allocation interface. Let's take a look at the existing types of data objects.
 
===Control blocks===
Line 136:
} udi_cb_t;
</source>
 
===Handles===
 
Handles are opaque objects, meaning that the driver does not know their internal representation in the UDI environment. You can implement this as simple (void *)s, internally casting them as pointers into the correct context, or have abstract types.
 
==Initial state==
Anonymous user