Git Product home page Git Product logo

libsimulator's Introduction

libsimulator

依赖工具

  1. git
  2. bash

依赖系统库

  1. history (可更换)
  2. readline (可更换)
  3. termcap
  4. pthread
  5. owent-utils/c-cpp 中的部分内容

本工具引用的组件

  1. CmdShell 终端输入捕获工具, 依赖 CmdShell.h, CmdShell.cpp, readline 库
  2. ShellFont 终端字体生成工具, 依赖 ShellFont.h, ShellFont.cpp
  3. CmdOption 指令绑定工具, 依赖 CmdOption 内全部内容

更新提示

如果需要使用自定义的readline库(比如用libedit来脱离对readline中GPL的依赖),请在cmake选项中加 -DREADLINE_ROOT=[lib的安装目录]

终端说明

终端控制指令说明见

http://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html

仿真工具默认命令:

?, -h, --help, help                     查看帮助
-his, --history, --history-file         <file path> 操作历史文件名
-pro, --proto, --proto-log              <file path> 协议可视化文件名
-ptm, --player-threadpool-max           <number> 玩家线程池最大线程数
-ni, --no-interactive                   无用户输入
-f, --rf, --read-file                   执行命令文件
-c, --cmd                               执行命令
......
自定义命令

命令行模式下默认系统命令:

!, sh                                   <cmd> [args ...] 执行系统命令
exit, quit                              退出
?, help                                 查看命令列表
SetCmdPlayer                            设置命令行所控制的用户

程序接口

框架接口 @see include/Simulator.h

自定义调度器 @see include/DispatcherImpl.h

玩家类型 @see include/PlayerImpl.h

自定义命令 @see include/ReqRspBase.h

定时器 @see include/TimerImpl.h

注记

写得比较乱,目前仅给自己所在的项目中使用

libsimulator's People

Contributors

owent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.