⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 monitor.h

📁 开放源码的嵌入式开发环境
💻 H
📖 第 1 页 / 共 2 页
字号:
/** * @file rtems/monitor.h * * The RTEMS monitor task. */ /* *  $Id: monitor.h,v 1.24 2006/01/16 15:13:57 joel Exp $ */#ifndef __MONITOR_H#define __MONITOR_H#include <rtems/error.h>		/* rtems_error() */#ifdef __cplusplusextern "C" {#endif/* Forward decls from symbols.h */typedef struct _rtems_symbol_t rtems_symbol_t ;typedef struct _rtems_symbol_table_t rtems_symbol_table_t;/* * Monitor types are derived from rtems object classes */typedef enum {    RTEMS_MONITOR_OBJECT_INVALID   =  OBJECTS_CLASSIC_NO_CLASS,    RTEMS_MONITOR_OBJECT_TASK      =  OBJECTS_RTEMS_TASKS,    RTEMS_MONITOR_OBJECT_EXTENSION =  OBJECTS_RTEMS_EXTENSIONS,    RTEMS_MONITOR_OBJECT_QUEUE     =  OBJECTS_RTEMS_MESSAGE_QUEUES,    RTEMS_MONITOR_OBJECT_SEMAPHORE =  OBJECTS_RTEMS_SEMAPHORES,    RTEMS_MONITOR_OBJECT_PARTITION =  OBJECTS_RTEMS_PARTITIONS,    RTEMS_MONITOR_OBJECT_REGION    =  OBJECTS_RTEMS_REGIONS,    RTEMS_MONITOR_OBJECT_PORT      =  OBJECTS_RTEMS_PORTS,    /* following monitor objects are not known to RTEMS, but     * we like to have "types" for them anyway */    RTEMS_MONITOR_OBJECT_DRIVER    =  OBJECTS_RTEMS_CLASSES_LAST+1,    RTEMS_MONITOR_OBJECT_DNAME,    RTEMS_MONITOR_OBJECT_CONFIG,    RTEMS_MONITOR_OBJECT_INIT_TASK,    RTEMS_MONITOR_OBJECT_MPCI,    RTEMS_MONITOR_OBJECT_SYMBOL} rtems_monitor_object_type_t;/* * rtems_monitor_init() flags */#define RTEMS_MONITOR_SUSPEND	0x0001		/* suspend monitor on startup */#define RTEMS_MONITOR_GLOBAL    0x0002          /* monitor should be global *//* * Public interfaces for RTEMS data structures monitor is aware of. * These are only used by the monitor. * * NOTE: *  All the canonical objects that correspond to RTEMS managed "objects" *  must have an identical first portion with 'id' and 'name' fields. * *  Others do not have that restriction, even tho we would like them to. *  This is because some of the canonical structures are almost too big *  for shared memory driver (eg: mpci) and we are nickel and diming it. *//* * Type of a pointer that may be a symbol */#define MONITOR_SYMBOL_LEN 20typedef struct {    char       name[MONITOR_SYMBOL_LEN];    uint32_t   value;    uint32_t   offset;} rtems_monitor_symbol_t;typedef struct {    rtems_id            id;    rtems_name          name;  /* end of common portion */} rtems_monitor_generic_t;/* * Task */typedef struct {    rtems_id            id;    rtems_name          name;  /* end of common portion */    Thread_Entry        entry;    uint32_t            argument;    void               *stack;    uint32_t            stack_size;    rtems_task_priority priority;    States_Control      state;    rtems_event_set     events;    rtems_mode          modes;    rtems_attribute     attributes;    uint32_t            notepad[RTEMS_NUMBER_NOTEPADS];    rtems_id            wait_id;    uint32_t            wait_args;} rtems_monitor_task_t;/* * Init task */typedef struct {    rtems_id            id;		/* not really an id */    rtems_name          name;  /* end of common portion */    rtems_monitor_symbol_t entry;    uint32_t               argument;    uint32_t               stack_size;    rtems_task_priority    priority;    rtems_mode             modes;    rtems_attribute        attributes;} rtems_monitor_init_task_t;/* * Message queue */typedef struct {    rtems_id            id;    rtems_name          name;  /* end of common portion */    rtems_attribute     attributes;    uint32_t            number_of_pending_messages;    uint32_t            maximum_pending_messages;    uint32_t            maximum_message_size;} rtems_monitor_queue_t;/* * Extension */typedef struct {    rtems_id                 id;    rtems_name               name;  /* end of common portion */    rtems_monitor_symbol_t  e_create;    rtems_monitor_symbol_t  e_start;    rtems_monitor_symbol_t  e_restart;    rtems_monitor_symbol_t  e_delete;    rtems_monitor_symbol_t  e_tswitch;    rtems_monitor_symbol_t  e_begin;    rtems_monitor_symbol_t  e_exitted;    rtems_monitor_symbol_t  e_fatal;} rtems_monitor_extension_t;/* * Device driver */typedef struct {    rtems_id            id;		   /* not really an id (should be tho) */    rtems_name          name;              /* ditto */  /* end of common portion */    rtems_monitor_symbol_t initialization; /* initialization procedure */    rtems_monitor_symbol_t open;           /* open request procedure */    rtems_monitor_symbol_t close;          /* close request procedure */    rtems_monitor_symbol_t read;           /* read request procedure */    rtems_monitor_symbol_t write;          /* write request procedure */    rtems_monitor_symbol_t control;        /* special functions procedure */} rtems_monitor_driver_t;typedef struct {    rtems_id            id;		    /* not used for drivers (yet) */    rtems_name          name;               /* not used for drivers (yet) */  /* end of common portion */    uint32_t            major;    uint32_t            minor;    char                name_string[64];} rtems_monitor_dname_t;/* * System config */typedef struct {    void               *work_space_start;    uint32_t            work_space_size;    uint32_t            maximum_tasks;    uint32_t            maximum_timers;    uint32_t            maximum_semaphores;    uint32_t            maximum_message_queues;    uint32_t            maximum_partitions;    uint32_t            maximum_regions;    uint32_t            maximum_ports;    uint32_t            maximum_periods;    uint32_t            maximum_extensions;    uint32_t            microseconds_per_tick;    uint32_t            ticks_per_timeslice;    uint32_t            number_of_initialization_tasks;} rtems_monitor_config_t;/* * MPCI config */#if defined(RTEMS_MULTIPROCESSING)typedef struct {    uint32_t    node;                   /* local node number */    uint32_t    maximum_nodes;          /* maximum # nodes in system */    uint32_t    maximum_global_objects; /* maximum # global objects */    uint32_t    maximum_proxies;        /* maximum # proxies */    uint32_t                 default_timeout;        /* in ticks */    uint32_t                 maximum_packet_size;    rtems_monitor_symbol_t   initialization;    rtems_monitor_symbol_t   get_packet;    rtems_monitor_symbol_t   return_packet;    rtems_monitor_symbol_t   send_packet;    rtems_monitor_symbol_t   receive_packet;} rtems_monitor_mpci_t;#endif/* * The generic canonical information union */typedef union {    rtems_monitor_generic_t    generic;    rtems_monitor_task_t       task;    rtems_monitor_queue_t      queue;    rtems_monitor_extension_t  extension;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -