Renode 的命令

在 Monitor 窗口连续按 TAB 键两次,会将当前可用的命令和实例罗列出来。

执行 mach create 命令创建 machine 后,将会自动创建 machinesysbus 实例。

Renode 可执行命令分三种:内建命令,命令,实例。
未创建 machine 之前,连续按 TAB 键两次,所有可用命令如下,有 + 的是内建命令,有 - 的是命令,其它为实例:

- commandFromHistory
- history
- alias
- allowPrivates
- analyzers
  connector
+ console_log
- createPlatform
- currentTime
+ dump
+ dump_file
+ echo
  emulation
  EmulationManager
- execute
+ get_environ
- help
  host
- include
- lastLog
- log
- logFile
- logLevel
- mach
- macro
+ next_value
- numbersMode
- path
- pause
- peripherals
  plugins
- python
- quit
- require
- runMacro
- set
- showAnalyzer
+ sleep
- start
- string
- using
- verboseMode
- version
- watch

实例有:connectoremulationEmulationManagerhostplugins,创建 machine 后又增加 machinesysbus 实例。

内建命令没有帮助,命令可以使用 help cmd 查看帮助,例如输入help watch,将输出:

(monitor) help watch
watch [ w ]
executes a command periodically, showing output in monitor
Usage:
watch "<command>" <refresh period in ms>

实例可以仅输入实例名后回车来获取帮助,例如输入 host,将输出:

(monitor) host
The following methods are available:
 - Void AddHostMachineElement (IHostMachineElement element, String name)
 - Void DebugLog (String message)
 - Void Dispose ()
 - IEnumerable<String> GetNames ()
 - Void Log (LogLevel type, String message)
 - Void NoisyLog (String message)
 - Void RemoveHostMachineElement (String name)
 - Void RemoveHostMachineElement (IHostMachineElement element)
Usage:
 host MethodName param1 param2 ...
The following fields are available:
 - String HostMachineName (read only)
Usage: 
 - get: host fieldName
 - set: host fieldName Value

Clearing the emulation

(machine-0) Clear

这里的 Clear 实际上是 EmulationManager Clear

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
解释下面代码功能#include<iostream> #include<cstring> #include<cmath> using namespace std; int Node[50]; int number; int Calculate(char x)//计算偏移 { if(x>=97&&x<=122) return 0; switch(x) { case '!': case '^': case '(': case ')': return 1; case '|': case '-': return 2; case '<': return 3; default: return 1; } } int CalculateOut(string &Word,int n,int m)//输出||、->、<->,等等 { int i; if(m!=0) { for(i=1; i<m; i++)cout<<Word[n+i]; if(Word[i+n]!='\0') cout<<" "; } } int Input(string &Word)//输出数据 { int m,i,tag,q; number=0; for(i=0; Word[i]!='\0'; ) { q=i; if(Word[i]==' ') { i++; continue; } cout<<Word[i]; tag=Calculate(Word[i]); CalculateOut(Word,i,tag); i+=tag;//偏移 if(!tag)//数字计数 { Node[Word[q]-97]++; number++; if(Word[i+1]!='\0') cout<<" "; i++; } } cout<<endl; return number; } int Bin(int n,int m) { int bin[10000]; int a,b,i=0; do { a=n%2; n/=2; bin[i++]=a; } while(n>0); for(n=0; n<m-i; n++) { cout<<"0 "; } for(n=i-1; n>=0; n--) { cout<<bin[n]; if(n) cout<<" "; } } int Outnumber(int n) { int i,m=1; for(i=1; i<n; i++) { m=m*2+1; } for(i=m; i>=0; i--) { Bin(i,n); cout<<endl; } } void CoutNode() { int i,temp=0; for(i=0; i<50; i++) { if(temp==0&&Node[i]!=0) { cout.put(97+i); temp++; } else if(Node[i]!=0) { cout<<" "; cout.put(97+i); temp++; } } number=temp; cout<<endl; } int ReNode()//初始化 { for(int i=0; i<110; i++) Node[i]=0; } int Turn(char Map[400],string &Word) { int n,i; for(i=0,n=0;i<=strlen(Map);i++) { if(Map[i]!=' ') { Word[n]=Map[i]; n++; } } Word[n]='\0'; } int main() { int n,i; string Word; char Map[400]; while(gets(Map)!=NULL)//输入 { ReNode(); Turn(Map,Word); Input(Word); CoutNode(); Outnumber(number); } // Bin(2); }
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值