shell
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 _shell as _shell 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 57RTEMS_SHELL_KEYS_EXTENDED = _shell.RTEMS_SHELL_KEYS_EXTENDED 58 59RTEMS_SHELL_KEYS_NORMAL_MASK = _shell.RTEMS_SHELL_KEYS_NORMAL_MASK 60 61RTEMS_SHELL_KEYS_INS = _shell.RTEMS_SHELL_KEYS_INS 62 63RTEMS_SHELL_KEYS_DEL = _shell.RTEMS_SHELL_KEYS_DEL 64 65RTEMS_SHELL_KEYS_UARROW = _shell.RTEMS_SHELL_KEYS_UARROW 66 67RTEMS_SHELL_KEYS_DARROW = _shell.RTEMS_SHELL_KEYS_DARROW 68 69RTEMS_SHELL_KEYS_LARROW = _shell.RTEMS_SHELL_KEYS_LARROW 70 71RTEMS_SHELL_KEYS_RARROW = _shell.RTEMS_SHELL_KEYS_RARROW 72 73RTEMS_SHELL_KEYS_HOME = _shell.RTEMS_SHELL_KEYS_HOME 74 75RTEMS_SHELL_KEYS_END = _shell.RTEMS_SHELL_KEYS_END 76 77RTEMS_SHELL_KEYS_F1 = _shell.RTEMS_SHELL_KEYS_F1 78 79RTEMS_SHELL_KEYS_F2 = _shell.RTEMS_SHELL_KEYS_F2 80 81RTEMS_SHELL_KEYS_F3 = _shell.RTEMS_SHELL_KEYS_F3 82 83RTEMS_SHELL_KEYS_F4 = _shell.RTEMS_SHELL_KEYS_F4 84 85RTEMS_SHELL_KEYS_F5 = _shell.RTEMS_SHELL_KEYS_F5 86 87RTEMS_SHELL_KEYS_F6 = _shell.RTEMS_SHELL_KEYS_F6 88 89RTEMS_SHELL_KEYS_F7 = _shell.RTEMS_SHELL_KEYS_F7 90 91RTEMS_SHELL_KEYS_F8 = _shell.RTEMS_SHELL_KEYS_F8 92 93RTEMS_SHELL_KEYS_F9 = _shell.RTEMS_SHELL_KEYS_F9 94 95RTEMS_SHELL_KEYS_F10 = _shell.RTEMS_SHELL_KEYS_F10 96 97 98def rtems_shell_login_prompt(_in, out, device, check): 99 r""" 100 rtems_shell_login_prompt(FILE * _in, FILE * out, char const * device, rtems_shell_login_check_t check) -> bool 101 102 Parameters 103 ---------- 104 in: FILE * 105 out: FILE * 106 device: char const * 107 check: rtems_shell_login_check_t 108 109 """ 110 return _shell.rtems_shell_login_prompt(_in, out, device, check) 111 112def rtems_shell_login_check(user, passphrase): 113 r""" 114 rtems_shell_login_check(char const * user, char const * passphrase) -> bool 115 116 Parameters 117 ---------- 118 user: char const * 119 passphrase: char const * 120 121 """ 122 return _shell.rtems_shell_login_check(user, passphrase) 123class rtems_shell_cmd_tt(object): 124 r"""Proxy of C rtems_shell_cmd_tt struct.""" 125 126 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 127 __repr__ = _swig_repr 128 name = property(_shell.rtems_shell_cmd_tt_name_get, _shell.rtems_shell_cmd_tt_name_set, doc=r"""name : p.q(const).char""") 129 usage = property(_shell.rtems_shell_cmd_tt_usage_get, _shell.rtems_shell_cmd_tt_usage_set, doc=r"""usage : p.q(const).char""") 130 topic = property(_shell.rtems_shell_cmd_tt_topic_get, _shell.rtems_shell_cmd_tt_topic_set, doc=r"""topic : p.q(const).char""") 131 command = property(_shell.rtems_shell_cmd_tt_command_get, _shell.rtems_shell_cmd_tt_command_set, doc=r"""command : rtems_shell_command_t""") 132 alias = property(_shell.rtems_shell_cmd_tt_alias_get, _shell.rtems_shell_cmd_tt_alias_set, doc=r"""alias : p.rtems_shell_cmd_t""") 133 next = property(_shell.rtems_shell_cmd_tt_next_get, _shell.rtems_shell_cmd_tt_next_set, doc=r"""next : p.rtems_shell_cmd_t""") 134 mode = property(_shell.rtems_shell_cmd_tt_mode_get, _shell.rtems_shell_cmd_tt_mode_set, doc=r"""mode : mode_t""") 135 uid = property(_shell.rtems_shell_cmd_tt_uid_get, _shell.rtems_shell_cmd_tt_uid_set, doc=r"""uid : uid_t""") 136 gid = property(_shell.rtems_shell_cmd_tt_gid_get, _shell.rtems_shell_cmd_tt_gid_set, doc=r"""gid : gid_t""") 137 138 def __init__(self): 139 r"""__init__(rtems_shell_cmd_tt self) -> rtems_shell_cmd_tt""" 140 _shell.rtems_shell_cmd_tt_swiginit(self, _shell.new_rtems_shell_cmd_tt()) 141 __swig_destroy__ = _shell.delete_rtems_shell_cmd_tt 142 143# Register rtems_shell_cmd_tt in _shell: 144_shell.rtems_shell_cmd_tt_swigregister(rtems_shell_cmd_tt) 145class rtems_shell_alias_t(object): 146 r"""Proxy of C rtems_shell_alias_t struct.""" 147 148 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 149 __repr__ = _swig_repr 150 name = property(_shell.rtems_shell_alias_t_name_get, _shell.rtems_shell_alias_t_name_set, doc=r"""name : p.q(const).char""") 151 alias = property(_shell.rtems_shell_alias_t_alias_get, _shell.rtems_shell_alias_t_alias_set, doc=r"""alias : p.q(const).char""") 152 153 def __init__(self): 154 r"""__init__(rtems_shell_alias_t self) -> rtems_shell_alias_t""" 155 _shell.rtems_shell_alias_t_swiginit(self, _shell.new_rtems_shell_alias_t()) 156 __swig_destroy__ = _shell.delete_rtems_shell_alias_t 157 158# Register rtems_shell_alias_t in _shell: 159_shell.rtems_shell_alias_t_swigregister(rtems_shell_alias_t) 160class rtems_shell_topic_tt(object): 161 r"""Proxy of C rtems_shell_topic_tt 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 topic = property(_shell.rtems_shell_topic_tt_topic_get, _shell.rtems_shell_topic_tt_topic_set, doc=r"""topic : p.q(const).char""") 166 next = property(_shell.rtems_shell_topic_tt_next_get, _shell.rtems_shell_topic_tt_next_set, doc=r"""next : p.rtems_shell_topic_t""") 167 168 def __init__(self): 169 r"""__init__(rtems_shell_topic_tt self) -> rtems_shell_topic_tt""" 170 _shell.rtems_shell_topic_tt_swiginit(self, _shell.new_rtems_shell_topic_tt()) 171 __swig_destroy__ = _shell.delete_rtems_shell_topic_tt 172 173# Register rtems_shell_topic_tt in _shell: 174_shell.rtems_shell_topic_tt_swigregister(rtems_shell_topic_tt) 175 176def rtems_shell_getchar(_in): 177 r""" 178 rtems_shell_getchar(FILE * _in) -> unsigned int 179 180 Parameters 181 ---------- 182 in: FILE * 183 184 """ 185 return _shell.rtems_shell_getchar(_in) 186 187def rtems_shell_lookup_cmd(cmd): 188 r""" 189 rtems_shell_lookup_cmd(char const * cmd) -> rtems_shell_cmd_tt 190 191 Parameters 192 ---------- 193 cmd: char const * 194 195 """ 196 return _shell.rtems_shell_lookup_cmd(cmd) 197 198def rtems_shell_add_cmd_struct(shell_cmd): 199 r""" 200 rtems_shell_add_cmd_struct(rtems_shell_cmd_tt shell_cmd) -> rtems_shell_cmd_tt 201 202 Parameters 203 ---------- 204 shell_cmd: rtems_shell_cmd_t * 205 206 """ 207 return _shell.rtems_shell_add_cmd_struct(shell_cmd) 208 209def rtems_shell_add_cmd(cmd, topic, usage, command): 210 r""" 211 rtems_shell_add_cmd(char const * cmd, char const * topic, char const * usage, rtems_shell_command_t command) -> rtems_shell_cmd_tt 212 213 Parameters 214 ---------- 215 cmd: char const * 216 topic: char const * 217 usage: char const * 218 command: rtems_shell_command_t 219 220 """ 221 return _shell.rtems_shell_add_cmd(cmd, topic, usage, command) 222 223def rtems_shell_alias_cmd(cmd, alias): 224 r""" 225 rtems_shell_alias_cmd(char const * cmd, char const * alias) -> rtems_shell_cmd_tt 226 227 Parameters 228 ---------- 229 cmd: char const * 230 alias: char const * 231 232 """ 233 return _shell.rtems_shell_alias_cmd(cmd, alias) 234 235def rtems_shell_make_args(commandLine, argc_p, argv_p, max_args): 236 r""" 237 rtems_shell_make_args(char * commandLine, int * argc_p, char ** argv_p, int max_args) -> int 238 239 Parameters 240 ---------- 241 commandLine: char * 242 argc_p: int * 243 argv_p: char ** 244 max_args: int 245 246 """ 247 return _shell.rtems_shell_make_args(commandLine, argc_p, argv_p, max_args) 248 249def rtems_shell_lookup_topic(topic): 250 r""" 251 rtems_shell_lookup_topic(char const * topic) -> rtems_shell_topic_tt 252 253 Parameters 254 ---------- 255 topic: char const * 256 257 """ 258 return _shell.rtems_shell_lookup_topic(topic) 259 260def rtems_shell_can_see_cmd(shell_cmd): 261 r""" 262 rtems_shell_can_see_cmd(rtems_shell_cmd_tt shell_cmd) -> bool 263 264 Parameters 265 ---------- 266 shell_cmd: rtems_shell_cmd_t const * 267 268 """ 269 return _shell.rtems_shell_can_see_cmd(shell_cmd) 270 271def rtems_shell_execute_cmd(cmd, argc, argv): 272 r""" 273 rtems_shell_execute_cmd(char const * cmd, int argc, char *[] argv) -> int 274 275 Parameters 276 ---------- 277 cmd: char const * 278 argc: int 279 argv: char *[] 280 281 """ 282 return _shell.rtems_shell_execute_cmd(cmd, argc, argv) 283 284def rtems_shell_init_environment(): 285 r"""rtems_shell_init_environment()""" 286 return _shell.rtems_shell_init_environment() 287 288def rtems_shell_cat_file(out, name): 289 r""" 290 rtems_shell_cat_file(FILE * out, char const * name) -> int 291 292 Parameters 293 ---------- 294 out: FILE * 295 name: char const * 296 297 """ 298 return _shell.rtems_shell_cat_file(out, name) 299 300def rtems_shell_write_file(name, content): 301 r""" 302 rtems_shell_write_file(char const * name, char const * content) 303 304 Parameters 305 ---------- 306 name: char const * 307 content: char const * 308 309 """ 310 return _shell.rtems_shell_write_file(name, content) 311 312def rtems_shell_script_file(argc, argv): 313 r""" 314 rtems_shell_script_file(int argc, char ** argv) -> int 315 316 Parameters 317 ---------- 318 argc: int 319 argv: char ** 320 321 """ 322 return _shell.rtems_shell_script_file(argc, argv) 323 324def rtems_shell_init(task_name, task_stacksize, task_priority, devname, forever, wait, login_check): 325 r""" 326 Initialise the shell creating tasks to login and run the shell 327 sessions. 328 329 :type task_name: string 330 :param task_name: Name of the shell task. 331 :type task_stacksize: int 332 :param task_stacksize: The size of the stack. If 0 the default size is used. 333 :type task_priority: rtems_task_priority 334 :param task_priority: The priority the shell runs at. 335 :type forever: boolean 336 :param forever: Repeat logins. 337 :type wait: boolean 338 :param wait: Caller should block until shell exits. 339 :type login_check: bool 340 :param login_check: User login check function, NULL disables login checks. 341 """ 342 return _shell.rtems_shell_init(task_name, task_stacksize, task_priority, devname, forever, wait, login_check) 343 344def rtems_shell_script(task_name, task_stacksize, task_priority, input, output, output_append, wait, echo): 345 r""" 346 Run a shell script creating a shell tasks to execute the command under. 347 348 :type task_name: string 349 :param task_name: Name of the shell task. 350 :type task_stacksize: int 351 :param task_stacksize: The size of the stack. If 0 the default size is used. 352 :type task_priority: rtems_task_priority 353 :param task_priority: The priority the shell runs at. 354 :type input: string 355 :param input: The file of commands. Can be 'stdin' to use stdin. 356 :type output: string 357 :param output: The output file to write commands to. Can be 'stdout', 358 'stderr' or '/dev/null'. 359 :type output_append: boolean 360 :param output_append: Append the output to the file or truncate the file. 361 Create if it does not exist. 362 :type wait: boolean 363 :param wait: Wait for the script to finish. 364 """ 365 return _shell.rtems_shell_script(task_name, task_stacksize, task_priority, input, output, output_append, wait, echo) 366class rtems_shell_env_t(object): 367 r""" Private environment associated with each shell instance.""" 368 369 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 370 __repr__ = _swig_repr 371 magic = property(_shell.rtems_shell_env_t_magic_get, _shell.rtems_shell_env_t_magic_set, doc=r""" 'S','E','N','V': Shell Environment""") 372 managed = property(_shell.rtems_shell_env_t_managed_get, _shell.rtems_shell_env_t_managed_set, doc=r"""managed : bool""") 373 devname = property(_shell.rtems_shell_env_t_devname_get, _shell.rtems_shell_env_t_devname_set, doc=r"""devname : p.q(const).char""") 374 taskname = property(_shell.rtems_shell_env_t_taskname_get, _shell.rtems_shell_env_t_taskname_set, doc=r"""taskname : p.q(const).char""") 375 exit_shell = property(_shell.rtems_shell_env_t_exit_shell_get, _shell.rtems_shell_env_t_exit_shell_set, doc=r"""exit_shell : bool""") 376 forever = property(_shell.rtems_shell_env_t_forever_get, _shell.rtems_shell_env_t_forever_set, doc=r"""forever : bool""") 377 exit_code = property(_shell.rtems_shell_env_t_exit_code_get, _shell.rtems_shell_env_t_exit_code_set, doc=r"""exit_code : p.int""") 378 exit_on_error = property(_shell.rtems_shell_env_t_exit_on_error_get, _shell.rtems_shell_env_t_exit_on_error_set, doc=r"""exit_on_error : bool""") 379 echo = property(_shell.rtems_shell_env_t_echo_get, _shell.rtems_shell_env_t_echo_set, doc=r"""echo : bool""") 380 cwd = property(_shell.rtems_shell_env_t_cwd_get, _shell.rtems_shell_env_t_cwd_set, doc=r"""cwd : a(256).char""") 381 input = property(_shell.rtems_shell_env_t_input_get, _shell.rtems_shell_env_t_input_set, doc=r"""input : p.q(const).char""") 382 output = property(_shell.rtems_shell_env_t_output_get, _shell.rtems_shell_env_t_output_set, doc=r"""output : p.q(const).char""") 383 output_append = property(_shell.rtems_shell_env_t_output_append_get, _shell.rtems_shell_env_t_output_append_set, doc=r"""output_append : bool""") 384 parent_stdin = property(_shell.rtems_shell_env_t_parent_stdin_get, _shell.rtems_shell_env_t_parent_stdin_set, doc=r"""parent_stdin : p.FILE""") 385 parent_stdout = property(_shell.rtems_shell_env_t_parent_stdout_get, _shell.rtems_shell_env_t_parent_stdout_set, doc=r"""parent_stdout : p.FILE""") 386 parent_stderr = property(_shell.rtems_shell_env_t_parent_stderr_get, _shell.rtems_shell_env_t_parent_stderr_set, doc=r"""parent_stderr : p.FILE""") 387 wake_on_end = property(_shell.rtems_shell_env_t_wake_on_end_get, _shell.rtems_shell_env_t_wake_on_end_set, doc=r"""wake_on_end : rtems_id""") 388 login_check = property(_shell.rtems_shell_env_t_login_check_get, _shell.rtems_shell_env_t_login_check_set, doc=r"""login_check : rtems_shell_login_check_t""") 389 uid = property(_shell.rtems_shell_env_t_uid_get, _shell.rtems_shell_env_t_uid_set, doc=r""" 390 The real and effective UID of the shell task in case no login check 391 is present. 392 """) 393 gid = property(_shell.rtems_shell_env_t_gid_get, _shell.rtems_shell_env_t_gid_set, doc=r""" 394 The real and effective GID of the shell task in case no login check 395 is present. 396 """) 397 398 def __init__(self): 399 r"""__init__(rtems_shell_env_t self) -> rtems_shell_env_t""" 400 _shell.rtems_shell_env_t_swiginit(self, _shell.new_rtems_shell_env_t()) 401 __swig_destroy__ = _shell.delete_rtems_shell_env_t 402 403# Register rtems_shell_env_t in _shell: 404_shell.rtems_shell_env_t_swigregister(rtems_shell_env_t) 405 406def rtems_shell_main_loop(rtems_shell_env): 407 r""" 408 rtems_shell_main_loop(rtems_shell_env_t rtems_shell_env) -> bool 409 410 Parameters 411 ---------- 412 rtems_shell_env: rtems_shell_env_t * 413 414 """ 415 return _shell.rtems_shell_main_loop(rtems_shell_env) 416 417def rtems_shell_run_main_loop(shell_env, interactive, line_editor_output): 418 r""" 419 Runs the shell main loop. 420 421 The caller shall initialize the shell environment. It is recommended that 422 the caller duplicates the current shell environment using 423 rtems_shell_dup_current_env() and then performs the required customization. 424 Shell commands will use the stdin, stdout, and stderr file streams set up by 425 the caller. 426 427 :type interactive: boolean 428 :param interactive: indicates if the shell main loop interfaces with an 429 interactive user. For an interactive user, a welcome message using 430 "/etc/motd" is presented and command prompt is displayed. 431 432 :param out]: line_editor_output is the optional line editor output file 433 stream. It may be NULL, to disable the line editor output. 434 435 :rtype: boolean 436 :return: Returns true, if no error occurred and a shell exit was requested, 437 otherwise false. 438 """ 439 return _shell.rtems_shell_run_main_loop(shell_env, interactive, line_editor_output) 440 441def rtems_shell_get_current_env(): 442 r"""rtems_shell_get_current_env() -> rtems_shell_env_t""" 443 return _shell.rtems_shell_get_current_env() 444 445def rtems_shell_dup_current_env(arg1): 446 r""" 447 rtems_shell_dup_current_env(rtems_shell_env_t arg1) 448 449 Parameters 450 ---------- 451 arg1: rtems_shell_env_t * 452 453 """ 454 return _shell.rtems_shell_dup_current_env(arg1) 455class rtems_shell_filesystems_tt(object): 456 r"""Proxy of C rtems_shell_filesystems_tt struct.""" 457 458 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 459 __repr__ = _swig_repr 460 link = property(_shell.rtems_shell_filesystems_tt_link_get, _shell.rtems_shell_filesystems_tt_link_set, doc=r"""link : rtems_chain_node""") 461 name = property(_shell.rtems_shell_filesystems_tt_name_get, _shell.rtems_shell_filesystems_tt_name_set, doc=r"""name : p.q(const).char""") 462 driver_needed = property(_shell.rtems_shell_filesystems_tt_driver_needed_get, _shell.rtems_shell_filesystems_tt_driver_needed_set, doc=r"""driver_needed : int""") 463 fs_ops = property(_shell.rtems_shell_filesystems_tt_fs_ops_get, _shell.rtems_shell_filesystems_tt_fs_ops_set, doc=r"""fs_ops : p.q(const).rtems_filesystem_operations_table""") 464 mounter = property(_shell.rtems_shell_filesystems_tt_mounter_get, _shell.rtems_shell_filesystems_tt_mounter_set, doc=r"""mounter : rtems_shell_filesystems_mounter_t""") 465 466 def __init__(self): 467 r"""__init__(rtems_shell_filesystems_tt self) -> rtems_shell_filesystems_tt""" 468 _shell.rtems_shell_filesystems_tt_swiginit(self, _shell.new_rtems_shell_filesystems_tt()) 469 __swig_destroy__ = _shell.delete_rtems_shell_filesystems_tt 470 471# Register rtems_shell_filesystems_tt in _shell: 472_shell.rtems_shell_filesystems_tt_swigregister(rtems_shell_filesystems_tt) 473cvar = _shell.cvar 474rtems_global_shell_env = cvar.rtems_global_shell_env 475 476 477def rtems_shell_get_prompt(shell_env, prompt, size): 478 r""" 479 This method dynamically builds the command line prompt string 480 and places it in *prompt*. 481 482 :type shell_env: :py:class:`rtems_shell_env_t`, in 483 :param shell_env: is the shell execution environment 484 :type prompt: string, in 485 :param prompt: is a pointer to a string buffer area 486 :type size: int, in 487 :param size: is length of the prompt buffer area 488 489 :rtype: void 490 :return: This method fills in the memory pointed to by *prompt*. 491 492 Notes: An application specific implementation can be provided 493 by the user. 494 """ 495 return _shell.rtems_shell_get_prompt(shell_env, prompt, size) 496 497def rtems_shell_libc_mounter(driver, path, fs, options): 498 r""" 499 Helper for the mount command. 500 501 :type driver: string, in 502 :param driver: The path to the driver. 503 :type path: string, in 504 :param path: The path to mount on. 505 :type fs: :py:class:`rtems_shell_filesystems_t`, in 506 :param fs: The file system definition. 507 :type options: rtems_filesystem_options_t, in 508 :param options: Special file system options. 509 """ 510 return _shell.rtems_shell_libc_mounter(driver, path, fs, options) 511 512def rtems_shell_mount_add_fsys(fs): 513 r""" 514 Add a new file system mount configuration to the mount command. 515 516 :type fs: :py:class:`rtems_shell_filesystems_t`, in 517 :param fs: The file system mount data. 518 """ 519 return _shell.rtems_shell_mount_add_fsys(fs) 520 521def rtems_shell_mount_del_fsys(fs): 522 r""" 523 Delete file system mount configuration from the mount command. 524 525 :type fs: :py:class:`rtems_shell_filesystems_t`, in 526 :param fs: The file system mount data to remove. 527 """ 528 return _shell.rtems_shell_mount_del_fsys(fs) 529 530def rtems_shell_wait_for_input(fd, timeout_in_seconds, notification, notification_arg): 531 r"""Waits for input.""" 532 return _shell.rtems_shell_wait_for_input(fd, timeout_in_seconds, notification, notification_arg) 533 534def rtems_shell_wait_for_explicit_input(fd, timeout_in_seconds, notification, notification_arg, desired_input): 535 r""" 536 Waits for explicit input. 537 538 :type desired_input: int 539 :param desired_input: An explicit unsigned character to wait for or -1 to 540 accept any input. 541 """ 542 return _shell.rtems_shell_wait_for_explicit_input(fd, timeout_in_seconds, notification, notification_arg, desired_input) 543 544def rtems_shell_main_monitor(argc, argv): 545 r""" 546 rtems_shell_main_monitor(int argc, char ** argv) -> int 547 548 Parameters 549 ---------- 550 argc: int 551 argv: char ** 552 553 """ 554 return _shell.rtems_shell_main_monitor(argc, argv) 555 556def rtems_shell_main_mv(argc, argv): 557 r""" 558 rtems_shell_main_mv(int argc, char *[] argv) -> int 559 560 Parameters 561 ---------- 562 argc: int 563 argv: char *[] 564 565 """ 566 return _shell.rtems_shell_main_mv(argc, argv) 567 568def rtems_shell_main_cp(argc, argv): 569 r""" 570 rtems_shell_main_cp(int argc, char *[] argv) -> int 571 572 Parameters 573 ---------- 574 argc: int 575 argv: char *[] 576 577 """ 578 return _shell.rtems_shell_main_cp(argc, argv) 579 580def rtems_shell_main_rm(argc, argv): 581 r""" 582 rtems_shell_main_rm(int argc, char *[] argv) -> int 583 584 Parameters 585 ---------- 586 argc: int 587 argv: char *[] 588 589 """ 590 return _shell.rtems_shell_main_rm(argc, argv)
99def rtems_shell_login_prompt(_in, out, device, check): 100 r""" 101 rtems_shell_login_prompt(FILE * _in, FILE * out, char const * device, rtems_shell_login_check_t check) -> bool 102 103 Parameters 104 ---------- 105 in: FILE * 106 out: FILE * 107 device: char const * 108 check: rtems_shell_login_check_t 109 110 """ 111 return _shell.rtems_shell_login_prompt(_in, out, device, check)
rtems_shell_login_prompt(FILE * _in, FILE * out, char const * device, rtems_shell_login_check_t check) -> bool
Parameters
in: FILE * out: FILE * device: char const * check: rtems_shell_login_check_t
113def rtems_shell_login_check(user, passphrase): 114 r""" 115 rtems_shell_login_check(char const * user, char const * passphrase) -> bool 116 117 Parameters 118 ---------- 119 user: char const * 120 passphrase: char const * 121 122 """ 123 return _shell.rtems_shell_login_check(user, passphrase)
rtems_shell_login_check(char const * user, char const * passphrase) -> bool
Parameters
user: char const * passphrase: char const *
124class rtems_shell_cmd_tt(object): 125 r"""Proxy of C rtems_shell_cmd_tt struct.""" 126 127 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 128 __repr__ = _swig_repr 129 name = property(_shell.rtems_shell_cmd_tt_name_get, _shell.rtems_shell_cmd_tt_name_set, doc=r"""name : p.q(const).char""") 130 usage = property(_shell.rtems_shell_cmd_tt_usage_get, _shell.rtems_shell_cmd_tt_usage_set, doc=r"""usage : p.q(const).char""") 131 topic = property(_shell.rtems_shell_cmd_tt_topic_get, _shell.rtems_shell_cmd_tt_topic_set, doc=r"""topic : p.q(const).char""") 132 command = property(_shell.rtems_shell_cmd_tt_command_get, _shell.rtems_shell_cmd_tt_command_set, doc=r"""command : rtems_shell_command_t""") 133 alias = property(_shell.rtems_shell_cmd_tt_alias_get, _shell.rtems_shell_cmd_tt_alias_set, doc=r"""alias : p.rtems_shell_cmd_t""") 134 next = property(_shell.rtems_shell_cmd_tt_next_get, _shell.rtems_shell_cmd_tt_next_set, doc=r"""next : p.rtems_shell_cmd_t""") 135 mode = property(_shell.rtems_shell_cmd_tt_mode_get, _shell.rtems_shell_cmd_tt_mode_set, doc=r"""mode : mode_t""") 136 uid = property(_shell.rtems_shell_cmd_tt_uid_get, _shell.rtems_shell_cmd_tt_uid_set, doc=r"""uid : uid_t""") 137 gid = property(_shell.rtems_shell_cmd_tt_gid_get, _shell.rtems_shell_cmd_tt_gid_set, doc=r"""gid : gid_t""") 138 139 def __init__(self): 140 r"""__init__(rtems_shell_cmd_tt self) -> rtems_shell_cmd_tt""" 141 _shell.rtems_shell_cmd_tt_swiginit(self, _shell.new_rtems_shell_cmd_tt()) 142 __swig_destroy__ = _shell.delete_rtems_shell_cmd_tt
Proxy of C rtems_shell_cmd_tt struct.
139 def __init__(self): 140 r"""__init__(rtems_shell_cmd_tt self) -> rtems_shell_cmd_tt""" 141 _shell.rtems_shell_cmd_tt_swiginit(self, _shell.new_rtems_shell_cmd_tt())
__init__(rtems_shell_cmd_tt self) -> rtems_shell_cmd_tt
127 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
146class rtems_shell_alias_t(object): 147 r"""Proxy of C rtems_shell_alias_t struct.""" 148 149 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 150 __repr__ = _swig_repr 151 name = property(_shell.rtems_shell_alias_t_name_get, _shell.rtems_shell_alias_t_name_set, doc=r"""name : p.q(const).char""") 152 alias = property(_shell.rtems_shell_alias_t_alias_get, _shell.rtems_shell_alias_t_alias_set, doc=r"""alias : p.q(const).char""") 153 154 def __init__(self): 155 r"""__init__(rtems_shell_alias_t self) -> rtems_shell_alias_t""" 156 _shell.rtems_shell_alias_t_swiginit(self, _shell.new_rtems_shell_alias_t()) 157 __swig_destroy__ = _shell.delete_rtems_shell_alias_t
Proxy of C rtems_shell_alias_t struct.
154 def __init__(self): 155 r"""__init__(rtems_shell_alias_t self) -> rtems_shell_alias_t""" 156 _shell.rtems_shell_alias_t_swiginit(self, _shell.new_rtems_shell_alias_t())
__init__(rtems_shell_alias_t self) -> rtems_shell_alias_t
149 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
161class rtems_shell_topic_tt(object): 162 r"""Proxy of C rtems_shell_topic_tt struct.""" 163 164 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 165 __repr__ = _swig_repr 166 topic = property(_shell.rtems_shell_topic_tt_topic_get, _shell.rtems_shell_topic_tt_topic_set, doc=r"""topic : p.q(const).char""") 167 next = property(_shell.rtems_shell_topic_tt_next_get, _shell.rtems_shell_topic_tt_next_set, doc=r"""next : p.rtems_shell_topic_t""") 168 169 def __init__(self): 170 r"""__init__(rtems_shell_topic_tt self) -> rtems_shell_topic_tt""" 171 _shell.rtems_shell_topic_tt_swiginit(self, _shell.new_rtems_shell_topic_tt()) 172 __swig_destroy__ = _shell.delete_rtems_shell_topic_tt
Proxy of C rtems_shell_topic_tt struct.
169 def __init__(self): 170 r"""__init__(rtems_shell_topic_tt self) -> rtems_shell_topic_tt""" 171 _shell.rtems_shell_topic_tt_swiginit(self, _shell.new_rtems_shell_topic_tt())
__init__(rtems_shell_topic_tt self) -> rtems_shell_topic_tt
164 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
177def rtems_shell_getchar(_in): 178 r""" 179 rtems_shell_getchar(FILE * _in) -> unsigned int 180 181 Parameters 182 ---------- 183 in: FILE * 184 185 """ 186 return _shell.rtems_shell_getchar(_in)
rtems_shell_getchar(FILE * _in) -> unsigned int
Parameters
in: FILE *
188def rtems_shell_lookup_cmd(cmd): 189 r""" 190 rtems_shell_lookup_cmd(char const * cmd) -> rtems_shell_cmd_tt 191 192 Parameters 193 ---------- 194 cmd: char const * 195 196 """ 197 return _shell.rtems_shell_lookup_cmd(cmd)
rtems_shell_lookup_cmd(char const * cmd) -> rtems_shell_cmd_tt
Parameters
cmd: char const *
199def rtems_shell_add_cmd_struct(shell_cmd): 200 r""" 201 rtems_shell_add_cmd_struct(rtems_shell_cmd_tt shell_cmd) -> rtems_shell_cmd_tt 202 203 Parameters 204 ---------- 205 shell_cmd: rtems_shell_cmd_t * 206 207 """ 208 return _shell.rtems_shell_add_cmd_struct(shell_cmd)
rtems_shell_add_cmd_struct(rtems_shell_cmd_tt shell_cmd) -> rtems_shell_cmd_tt
Parameters
shell_cmd: rtems_shell_cmd_t *
210def rtems_shell_add_cmd(cmd, topic, usage, command): 211 r""" 212 rtems_shell_add_cmd(char const * cmd, char const * topic, char const * usage, rtems_shell_command_t command) -> rtems_shell_cmd_tt 213 214 Parameters 215 ---------- 216 cmd: char const * 217 topic: char const * 218 usage: char const * 219 command: rtems_shell_command_t 220 221 """ 222 return _shell.rtems_shell_add_cmd(cmd, topic, usage, command)
rtems_shell_add_cmd(char const * cmd, char const * topic, char const * usage, rtems_shell_command_t command) -> rtems_shell_cmd_tt
Parameters
cmd: char const * topic: char const * usage: char const * command: rtems_shell_command_t
224def rtems_shell_alias_cmd(cmd, alias): 225 r""" 226 rtems_shell_alias_cmd(char const * cmd, char const * alias) -> rtems_shell_cmd_tt 227 228 Parameters 229 ---------- 230 cmd: char const * 231 alias: char const * 232 233 """ 234 return _shell.rtems_shell_alias_cmd(cmd, alias)
rtems_shell_alias_cmd(char const * cmd, char const * alias) -> rtems_shell_cmd_tt
Parameters
cmd: char const * alias: char const *
236def rtems_shell_make_args(commandLine, argc_p, argv_p, max_args): 237 r""" 238 rtems_shell_make_args(char * commandLine, int * argc_p, char ** argv_p, int max_args) -> int 239 240 Parameters 241 ---------- 242 commandLine: char * 243 argc_p: int * 244 argv_p: char ** 245 max_args: int 246 247 """ 248 return _shell.rtems_shell_make_args(commandLine, argc_p, argv_p, max_args)
rtems_shell_make_args(char * commandLine, int * argc_p, char ** argv_p, int max_args) -> int
Parameters
commandLine: char * argc_p: int * argv_p: char ** max_args: int
250def rtems_shell_lookup_topic(topic): 251 r""" 252 rtems_shell_lookup_topic(char const * topic) -> rtems_shell_topic_tt 253 254 Parameters 255 ---------- 256 topic: char const * 257 258 """ 259 return _shell.rtems_shell_lookup_topic(topic)
rtems_shell_lookup_topic(char const * topic) -> rtems_shell_topic_tt
Parameters
topic: char const *
261def rtems_shell_can_see_cmd(shell_cmd): 262 r""" 263 rtems_shell_can_see_cmd(rtems_shell_cmd_tt shell_cmd) -> bool 264 265 Parameters 266 ---------- 267 shell_cmd: rtems_shell_cmd_t const * 268 269 """ 270 return _shell.rtems_shell_can_see_cmd(shell_cmd)
rtems_shell_can_see_cmd(rtems_shell_cmd_tt shell_cmd) -> bool
Parameters
shell_cmd: rtems_shell_cmd_t const *
272def rtems_shell_execute_cmd(cmd, argc, argv): 273 r""" 274 rtems_shell_execute_cmd(char const * cmd, int argc, char *[] argv) -> int 275 276 Parameters 277 ---------- 278 cmd: char const * 279 argc: int 280 argv: char *[] 281 282 """ 283 return _shell.rtems_shell_execute_cmd(cmd, argc, argv)
rtems_shell_execute_cmd(char const * cmd, int argc, char *[] argv) -> int
Parameters
cmd: char const * argc: int argv: char *[]
285def rtems_shell_init_environment(): 286 r"""rtems_shell_init_environment()""" 287 return _shell.rtems_shell_init_environment()
rtems_shell_init_environment()
289def rtems_shell_cat_file(out, name): 290 r""" 291 rtems_shell_cat_file(FILE * out, char const * name) -> int 292 293 Parameters 294 ---------- 295 out: FILE * 296 name: char const * 297 298 """ 299 return _shell.rtems_shell_cat_file(out, name)
rtems_shell_cat_file(FILE * out, char const * name) -> int
Parameters
out: FILE * name: char const *
301def rtems_shell_write_file(name, content): 302 r""" 303 rtems_shell_write_file(char const * name, char const * content) 304 305 Parameters 306 ---------- 307 name: char const * 308 content: char const * 309 310 """ 311 return _shell.rtems_shell_write_file(name, content)
rtems_shell_write_file(char const * name, char const * content)
Parameters
name: char const * content: char const *
313def rtems_shell_script_file(argc, argv): 314 r""" 315 rtems_shell_script_file(int argc, char ** argv) -> int 316 317 Parameters 318 ---------- 319 argc: int 320 argv: char ** 321 322 """ 323 return _shell.rtems_shell_script_file(argc, argv)
rtems_shell_script_file(int argc, char ** argv) -> int
Parameters
argc: int argv: char **
325def rtems_shell_init(task_name, task_stacksize, task_priority, devname, forever, wait, login_check): 326 r""" 327 Initialise the shell creating tasks to login and run the shell 328 sessions. 329 330 :type task_name: string 331 :param task_name: Name of the shell task. 332 :type task_stacksize: int 333 :param task_stacksize: The size of the stack. If 0 the default size is used. 334 :type task_priority: rtems_task_priority 335 :param task_priority: The priority the shell runs at. 336 :type forever: boolean 337 :param forever: Repeat logins. 338 :type wait: boolean 339 :param wait: Caller should block until shell exits. 340 :type login_check: bool 341 :param login_check: User login check function, NULL disables login checks. 342 """ 343 return _shell.rtems_shell_init(task_name, task_stacksize, task_priority, devname, forever, wait, login_check)
Initialise the shell creating tasks to login and run the shell sessions.
Parameters
- task_name: Name of the shell task.
- task_stacksize: The size of the stack. If 0 the default size is used.
- task_priority: The priority the shell runs at.
- forever: Repeat logins.
- wait: Caller should block until shell exits.
- login_check: User login check function, NULL disables login checks.
345def rtems_shell_script(task_name, task_stacksize, task_priority, input, output, output_append, wait, echo): 346 r""" 347 Run a shell script creating a shell tasks to execute the command under. 348 349 :type task_name: string 350 :param task_name: Name of the shell task. 351 :type task_stacksize: int 352 :param task_stacksize: The size of the stack. If 0 the default size is used. 353 :type task_priority: rtems_task_priority 354 :param task_priority: The priority the shell runs at. 355 :type input: string 356 :param input: The file of commands. Can be 'stdin' to use stdin. 357 :type output: string 358 :param output: The output file to write commands to. Can be 'stdout', 359 'stderr' or '/dev/null'. 360 :type output_append: boolean 361 :param output_append: Append the output to the file or truncate the file. 362 Create if it does not exist. 363 :type wait: boolean 364 :param wait: Wait for the script to finish. 365 """ 366 return _shell.rtems_shell_script(task_name, task_stacksize, task_priority, input, output, output_append, wait, echo)
Run a shell script creating a shell tasks to execute the command under.
Parameters
- task_name: Name of the shell task.
- task_stacksize: The size of the stack. If 0 the default size is used.
- task_priority: The priority the shell runs at.
- input: The file of commands. Can be 'stdin' to use stdin.
- output: The output file to write commands to. Can be 'stdout', 'stderr' or '/dev/null'.
- output_append: Append the output to the file or truncate the file. Create if it does not exist.
- wait: Wait for the script to finish.
367class rtems_shell_env_t(object): 368 r""" Private environment associated with each shell instance.""" 369 370 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 371 __repr__ = _swig_repr 372 magic = property(_shell.rtems_shell_env_t_magic_get, _shell.rtems_shell_env_t_magic_set, doc=r""" 'S','E','N','V': Shell Environment""") 373 managed = property(_shell.rtems_shell_env_t_managed_get, _shell.rtems_shell_env_t_managed_set, doc=r"""managed : bool""") 374 devname = property(_shell.rtems_shell_env_t_devname_get, _shell.rtems_shell_env_t_devname_set, doc=r"""devname : p.q(const).char""") 375 taskname = property(_shell.rtems_shell_env_t_taskname_get, _shell.rtems_shell_env_t_taskname_set, doc=r"""taskname : p.q(const).char""") 376 exit_shell = property(_shell.rtems_shell_env_t_exit_shell_get, _shell.rtems_shell_env_t_exit_shell_set, doc=r"""exit_shell : bool""") 377 forever = property(_shell.rtems_shell_env_t_forever_get, _shell.rtems_shell_env_t_forever_set, doc=r"""forever : bool""") 378 exit_code = property(_shell.rtems_shell_env_t_exit_code_get, _shell.rtems_shell_env_t_exit_code_set, doc=r"""exit_code : p.int""") 379 exit_on_error = property(_shell.rtems_shell_env_t_exit_on_error_get, _shell.rtems_shell_env_t_exit_on_error_set, doc=r"""exit_on_error : bool""") 380 echo = property(_shell.rtems_shell_env_t_echo_get, _shell.rtems_shell_env_t_echo_set, doc=r"""echo : bool""") 381 cwd = property(_shell.rtems_shell_env_t_cwd_get, _shell.rtems_shell_env_t_cwd_set, doc=r"""cwd : a(256).char""") 382 input = property(_shell.rtems_shell_env_t_input_get, _shell.rtems_shell_env_t_input_set, doc=r"""input : p.q(const).char""") 383 output = property(_shell.rtems_shell_env_t_output_get, _shell.rtems_shell_env_t_output_set, doc=r"""output : p.q(const).char""") 384 output_append = property(_shell.rtems_shell_env_t_output_append_get, _shell.rtems_shell_env_t_output_append_set, doc=r"""output_append : bool""") 385 parent_stdin = property(_shell.rtems_shell_env_t_parent_stdin_get, _shell.rtems_shell_env_t_parent_stdin_set, doc=r"""parent_stdin : p.FILE""") 386 parent_stdout = property(_shell.rtems_shell_env_t_parent_stdout_get, _shell.rtems_shell_env_t_parent_stdout_set, doc=r"""parent_stdout : p.FILE""") 387 parent_stderr = property(_shell.rtems_shell_env_t_parent_stderr_get, _shell.rtems_shell_env_t_parent_stderr_set, doc=r"""parent_stderr : p.FILE""") 388 wake_on_end = property(_shell.rtems_shell_env_t_wake_on_end_get, _shell.rtems_shell_env_t_wake_on_end_set, doc=r"""wake_on_end : rtems_id""") 389 login_check = property(_shell.rtems_shell_env_t_login_check_get, _shell.rtems_shell_env_t_login_check_set, doc=r"""login_check : rtems_shell_login_check_t""") 390 uid = property(_shell.rtems_shell_env_t_uid_get, _shell.rtems_shell_env_t_uid_set, doc=r""" 391 The real and effective UID of the shell task in case no login check 392 is present. 393 """) 394 gid = property(_shell.rtems_shell_env_t_gid_get, _shell.rtems_shell_env_t_gid_set, doc=r""" 395 The real and effective GID of the shell task in case no login check 396 is present. 397 """) 398 399 def __init__(self): 400 r"""__init__(rtems_shell_env_t self) -> rtems_shell_env_t""" 401 _shell.rtems_shell_env_t_swiginit(self, _shell.new_rtems_shell_env_t()) 402 __swig_destroy__ = _shell.delete_rtems_shell_env_t
Private environment associated with each shell instance.
399 def __init__(self): 400 r"""__init__(rtems_shell_env_t self) -> rtems_shell_env_t""" 401 _shell.rtems_shell_env_t_swiginit(self, _shell.new_rtems_shell_env_t())
__init__(rtems_shell_env_t self) -> rtems_shell_env_t
370 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
407def rtems_shell_main_loop(rtems_shell_env): 408 r""" 409 rtems_shell_main_loop(rtems_shell_env_t rtems_shell_env) -> bool 410 411 Parameters 412 ---------- 413 rtems_shell_env: rtems_shell_env_t * 414 415 """ 416 return _shell.rtems_shell_main_loop(rtems_shell_env)
rtems_shell_main_loop(rtems_shell_env_t rtems_shell_env) -> bool
Parameters
rtems_shell_env: rtems_shell_env_t *
418def rtems_shell_run_main_loop(shell_env, interactive, line_editor_output): 419 r""" 420 Runs the shell main loop. 421 422 The caller shall initialize the shell environment. It is recommended that 423 the caller duplicates the current shell environment using 424 rtems_shell_dup_current_env() and then performs the required customization. 425 Shell commands will use the stdin, stdout, and stderr file streams set up by 426 the caller. 427 428 :type interactive: boolean 429 :param interactive: indicates if the shell main loop interfaces with an 430 interactive user. For an interactive user, a welcome message using 431 "/etc/motd" is presented and command prompt is displayed. 432 433 :param out]: line_editor_output is the optional line editor output file 434 stream. It may be NULL, to disable the line editor output. 435 436 :rtype: boolean 437 :return: Returns true, if no error occurred and a shell exit was requested, 438 otherwise false. 439 """ 440 return _shell.rtems_shell_run_main_loop(shell_env, interactive, line_editor_output)
Runs the shell main loop.
The caller shall initialize the shell environment. It is recommended that the caller duplicates the current shell environment using rtems_shell_dup_current_env() and then performs the required customization. Shell commands will use the stdin, stdout, and stderr file streams set up by the caller.
Parameters
interactive: indicates if the shell main loop interfaces with an interactive user. For an interactive user, a welcome message using "/etc/motd" is presented and command prompt is displayed.
out]: line_editor_output is the optional line editor output file stream. It may be NULL, to disable the line editor output.
Returns
Returns true, if no error occurred and a shell exit was requested, otherwise false.
442def rtems_shell_get_current_env(): 443 r"""rtems_shell_get_current_env() -> rtems_shell_env_t""" 444 return _shell.rtems_shell_get_current_env()
rtems_shell_get_current_env() -> rtems_shell_env_t
446def rtems_shell_dup_current_env(arg1): 447 r""" 448 rtems_shell_dup_current_env(rtems_shell_env_t arg1) 449 450 Parameters 451 ---------- 452 arg1: rtems_shell_env_t * 453 454 """ 455 return _shell.rtems_shell_dup_current_env(arg1)
rtems_shell_dup_current_env(rtems_shell_env_t arg1)
Parameters
arg1: rtems_shell_env_t *
456class rtems_shell_filesystems_tt(object): 457 r"""Proxy of C rtems_shell_filesystems_tt struct.""" 458 459 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") 460 __repr__ = _swig_repr 461 link = property(_shell.rtems_shell_filesystems_tt_link_get, _shell.rtems_shell_filesystems_tt_link_set, doc=r"""link : rtems_chain_node""") 462 name = property(_shell.rtems_shell_filesystems_tt_name_get, _shell.rtems_shell_filesystems_tt_name_set, doc=r"""name : p.q(const).char""") 463 driver_needed = property(_shell.rtems_shell_filesystems_tt_driver_needed_get, _shell.rtems_shell_filesystems_tt_driver_needed_set, doc=r"""driver_needed : int""") 464 fs_ops = property(_shell.rtems_shell_filesystems_tt_fs_ops_get, _shell.rtems_shell_filesystems_tt_fs_ops_set, doc=r"""fs_ops : p.q(const).rtems_filesystem_operations_table""") 465 mounter = property(_shell.rtems_shell_filesystems_tt_mounter_get, _shell.rtems_shell_filesystems_tt_mounter_set, doc=r"""mounter : rtems_shell_filesystems_mounter_t""") 466 467 def __init__(self): 468 r"""__init__(rtems_shell_filesystems_tt self) -> rtems_shell_filesystems_tt""" 469 _shell.rtems_shell_filesystems_tt_swiginit(self, _shell.new_rtems_shell_filesystems_tt()) 470 __swig_destroy__ = _shell.delete_rtems_shell_filesystems_tt
Proxy of C rtems_shell_filesystems_tt struct.
467 def __init__(self): 468 r"""__init__(rtems_shell_filesystems_tt self) -> rtems_shell_filesystems_tt""" 469 _shell.rtems_shell_filesystems_tt_swiginit(self, _shell.new_rtems_shell_filesystems_tt())
__init__(rtems_shell_filesystems_tt self) -> rtems_shell_filesystems_tt
459 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
The membership flag
478def rtems_shell_get_prompt(shell_env, prompt, size): 479 r""" 480 This method dynamically builds the command line prompt string 481 and places it in *prompt*. 482 483 :type shell_env: :py:class:`rtems_shell_env_t`, in 484 :param shell_env: is the shell execution environment 485 :type prompt: string, in 486 :param prompt: is a pointer to a string buffer area 487 :type size: int, in 488 :param size: is length of the prompt buffer area 489 490 :rtype: void 491 :return: This method fills in the memory pointed to by *prompt*. 492 493 Notes: An application specific implementation can be provided 494 by the user. 495 """ 496 return _shell.rtems_shell_get_prompt(shell_env, prompt, size)
This method dynamically builds the command line prompt string and places it in prompt.
Parameters
- shell_env: is the shell execution environment
- prompt: is a pointer to a string buffer area
- size: is length of the prompt buffer area
Returns
This method fills in the memory pointed to by prompt.
Notes: An application specific implementation can be provided by the user.
498def rtems_shell_libc_mounter(driver, path, fs, options): 499 r""" 500 Helper for the mount command. 501 502 :type driver: string, in 503 :param driver: The path to the driver. 504 :type path: string, in 505 :param path: The path to mount on. 506 :type fs: :py:class:`rtems_shell_filesystems_t`, in 507 :param fs: The file system definition. 508 :type options: rtems_filesystem_options_t, in 509 :param options: Special file system options. 510 """ 511 return _shell.rtems_shell_libc_mounter(driver, path, fs, options)
Helper for the mount command.
Parameters
- driver: The path to the driver.
- path: The path to mount on.
- fs: The file system definition.
- options: Special file system options.
513def rtems_shell_mount_add_fsys(fs): 514 r""" 515 Add a new file system mount configuration to the mount command. 516 517 :type fs: :py:class:`rtems_shell_filesystems_t`, in 518 :param fs: The file system mount data. 519 """ 520 return _shell.rtems_shell_mount_add_fsys(fs)
Add a new file system mount configuration to the mount command.
Parameters
- fs: The file system mount data.
522def rtems_shell_mount_del_fsys(fs): 523 r""" 524 Delete file system mount configuration from the mount command. 525 526 :type fs: :py:class:`rtems_shell_filesystems_t`, in 527 :param fs: The file system mount data to remove. 528 """ 529 return _shell.rtems_shell_mount_del_fsys(fs)
Delete file system mount configuration from the mount command.
Parameters
- fs: The file system mount data to remove.
531def rtems_shell_wait_for_input(fd, timeout_in_seconds, notification, notification_arg): 532 r"""Waits for input.""" 533 return _shell.rtems_shell_wait_for_input(fd, timeout_in_seconds, notification, notification_arg)
Waits for input.
535def rtems_shell_wait_for_explicit_input(fd, timeout_in_seconds, notification, notification_arg, desired_input): 536 r""" 537 Waits for explicit input. 538 539 :type desired_input: int 540 :param desired_input: An explicit unsigned character to wait for or -1 to 541 accept any input. 542 """ 543 return _shell.rtems_shell_wait_for_explicit_input(fd, timeout_in_seconds, notification, notification_arg, desired_input)
Waits for explicit input.
Parameters
- desired_input: An explicit unsigned character to wait for or -1 to accept any input.
545def rtems_shell_main_monitor(argc, argv): 546 r""" 547 rtems_shell_main_monitor(int argc, char ** argv) -> int 548 549 Parameters 550 ---------- 551 argc: int 552 argv: char ** 553 554 """ 555 return _shell.rtems_shell_main_monitor(argc, argv)
rtems_shell_main_monitor(int argc, char ** argv) -> int
Parameters
argc: int argv: char **
557def rtems_shell_main_mv(argc, argv): 558 r""" 559 rtems_shell_main_mv(int argc, char *[] argv) -> int 560 561 Parameters 562 ---------- 563 argc: int 564 argv: char *[] 565 566 """ 567 return _shell.rtems_shell_main_mv(argc, argv)
rtems_shell_main_mv(int argc, char *[] argv) -> int
Parameters
argc: int argv: char *[]
569def rtems_shell_main_cp(argc, argv): 570 r""" 571 rtems_shell_main_cp(int argc, char *[] argv) -> int 572 573 Parameters 574 ---------- 575 argc: int 576 argv: char *[] 577 578 """ 579 return _shell.rtems_shell_main_cp(argc, argv)
rtems_shell_main_cp(int argc, char *[] argv) -> int
Parameters
argc: int argv: char *[]
581def rtems_shell_main_rm(argc, argv): 582 r""" 583 rtems_shell_main_rm(int argc, char *[] argv) -> int 584 585 Parameters 586 ---------- 587 argc: int 588 argv: char *[] 589 590 """ 591 return _shell.rtems_shell_main_rm(argc, argv)
rtems_shell_main_rm(int argc, char *[] argv) -> int
Parameters
argc: int argv: char *[]