mw_uid
1# This file was automatically generated by SWIG (https://www.swig.org). 2# Version 4.2.1 3# 4# Do not make changes to this file unless you know what you are doing - modify 5# the SWIG interface file instead. 6 7from sys import version_info as _swig_python_version_info 8from mock_rtems import _mw_uid as _mw_uid 9 10try: 11 import builtins as __builtin__ 12except ImportError: 13 import __builtin__ 14 15def _swig_repr(self): 16 try: 17 strthis = "proxy of " + self.this.__repr__() 18 except __builtin__.Exception: 19 strthis = "" 20 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 21 22 23def _swig_setattr_nondynamic_instance_variable(set): 24 def set_instance_attr(self, name, value): 25 if name == "this": 26 set(self, name, value) 27 elif name == "thisown": 28 self.this.own(value) 29 elif hasattr(self, name) and isinstance(getattr(type(self), name), property): 30 set(self, name, value) 31 else: 32 raise AttributeError("You cannot add instance attributes to %s" % self) 33 return set_instance_attr 34 35 36def _swig_setattr_nondynamic_class_variable(set): 37 def set_class_attr(cls, name, value): 38 if hasattr(cls, name) and not isinstance(getattr(cls, name), property): 39 set(cls, name, value) 40 else: 41 raise AttributeError("You cannot add class attributes to %s" % cls) 42 return set_class_attr 43 44 45def _swig_add_metaclass(metaclass): 46 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" 47 def wrapper(cls): 48 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) 49 return wrapper 50 51 52class _SwigNonDynamicMeta(type): 53 """Meta class to enforce nondynamic attributes (no new attributes) for a class""" 54 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) 55 56 57MW_UID_REGISTER_DEVICE = _mw_uid.MW_UID_REGISTER_DEVICE 58 59MW_UID_UNREGISTER_DEVICE = _mw_uid.MW_UID_UNREGISTER_DEVICE 60 61MV_UID_INVALID = _mw_uid.MV_UID_INVALID 62 63MV_UID_REL_POS = _mw_uid.MV_UID_REL_POS 64 65MV_UID_ABS_POS = _mw_uid.MV_UID_ABS_POS 66 67MV_UID_KBD = _mw_uid.MV_UID_KBD 68 69MV_UID_TIMER = _mw_uid.MV_UID_TIMER 70 71MV_BUTTON_RIGHT = _mw_uid.MV_BUTTON_RIGHT 72 73MV_BUTTON_CENTER = _mw_uid.MV_BUTTON_CENTER 74 75MV_BUTTON_LEFT = _mw_uid.MV_BUTTON_LEFT 76 77MV_KEY_MODIFIER_SHIFT_DOWN = _mw_uid.MV_KEY_MODIFIER_SHIFT_DOWN 78 79MV_KEY_MODIFIER_ALT_DOWN = _mw_uid.MV_KEY_MODIFIER_ALT_DOWN 80 81MV_KEY_MODIFIER_CAPS_ON = _mw_uid.MV_KEY_MODIFIER_CAPS_ON 82 83MV_KEY_MODIFIER_NUN_LOCK_ON = _mw_uid.MV_KEY_MODIFIER_NUN_LOCK_ON 84 85MV_KEY_SCROLL_LOCK_ON = _mw_uid.MV_KEY_SCROLL_LOCK_ON 86 87MV_KEY_MODE_ASCII = _mw_uid.MV_KEY_MODE_ASCII 88 89MV_KEY_MODE_SCANCODE = _mw_uid.MV_KEY_MODE_SCANCODE 90 91MV_KDGKBMODE = _mw_uid.MV_KDGKBMODE 92 93MV_KDSKBMODE = _mw_uid.MV_KDSKBMODE 94 95class MW_UID_MESSAGE(object): 96 r"""Proxy of C MW_UID_MESSAGE struct.""" 97 98 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 99 __repr__ = _swig_repr 100 type = property(_mw_uid.MW_UID_MESSAGE_type_get, _mw_uid.MW_UID_MESSAGE_type_set, doc=r"""type : enum MW_INPUT_DEVICE_TYPE""") 101 m = property(_mw_uid.MW_UID_MESSAGE_m_get, doc=r"""m : MW_UID_MESSAGE_m""") 102 103 def __init__(self): 104 r"""__init__(MW_UID_MESSAGE self) -> MW_UID_MESSAGE""" 105 _mw_uid.MW_UID_MESSAGE_swiginit(self, _mw_uid.new_MW_UID_MESSAGE()) 106 __swig_destroy__ = _mw_uid.delete_MW_UID_MESSAGE 107 108# Register MW_UID_MESSAGE in _mw_uid: 109_mw_uid.MW_UID_MESSAGE_swigregister(MW_UID_MESSAGE) 110class MW_UID_MESSAGE_m(object): 111 r"""Proxy of C MW_UID_MESSAGE_m struct.""" 112 113 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 114 __repr__ = _swig_repr 115 kbd = property(_mw_uid.MW_UID_MESSAGE_m_kbd_get, doc=r"""kbd : struct kbd_t""") 116 pos = property(_mw_uid.MW_UID_MESSAGE_m_pos_get, doc=r"""pos : struct pos_t""") 117 tmr = property(_mw_uid.MW_UID_MESSAGE_m_tmr_get, doc=r"""tmr : struct timer_t""") 118 119 def __init__(self): 120 r"""__init__(MW_UID_MESSAGE_m self) -> MW_UID_MESSAGE_m""" 121 _mw_uid.MW_UID_MESSAGE_m_swiginit(self, _mw_uid.new_MW_UID_MESSAGE_m()) 122 __swig_destroy__ = _mw_uid.delete_MW_UID_MESSAGE_m 123 124# Register MW_UID_MESSAGE_m in _mw_uid: 125_mw_uid.MW_UID_MESSAGE_m_swigregister(MW_UID_MESSAGE_m) 126class kbd_t(object): 127 r"""Proxy of C kbd_t struct.""" 128 129 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 130 __repr__ = _swig_repr 131 code = property(_mw_uid.kbd_t_code_get, _mw_uid.kbd_t_code_set, doc=r"""code : unsigned short""") 132 modifiers = property(_mw_uid.kbd_t_modifiers_get, _mw_uid.kbd_t_modifiers_set, doc=r"""modifiers : unsigned char""") 133 mode = property(_mw_uid.kbd_t_mode_get, _mw_uid.kbd_t_mode_set, doc=r"""mode : unsigned char""") 134 135 def __init__(self): 136 r"""__init__(kbd_t self) -> kbd_t""" 137 _mw_uid.kbd_t_swiginit(self, _mw_uid.new_kbd_t()) 138 __swig_destroy__ = _mw_uid.delete_kbd_t 139 140# Register kbd_t in _mw_uid: 141_mw_uid.kbd_t_swigregister(kbd_t) 142class pos_t(object): 143 r"""Proxy of C pos_t struct.""" 144 145 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 146 __repr__ = _swig_repr 147 btns = property(_mw_uid.pos_t_btns_get, _mw_uid.pos_t_btns_set, doc=r"""btns : unsigned short""") 148 x = property(_mw_uid.pos_t_x_get, _mw_uid.pos_t_x_set, doc=r"""x : short""") 149 y = property(_mw_uid.pos_t_y_get, _mw_uid.pos_t_y_set, doc=r"""y : short""") 150 z = property(_mw_uid.pos_t_z_get, _mw_uid.pos_t_z_set, doc=r"""z : short""") 151 152 def __init__(self): 153 r"""__init__(pos_t self) -> pos_t""" 154 _mw_uid.pos_t_swiginit(self, _mw_uid.new_pos_t()) 155 __swig_destroy__ = _mw_uid.delete_pos_t 156 157# Register pos_t in _mw_uid: 158_mw_uid.pos_t_swigregister(pos_t) 159class timer_t(object): 160 r"""Proxy of C timer_t struct.""" 161 162 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 163 __repr__ = _swig_repr 164 frt = property(_mw_uid.timer_t_frt_get, _mw_uid.timer_t_frt_set, doc=r"""frt : unsigned long""") 165 seq = property(_mw_uid.timer_t_seq_get, _mw_uid.timer_t_seq_set, doc=r"""seq : unsigned long""") 166 167 def __init__(self): 168 r"""__init__(timer_t self) -> timer_t""" 169 _mw_uid.timer_t_swiginit(self, _mw_uid.new_timer_t()) 170 __swig_destroy__ = _mw_uid.delete_timer_t 171 172# Register timer_t in _mw_uid: 173_mw_uid.timer_t_swigregister(timer_t) 174 175def uid_open_queue(q_name, flags, max_msgs): 176 r""" 177 This method creates the message queue that holds events from the 178 input devices. 179 180 :type q_name: string, in 181 :param q_name: is the name of the message queue 182 :type flags: int, in 183 :param flags: controls the behaviour of the queue 184 :type max_msgs: int, in 185 :param max_msgs: specifies the maximum number of pending messages 186 187 Notes: The message queue is from the Classic API. 188 """ 189 return _mw_uid.uid_open_queue(q_name, flags, max_msgs) 190 191def uid_close_queue(): 192 r"""This method closes the message queue and deletes it.""" 193 return _mw_uid.uid_close_queue() 194 195def uid_read_message(m, timeout): 196 r""" 197 This method reads a message from the queue. It waits up to the specified 198 timeout in miliseconds. A *timeout* of 0 is a poll. 199 200 :type m: :py:class:`struct MW_UID_MESSAGE`, in 201 :param m: will be filled in with the received message 202 :type timeout: int, in 203 :param timeout: is the maximum number of mulliseconds to wait 204 """ 205 return _mw_uid.uid_read_message(m, timeout) 206 207def uid_send_message(m): 208 r""" 209 This methods writes a message to the queue. 210 211 :type m: :py:class:`struct MW_UID_MESSAGE`, in 212 :param m: is the message to send 213 """ 214 return _mw_uid.uid_send_message(m) 215 216def uid_register_device(fd, q_name): 217 r""" 218 This method registers the device associated with *fd* to 219 to insert data to the queue 220 """ 221 return _mw_uid.uid_register_device(fd, q_name) 222 223def uid_unregister_device(fd): 224 r""" 225 uid_unregister_device(int fd) -> int 226 227 Parameters 228 ---------- 229 fd: int 230 231 """ 232 return _mw_uid.uid_unregister_device(fd) 233 234def uid_set_kbd_mode(fd, mode, old_mode): 235 r""" 236 uid_set_kbd_mode(int fd, int mode, int * old_mode) -> int 237 238 Parameters 239 ---------- 240 fd: int 241 mode: int 242 old_mode: int * 243 244 """ 245 return _mw_uid.uid_set_kbd_mode(fd, mode, old_mode) 246 247def uid_print_message(uid): 248 r""" 249 This methods prints the specified UID message using printk 250 251 :type uid: :py:class:`struct MW_UID_MESSAGE`, in 252 :param uid: points to the message to print 253 """ 254 return _mw_uid.uid_print_message(uid) 255 256def uid_print_message_with_plugin(printer, uid): 257 r""" 258 This methods prints the specified UID message using your fprintf 259 style method of choice. 260 261 :param RTEMS: printer 262 :type uid: :py:class:`struct MW_UID_MESSAGE`, in 263 :param uid: points to the message to print 264 """ 265 return _mw_uid.uid_print_message_with_plugin(printer, uid)
96class MW_UID_MESSAGE(object): 97 r"""Proxy of C MW_UID_MESSAGE struct.""" 98 99 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 100 __repr__ = _swig_repr 101 type = property(_mw_uid.MW_UID_MESSAGE_type_get, _mw_uid.MW_UID_MESSAGE_type_set, doc=r"""type : enum MW_INPUT_DEVICE_TYPE""") 102 m = property(_mw_uid.MW_UID_MESSAGE_m_get, doc=r"""m : MW_UID_MESSAGE_m""") 103 104 def __init__(self): 105 r"""__init__(MW_UID_MESSAGE self) -> MW_UID_MESSAGE""" 106 _mw_uid.MW_UID_MESSAGE_swiginit(self, _mw_uid.new_MW_UID_MESSAGE()) 107 __swig_destroy__ = _mw_uid.delete_MW_UID_MESSAGE
Proxy of C MW_UID_MESSAGE struct.
104 def __init__(self): 105 r"""__init__(MW_UID_MESSAGE self) -> MW_UID_MESSAGE""" 106 _mw_uid.MW_UID_MESSAGE_swiginit(self, _mw_uid.new_MW_UID_MESSAGE())
__init__(MW_UID_MESSAGE self) -> MW_UID_MESSAGE
99 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
111class MW_UID_MESSAGE_m(object): 112 r"""Proxy of C MW_UID_MESSAGE_m struct.""" 113 114 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 115 __repr__ = _swig_repr 116 kbd = property(_mw_uid.MW_UID_MESSAGE_m_kbd_get, doc=r"""kbd : struct kbd_t""") 117 pos = property(_mw_uid.MW_UID_MESSAGE_m_pos_get, doc=r"""pos : struct pos_t""") 118 tmr = property(_mw_uid.MW_UID_MESSAGE_m_tmr_get, doc=r"""tmr : struct timer_t""") 119 120 def __init__(self): 121 r"""__init__(MW_UID_MESSAGE_m self) -> MW_UID_MESSAGE_m""" 122 _mw_uid.MW_UID_MESSAGE_m_swiginit(self, _mw_uid.new_MW_UID_MESSAGE_m()) 123 __swig_destroy__ = _mw_uid.delete_MW_UID_MESSAGE_m
Proxy of C MW_UID_MESSAGE_m struct.
120 def __init__(self): 121 r"""__init__(MW_UID_MESSAGE_m self) -> MW_UID_MESSAGE_m""" 122 _mw_uid.MW_UID_MESSAGE_m_swiginit(self, _mw_uid.new_MW_UID_MESSAGE_m())
__init__(MW_UID_MESSAGE_m self) -> MW_UID_MESSAGE_m
114 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
127class kbd_t(object): 128 r"""Proxy of C kbd_t struct.""" 129 130 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 131 __repr__ = _swig_repr 132 code = property(_mw_uid.kbd_t_code_get, _mw_uid.kbd_t_code_set, doc=r"""code : unsigned short""") 133 modifiers = property(_mw_uid.kbd_t_modifiers_get, _mw_uid.kbd_t_modifiers_set, doc=r"""modifiers : unsigned char""") 134 mode = property(_mw_uid.kbd_t_mode_get, _mw_uid.kbd_t_mode_set, doc=r"""mode : unsigned char""") 135 136 def __init__(self): 137 r"""__init__(kbd_t self) -> kbd_t""" 138 _mw_uid.kbd_t_swiginit(self, _mw_uid.new_kbd_t()) 139 __swig_destroy__ = _mw_uid.delete_kbd_t
Proxy of C kbd_t struct.
136 def __init__(self): 137 r"""__init__(kbd_t self) -> kbd_t""" 138 _mw_uid.kbd_t_swiginit(self, _mw_uid.new_kbd_t())
__init__(kbd_t self) -> kbd_t
130 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
143class pos_t(object): 144 r"""Proxy of C pos_t struct.""" 145 146 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 147 __repr__ = _swig_repr 148 btns = property(_mw_uid.pos_t_btns_get, _mw_uid.pos_t_btns_set, doc=r"""btns : unsigned short""") 149 x = property(_mw_uid.pos_t_x_get, _mw_uid.pos_t_x_set, doc=r"""x : short""") 150 y = property(_mw_uid.pos_t_y_get, _mw_uid.pos_t_y_set, doc=r"""y : short""") 151 z = property(_mw_uid.pos_t_z_get, _mw_uid.pos_t_z_set, doc=r"""z : short""") 152 153 def __init__(self): 154 r"""__init__(pos_t self) -> pos_t""" 155 _mw_uid.pos_t_swiginit(self, _mw_uid.new_pos_t()) 156 __swig_destroy__ = _mw_uid.delete_pos_t
Proxy of C pos_t struct.
153 def __init__(self): 154 r"""__init__(pos_t self) -> pos_t""" 155 _mw_uid.pos_t_swiginit(self, _mw_uid.new_pos_t())
__init__(pos_t self) -> pos_t
146 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
160class timer_t(object): 161 r"""Proxy of C timer_t struct.""" 162 163 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 164 __repr__ = _swig_repr 165 frt = property(_mw_uid.timer_t_frt_get, _mw_uid.timer_t_frt_set, doc=r"""frt : unsigned long""") 166 seq = property(_mw_uid.timer_t_seq_get, _mw_uid.timer_t_seq_set, doc=r"""seq : unsigned long""") 167 168 def __init__(self): 169 r"""__init__(timer_t self) -> timer_t""" 170 _mw_uid.timer_t_swiginit(self, _mw_uid.new_timer_t()) 171 __swig_destroy__ = _mw_uid.delete_timer_t
Proxy of C timer_t struct.
168 def __init__(self): 169 r"""__init__(timer_t self) -> timer_t""" 170 _mw_uid.timer_t_swiginit(self, _mw_uid.new_timer_t())
__init__(timer_t self) -> timer_t
163 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
176def uid_open_queue(q_name, flags, max_msgs): 177 r""" 178 This method creates the message queue that holds events from the 179 input devices. 180 181 :type q_name: string, in 182 :param q_name: is the name of the message queue 183 :type flags: int, in 184 :param flags: controls the behaviour of the queue 185 :type max_msgs: int, in 186 :param max_msgs: specifies the maximum number of pending messages 187 188 Notes: The message queue is from the Classic API. 189 """ 190 return _mw_uid.uid_open_queue(q_name, flags, max_msgs)
This method creates the message queue that holds events from the input devices.
Parameters
- q_name: is the name of the message queue
- flags: controls the behaviour of the queue
- max_msgs: specifies the maximum number of pending messages
Notes: The message queue is from the Classic API.
192def uid_close_queue(): 193 r"""This method closes the message queue and deletes it.""" 194 return _mw_uid.uid_close_queue()
This method closes the message queue and deletes it.
196def uid_read_message(m, timeout): 197 r""" 198 This method reads a message from the queue. It waits up to the specified 199 timeout in miliseconds. A *timeout* of 0 is a poll. 200 201 :type m: :py:class:`struct MW_UID_MESSAGE`, in 202 :param m: will be filled in with the received message 203 :type timeout: int, in 204 :param timeout: is the maximum number of mulliseconds to wait 205 """ 206 return _mw_uid.uid_read_message(m, timeout)
This method reads a message from the queue. It waits up to the specified timeout in miliseconds. A timeout of 0 is a poll.
Parameters
- m: will be filled in with the received message
- timeout: is the maximum number of mulliseconds to wait
208def uid_send_message(m): 209 r""" 210 This methods writes a message to the queue. 211 212 :type m: :py:class:`struct MW_UID_MESSAGE`, in 213 :param m: is the message to send 214 """ 215 return _mw_uid.uid_send_message(m)
This methods writes a message to the queue.
Parameters
- m: is the message to send
217def uid_register_device(fd, q_name): 218 r""" 219 This method registers the device associated with *fd* to 220 to insert data to the queue 221 """ 222 return _mw_uid.uid_register_device(fd, q_name)
This method registers the device associated with fd to to insert data to the queue
224def uid_unregister_device(fd): 225 r""" 226 uid_unregister_device(int fd) -> int 227 228 Parameters 229 ---------- 230 fd: int 231 232 """ 233 return _mw_uid.uid_unregister_device(fd)
uid_unregister_device(int fd) -> int
Parameters
fd: int
235def uid_set_kbd_mode(fd, mode, old_mode): 236 r""" 237 uid_set_kbd_mode(int fd, int mode, int * old_mode) -> int 238 239 Parameters 240 ---------- 241 fd: int 242 mode: int 243 old_mode: int * 244 245 """ 246 return _mw_uid.uid_set_kbd_mode(fd, mode, old_mode)
uid_set_kbd_mode(int fd, int mode, int * old_mode) -> int
Parameters
fd: int mode: int old_mode: int *
248def uid_print_message(uid): 249 r""" 250 This methods prints the specified UID message using printk 251 252 :type uid: :py:class:`struct MW_UID_MESSAGE`, in 253 :param uid: points to the message to print 254 """ 255 return _mw_uid.uid_print_message(uid)
This methods prints the specified UID message using printk
Parameters
- uid: points to the message to print
257def uid_print_message_with_plugin(printer, uid): 258 r""" 259 This methods prints the specified UID message using your fprintf 260 style method of choice. 261 262 :param RTEMS: printer 263 :type uid: :py:class:`struct MW_UID_MESSAGE`, in 264 :param uid: points to the message to print 265 """ 266 return _mw_uid.uid_print_message_with_plugin(printer, uid)
This methods prints the specified UID message using your fprintf style method of choice.
Parameters
- RTEMS: printer
- uid: points to the message to print