/* ***************************************************************************** * Feature and Parameter Negotiation ***************************************************************************** * * The two halves of a para-virtual driver utilize nodes within * XenStore to communicate capabilities and to negotiate operating parameters. * This section enumerates these nodes which reside in the respective front and * backend portions of XenStore, following XenBus convention. * * All data in XenStore is stored as strings. Nodes specifying numeric * values are encoded in decimal. Integer value ranges listed below are * expressed as fixed sized integer types capable of storing the conversion * of a properly formated node string, without loss of information. * ***************************************************************************** * Backend XenBus Nodes ***************************************************************************** * *---------------------------- Features supported ---------------------------- * * Capable backend advertises supported features by publishing * corresponding entries in XenStore and puts 1 as the value of the entry. * If a feature is not supported then 0 must be set or feature entry omitted. * * feature-disable-keyboard * Values: <uint> * * If there is no need to expose a virtual keyboard device by the * frontend then this must be set to 1. * * feature-disable-pointer * Values: <uint> * * If there is no need to expose a virtual pointer device by the * frontend then this must be set to 1. * * feature-abs-pointer * Values: <uint> * * Backends, which support reporting of absolute coordinates for pointer * device should set this to 1. * * feature-multi-touch * Values: <uint> * * Backends, which support reporting of multi-touch events * should set this to 1. * * feature-raw-pointer * Values: <uint> * * Backends, which support reporting raw (unscaled) absolute coordinates * for pointer devices should set this to 1. Raw (unscaled) values have * a range of [0, 0x7fff]. * *----------------------- Device Instance Parameters ------------------------ * * unique-id * Values: <string> * * After device instance initialization it is assigned a unique ID, * so every instance of the frontend can be identified by the backend * by this ID. This can be UUID or such. * *------------------------- Pointer Device Parameters ------------------------ * * width * Values: <uint> * * Maximum X coordinate (width) to be used by the frontend * while reporting input events, pixels, [0; UINT32_MAX]. * * height * Values: <uint> * * Maximum Y coordinate (height) to be used by the frontend * while reporting input events, pixels, [0; UINT32_MAX]. * *----------------------- Multi-touch Device Parameters ---------------------- * * multi-touch-num-contacts * Values: <uint> * * Number of simultaneous touches reported. * * multi-touch-width * Values: <uint> * * Width of the touch area to be used by the frontend * while reporting input events, pixels, [0; UINT32_MAX]. * * multi-touch-height * Values: <uint> * * Height of the touch area to be used by the frontend * while reporting input events, pixels, [0; UINT32_MAX]. * ***************************************************************************** * Frontend XenBus Nodes ***************************************************************************** * *------------------------------ Feature request ----------------------------- * * Capable frontend requests features from backend via setting corresponding * entries to 1 in XenStore. Requests for features not advertised as supported * by the backend have no effect. * * request-abs-pointer * Values: <uint> * * Request backend to report absolute pointer coordinates * (XENKBD_TYPE_POS) instead of relative ones (XENKBD_TYPE_MOTION). * * request-multi-touch * Values: <uint> * * Request backend to report multi-touch events. * * request-raw-pointer * Values: <uint> * * Request backend to report raw unscaled absolute pointer coordinates. * This option is only valid if request-abs-pointer is also set. * Raw unscaled coordinates have the range [0, 0x7fff] * *----------------------- Request Transport Parameters ----------------------- * * event-channel * Values: <uint> * * The identifier of the Xen event channel used to signal activity * in the ring buffer. * * page-gref * Values: <uint> * * The Xen grant reference granting permission for the backend to map * a sole page in a single page sized event ring buffer. * * page-ref * Values: <uint> * * OBSOLETE, not recommended for use. * PFN of the shared page.
*/
/* OBSOLETE, not recommended for use */ #define XENKBD_FIELD_RING_REF "page-ref"
/* ***************************************************************************** * Description of the protocol between frontend and backend driver. ***************************************************************************** * * The two halves of a Para-virtual driver communicate with * each other using a shared page and an event channel. * Shared page contains a ring with event structures. * * All reserved fields in the structures below must be 0. * ***************************************************************************** * Backend to frontend events ***************************************************************************** * * Frontends should ignore unknown in events. * All event packets have the same length (40 octets) * All event packets have common header: * * 0 octet * +-----------------+ * | type | * +-----------------+ * type - uint8_t, event code, XENKBD_TYPE_??? * * * Pointer relative movement event * 0 1 2 3 octet * +----------------+----------------+----------------+----------------+ * | _TYPE_MOTION | reserved | 4 * +----------------+----------------+----------------+----------------+ * | rel_x | 8 * +----------------+----------------+----------------+----------------+ * | rel_y | 12 * +----------------+----------------+----------------+----------------+ * | rel_z | 16 * +----------------+----------------+----------------+----------------+ * | reserved | 20 * +----------------+----------------+----------------+----------------+ * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/| * +----------------+----------------+----------------+----------------+ * | reserved | 40 * +----------------+----------------+----------------+----------------+ * * rel_x - int32_t, relative X motion * rel_y - int32_t, relative Y motion * rel_z - int32_t, relative Z motion (wheel)
*/
/* ***************************************************************************** * Frontend to backend events ***************************************************************************** * * Out events may be sent only when requested by backend, and receipt * of an unknown out event is an error. * No out events currently defined.
* All event packets have the same length (40 octets) * All event packets have common header: * 0 octet * +-----------------+ * | type | * +-----------------+ * type - uint8_t, event code
*/
#define XENKBD_OUT_EVENT_SIZE 40
union xenkbd_out_event {
uint8_t type; char pad[XENKBD_OUT_EVENT_SIZE];
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.