• 【嵌入式开源库】timeslice的使用,完全解耦的时间片轮询框架构


    简介

    timeslice是一个时间片轮询框架,他是一个完全解耦的时间片轮询框架,他的使用非常方便,该项目一共有四个文件分别是tieslice的头文件和源文件以及list的头文件和源文件,tieslice是负责轮询任务,list是一个双向链表负责任务的管理,在Linux内核中使用非常广泛也很经典,该框架是参考rtt实时操作系统的侵入式链表实现的,本章文章是将该框架移植到stm32单片机上实验,使用也非常容易,单片机只需要启用一个定时器作为时钟即可;

    本章使用环境:

    stm32f407vet6
    代码工程使用cubemx创建

    项目代码

    该项目的代码是我在微信公众号上看到的一个文章,代码并没有上传在github上,这里直接贴上源代码;

    timeslice.h

    #ifndef _TIMESLICE_H
    #define _TIMESLICE_H
    
    #include "list.h"
    
    typedef enum {
        TASK_STOP,
        TASK_RUN
    } IsTaskRun;
    
    typedef struct timesilce
    {
        unsigned int id;
        void (*task_hdl)(void);
        IsTaskRun is_run;
        unsigned int timer;
        unsigned int timeslice_len;
        ListObj timeslice_task_list;
    } TimesilceTaskObj;
    
    void timeslice_exec(void);
    void timeslice_tick(void);
    void timeslice_task_init(TimesilceTaskObj* obj, void (*task_hdl)(void), unsigned int id, unsigned int timeslice_len);
    void timeslice_task_add(TimesilceTaskObj* obj);
    void timeslice_task_del(TimesilceTaskObj* obj);
    unsigned int timeslice_get_task_timeslice_len(TimesilceTaskObj* obj);
    unsigned int timeslice_get_task_num(void);
    unsigned char timeslice_task_isexist(TimesilceTaskObj* obj);
    
    #endif
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30

    timeslice.c

    
    #include "timeslice.h"
    
    static LIST_HEAD(timeslice_task_list);
    
    void timeslice_exec()
    {
        ListObj* node;
        TimesilceTaskObj* task;
    
        list_for_each(node, &timeslice_task_list)
        {
    
            task = list_entry(node, TimesilceTaskObj, timeslice_task_list);
            if (task->is_run == TASK_RUN)
            {
                task->task_hdl();
                task->is_run = TASK_STOP;
            }
        }
    }
    
    void timeslice_tick()
    {
        ListObj* node;
        TimesilceTaskObj* task;
    
        list_for_each(node, &timeslice_task_list)
        {
            task = list_entry(node, TimesilceTaskObj, timeslice_task_list);
            if (task->timer != 0)
            {
                task->timer--;
                if (task->timer == 0)
                {
                    task->is_run = TASK_RUN;
                    task->timer = task->timeslice_len;
                }
            }
        }
    }
    
    unsigned int timeslice_get_task_num()
    {
        return list_len(&timeslice_task_list);
    }
    
    void timeslice_task_init(TimesilceTaskObj* obj, void (*task_hdl)(void), unsigned int id, unsigned int timeslice_len)
    {
        obj->id = id;
        obj->is_run = TASK_STOP;
        obj->task_hdl = task_hdl;
        obj->timer = timeslice_len;
        obj->timeslice_len = timeslice_len;
    }
    
    void timeslice_task_add(TimesilceTaskObj* obj)
    {
        list_insert_before(&timeslice_task_list, &obj->timeslice_task_list);
    }
    
    void timeslice_task_del(TimesilceTaskObj* obj)
    {
        if (timeslice_task_isexist(obj))
            list_remove(&obj->timeslice_task_list);
        else
            return;
    }
    
    
    unsigned char timeslice_task_isexist(TimesilceTaskObj* obj)
    {
        unsigned char isexist = 0;
        ListObj* node;
        TimesilceTaskObj* task;
    
        list_for_each(node, &timeslice_task_list)
        {
            task = list_entry(node, TimesilceTaskObj, timeslice_task_list);
            if (obj->id == task->id)
                isexist = 1;
        }
    
        return isexist;
    }
    
    unsigned int timeslice_get_task_timeslice_len(TimesilceTaskObj* obj)
    {
        return obj->timeslice_len;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90

    list.h

    
    #ifndef _LIST_H
    #define _LIST_H
    
    #define offset_of(type, member)             (unsigned long) &((type*)0)->member
    #define container_of(ptr, type, member)     ((type *)((char *)(ptr) - offset_of(type, member)))
    
    typedef struct list_structure
    {
        struct list_structure* next;
        struct list_structure* prev;
    } ListObj;
    
    #define LIST_HEAD_INIT(name)    {&(name), &(name)}
    #define LIST_HEAD(name)         ListObj name = LIST_HEAD_INIT(name)
    
    void list_init(ListObj* list);
    void list_insert_after(ListObj* list, ListObj* node);
    void list_insert_before(ListObj* list, ListObj* node);
    void list_remove(ListObj* node);
    int list_isempty(const ListObj* list);
    unsigned int list_len(const ListObj* list);
    
    #define list_entry(node, type, member) \
        container_of(node, type, member)
    
    #define list_for_each(pos, head) \
        for (pos = (head)->next; pos != (head); pos = pos->next)
    
    #define list_for_each_safe(pos, n, head) \
      for (pos = (head)->next, n = pos->next; pos != (head); \
        pos = n, n = pos->next)
    
    #endif
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34

    list.c

    #include "list.h"
    
    void list_init(ListObj* list)
    {
        list->next = list->prev = list;
    }
    
    void list_insert_after(ListObj* list, ListObj* node)
    {
        list->next->prev = node;
        node->next = list->next;
    
        list->next = node;
        node->prev = list;
    }
    
    void list_insert_before(ListObj* list, ListObj* node)
    {
        list->prev->next = node;
        node->prev = list->prev;
    
        list->prev = node;
        node->next = list;
    }
    
    void list_remove(ListObj* node)
    {
        node->next->prev = node->prev;
        node->prev->next = node->next;
    
        node->next = node->prev = node;
    }
    
    int list_isempty(const ListObj* list)
    {
        return list->next == list;
    }
    
    unsigned int list_len(const ListObj* list)
    {
        unsigned int len = 0;
        const ListObj* p = list;
        while (p->next != list)
        {
            p = p->next;
            len++;
        }
    
        return len;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50

    创建工程

    配置高速时钟和低速时钟为外部晶振提供
    在这里插入图片描述
    配置调试模式为sw调试模式

    在这里插入图片描述配置时钟频率
    在这里插入图片描述配置led,这里我的板子是这三个io接入的是led
    在这里插入图片描述
    配置一个10ms的定时器(1000000hz / 1000ms == 1ms = 1khz 就得到10ms需要计数10000重载)记得打开中断
    在这里插入图片描述
    在这里插入图片描述

    配置工程并生成,工程名设置,单独生成.c.h文件拷贝库文件
    在这里插入图片描述
    在这里插入图片描述在这里插入图片描述
    下面开始代码的移植工作;

    移植代码

    首先我们需要将该开源项目的代码添加到工程中
    在这里插入图片描述在定时器中断服务函数中添加timeslice轮询函数
    在这里插入图片描述在这里插入图片描述

    void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
    {
    	if(htim->Instance == TIM3)
    	{
    		timeslice_tick();
    	}
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    然后我们需要在main函数中启动定时器并在while1中调用exec函数调度时间片

     HAL_TIM_Base_Start_IT(&htim3);
      /* USER CODE END 2 */
    
      /* Infinite loop */
      /* USER CODE BEGIN WHILE */
      while (1)
      {
        /* USER CODE END WHILE */
    
        /* USER CODE BEGIN 3 */
    	  
    	  timeslice_exec();
      }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    到这里我们的移植工作就做完了,该项目的解耦效果真的非常好,移植相当简单,然后我们创建几个任务实验一下效果;

    实验

    /* USER CODE BEGIN Header */
    /**
      ******************************************************************************
      * @file           : main.c
      * @brief          : Main program body
      ******************************************************************************
      * @attention
      *
      * Copyright (c) 2023 STMicroelectronics.
      * All rights reserved.
      *
      * This software is licensed under terms that can be found in the LICENSE file
      * in the root directory of this software component.
      * If no LICENSE file comes with this software, it is provided AS-IS.
      *
      ******************************************************************************
      */
    /* USER CODE END Header */
    /* Includes ------------------------------------------------------------------*/
    #include "main.h"
    #include "tim.h"
    #include "gpio.h"
    
    /* Private includes ----------------------------------------------------------*/
    /* USER CODE BEGIN Includes */
    #include "timeslice.h"
    /* USER CODE END Includes */
    
    /* Private typedef -----------------------------------------------------------*/
    /* USER CODE BEGIN PTD */
    
    /* USER CODE END PTD */
    
    /* Private define ------------------------------------------------------------*/
    /* USER CODE BEGIN PD */
    
    /* USER CODE END PD */
    
    /* Private macro -------------------------------------------------------------*/
    /* USER CODE BEGIN PM */
    
    /* USER CODE END PM */
    
    /* Private variables ---------------------------------------------------------*/
    
    /* USER CODE BEGIN PV */
    void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
    {
    	if(htim->Instance == TIM3)
    	{
    		timeslice_tick();
    	}
    }
    
    
    // 创建3个任务对象
    TimesilceTaskObj task_1, task_2, task_3;
    
    // 具体的任务函数
    void task1_hdl()
    {
        HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_13);
    }
    
    void task2_hdl()
    {
        HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_14 );
    }
    
    void task3_hdl()
    {
        HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_15);
    }
    
    // 初始化任务对象,并且将任务添加到时间片轮询调度中
    void task_init()
    {
        timeslice_task_init(&task_1, task1_hdl, 1, 1);
        timeslice_task_init(&task_2, task2_hdl, 2, 1);
        timeslice_task_init(&task_3, task3_hdl, 3, 1);
    
        timeslice_task_add(&task_1);
        timeslice_task_add(&task_2);
        timeslice_task_add(&task_3);
    }
    /* USER CODE END PV */
    
    /* Private function prototypes -----------------------------------------------*/
    void SystemClock_Config(void);
    /* USER CODE BEGIN PFP */
    
    /* USER CODE END PFP */
    
    /* Private user code ---------------------------------------------------------*/
    /* USER CODE BEGIN 0 */
    
    /* USER CODE END 0 */
    
    /**
      * @brief  The application entry point.
      * @retval int
      */
    int main(void)
    {
      /* USER CODE BEGIN 1 */
    
      /* USER CODE END 1 */
    
      /* MCU Configuration--------------------------------------------------------*/
    
      /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
      HAL_Init();
    
      /* USER CODE BEGIN Init */
    
      /* USER CODE END Init */
    
      /* Configure the system clock */
      SystemClock_Config();
    
      /* USER CODE BEGIN SysInit */
    
      /* USER CODE END SysInit */
    
      /* Initialize all configured peripherals */
      MX_GPIO_Init();
      MX_TIM3_Init();
      /* USER CODE BEGIN 2 */
      HAL_TIM_Base_Start_IT(&htim3);
    	task_init();
      /* USER CODE END 2 */
    
      /* Infinite loop */
      /* USER CODE BEGIN WHILE */
      while (1)
      {
        /* USER CODE END WHILE */
    
        /* USER CODE BEGIN 3 */
    	  
    	  timeslice_exec();
      }
      /* USER CODE END 3 */
    }
    
    /**
      * @brief System Clock Configuration
      * @retval None
      */
    void SystemClock_Config(void)
    {
      RCC_OscInitTypeDef RCC_OscInitStruct = {0};
      RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
    
      /** Configure the main internal regulator output voltage
      */
      __HAL_RCC_PWR_CLK_ENABLE();
      __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
    
      /** Initializes the RCC Oscillators according to the specified parameters
      * in the RCC_OscInitTypeDef structure.
      */
      RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
      RCC_OscInitStruct.HSEState = RCC_HSE_ON;
      RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
      RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
      RCC_OscInitStruct.PLL.PLLM = 25;
      RCC_OscInitStruct.PLL.PLLN = 336;
      RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
      RCC_OscInitStruct.PLL.PLLQ = 4;
      if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
      {
        Error_Handler();
      }
    
      /** Initializes the CPU, AHB and APB buses clocks
      */
      RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                                  |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
      RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
      RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
      RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
      RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
    
      if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
      {
        Error_Handler();
      }
    }
    
    /* USER CODE BEGIN 4 */
    
    /* USER CODE END 4 */
    
    /**
      * @brief  This function is executed in case of error occurrence.
      * @retval None
      */
    void Error_Handler(void)
    {
      /* USER CODE BEGIN Error_Handler_Debug */
      /* User can add his own implementation to report the HAL error return state */
      __disable_irq();
      while (1)
      {
      }
      /* USER CODE END Error_Handler_Debug */
    }
    
    #ifdef  USE_FULL_ASSERT
    /**
      * @brief  Reports the name of the source file and the source line number
      *         where the assert_param error has occurred.
      * @param  file: pointer to the source file name
      * @param  line: assert_param error line source number
      * @retval None
      */
    void assert_failed(uint8_t *file, uint32_t line)
    {
      /* USER CODE BEGIN 6 */
      /* User can add his own implementation to report the file name and line number,
         ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
      /* USER CODE END 6 */
    }
    #endif /* USE_FULL_ASSERT */
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226

    核心部分

    // 创建3个任务对象
    TimesilceTaskObj task_1, task_2, task_3;
    
    // 具体的任务函数
    void task1_hdl()
    {
        HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_13);
    }
    
    void task2_hdl()
    {
        HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_14 );
    }
    
    void task3_hdl()
    {
        HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_15);
    }
    
    // 初始化任务对象,并且将任务添加到时间片轮询调度中
    void task_init()
    {
        timeslice_task_init(&task_1, task1_hdl, 1, 1);
        timeslice_task_init(&task_2, task2_hdl, 2, 2);
        timeslice_task_init(&task_3, task3_hdl, 3, 3);
    
        timeslice_task_add(&task_1);
        timeslice_task_add(&task_2);
        timeslice_task_add(&task_3);
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30

    需要注意的是必须要有一个任务是需要在exec前创建,这样才能保证运行,其他的任务可以在这个任务中再创建,上面的实验是实现三个任务,三个任务分别为一个中断触发一次,第二个任务是每隔两个中断触发一次,第三个任务是每隔三个中断触发一次任务;

    函数说明

    timeslice_task_init

    初始化任务函数

    void timeslice_task_init(TimesilceTaskObj* obj, void (*task_hdl)(void), unsigned int id, unsigned int timeslice_len)
    {
        obj->id = id;
        obj->is_run = TASK_STOP;
        obj->task_hdl = task_hdl;
        obj->timer = timeslice_len;
        obj->timeslice_len = timeslice_len;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    在这个函数中将任务结构体参数初始化,id类似于任务名称用于区分任务,is_run是一个标志位用于判断该任务在该次中断是否需要执行,task_hd1表示函数指针也就是我们的任务函数,timer表示每多少次中断触发一次计数,timeslice_len 表示没多少次中断触发一次计数初始值,在timeslice_tick中当timer的值减到0任务将触发并会重新复位timer的值为 timeslice_len ;
    在这里插入图片描述

    timeslice_task_add

    添加任务到双向链表中

    void timeslice_task_add(TimesilceTaskObj* obj)
    {
        list_insert_before(&timeslice_task_list, &obj->timeslice_task_list);
    }
    
    void list_insert_before(ListObj* list, ListObj* node)
    {
        list->prev->next = node;
        node->prev = list->prev;
    
        list->prev = node;
        node->next = list;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    该链表(timeslice_task_list)在timeslice_tick中会轮询进行遍历

    timeslice_tak_del

    删除正在运行的任务链表

    void timeslice_task_del(TimesilceTaskObj* obj)
    {
        if (timeslice_task_isexist(obj))
            list_remove(&obj->timeslice_task_list);
        else
            return;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    在该函数中会通过timeslice_task_isexist函数去判断链表中是否存在该任务的id,如果存在将返回退出允许,这里涉及到一个Linux中的函数list_entry->container_of,该函数是通过结构体的某个变量获取整个结构体的指针位置,有兴趣可以去学习一下该项目代码的实现;

    timeslice_get_task_num

    获取当前任务数量,也就是链表的长度

    unsigned int timeslice_get_task_num()
    {
        return list_len(&timeslice_task_list);
    }
    
    unsigned int list_len(const ListObj* list)
    {
        unsigned int len = 0;
        const ListObj* p = list;
        while (p->next != list)
        {
            p = p->next;
            len++;
        }
    
        return len;
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18

    结尾

    整体的代码不算复杂但是是值得学习的一个项目,我是凉开水白菜祝各位程序员们节日快乐~ 咱们下文见~

  • 相关阅读:
    使用.NET7和C#11打造最快的序列化程序-以MemoryPack为例
    go语言和redis数据库
    [附源码]计算机毕业设计校园疫情管理系统Springboot程序
    Docker——本文来自AI创作助手
    【ESP 保姆级教程】疯狂Node.js服务器篇 ——本地部署MQTT服务器以及剖析MQTT过程
    [附源码]Python计算机毕业设计Django的玉石交易系统
    electron无法设置自己的图标?渲染进程require报错?
    NR 物理层编码 S1 -概述
    基于java+ssm+vue+mysql的校园快领服务系统
    别再用if-else了,分享一下我使用“策略模式”的项目经验...
  • 原文地址:https://blog.csdn.net/qq_43581670/article/details/134020633