当前位置首页 > 百科> 正文

enable

2019-11-21 21:11:03 百科
enable

enable

Enable, 英文单词,意思为使能够。被用于多种函式、系统命令与程式语言中。

基本介绍

  • 中文名:使能够
  • 外文名:enable
  • 英音:[in'eibl]
  • 美音:[in'ebl]

词典解释

enable英音:[in'eibl]美音:[in'ebl]
vt.
1. 使能够,使(成为)可能,使可行,使容易,使有效,使实现;
(enable sb. to do )
例句:Aeronautics enables us to overcome great distances. 航空学使我们能征服远距离。
The bird's large wings enable it to fly. (enable sb to do something)
这鸟的大翅膀使它能飞。
2.为(做某事)提供手段(或条件、机会等); 例句:This dictionary enables us to understand English words. 这部词典能帮助我们理解英语辞彙。
3.授予…权力,授权给,许可,批准。 例句:This document will enable her to pass through the enemy lines unmolested. 这证件将使她能平安无事地通过敌人防线。
4.变形:动词过去式enabled 过去式enabled , 现在分词enabling 第三人称单数enables

函式名

功 能: 开放硬体中断
用 法: void enable(void);
程式例:
/* ** NOTE:
This is an interrupt service routine. You can NOT compile this program
with Test Stack Overflow turned on and get an executable file which will
operate correctly.
*/
#include <stdio.h>
#include <dos.h>
#include <conio.h>
/* The clock tick interrupt */
#define INTR 0X1C
void interrupt ( *oldhandler)(void);
int count=0;
void interrupt handler(void)
{
/*
disable interrupts during the handling of the interrupt
*/
disable();
/* increase the global counter */
count++;
/*
re enable interrupts at the end of the handler
*/
enable();
/* call the old routine */
oldhandler();
}
int main(void)
{
/* save the old interrupt vector */
oldhandler = getvect(INTR);
/* install the new interrupt handler */
setvect(INTR, handler);
/* loop until the counter exceeds 20 */
while (count < 20)
printf("count is %d\n",count);
/* reset the old interrupt handler */
setvect(INTR, oldhandler);
return 0;
}

系统命令

enable是cisco路由和交换设备的一个常用命令,用于将设备从当前的用户模式切换至特权模式(用户模式只能查看设备初始化信息,特权模式查看所有信息、调试、保存配置信息)。
用户模式只能查看设备信息,使用PING命令。特权模式则进入配置模式,可以修改设备配置信息。

命令用法

假如当前设备名是Switch,进入设备后首先处于用户模式(符号为“ > ”)。
输入enable命令后,设备将从用户模式(符号为“>”)升级至特权模式(符号为“#”),
示例:
Switch > (当前为用户模式)
Switch > enable (输入enable命令)
Switch # (切换至特权模式)

命令安全性

由于enable能够进入设备的特权模式,修改设备全部配置信息,为保证命令安全性,CISCO系统设定了enable密码,只有经过密码验证才能成功进入特权模式,否则退回用户模式。
建议首次启用 cisco 设备后,建立enable安全性配置,保证设备系统的访问安全。
设定enable密码主要有 enable password **** 和 enable secret **** 两个命令。****为设定的密码。以上两个命令均要在设备的全局模式(conf)下配置。
1、enable password **** ,设定普通密码,以明文方式保存在配置档案中,可以在show running-configure看到,普通级别的加密。
示例:
switch > enable (进入特权模式)
switch # configure terminal (进入全局配置模式)
switch(conf) # enable password aaaa (设定普通密码aaaa)
通过 show running-configure 可以查看设备配置的明文密码,如下:
Switch#sh run
Building configuration...
Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password aaaa (明文密码显示)
!
!
2、enable secret **** ,设定高级密码,以密文方式保存在配置档案中,无法在show running-configure看到,使用的是MD5算法加密。
注:secret 的级别高于password,如果两个密码同时设定,则secret 的密码生效,password的密码不生效。
示例:
switch > enable (进入特权模式)
switch # configure terminal (进入全局配置模式)
switch(conf) # enable secret aaaa (设定高级密码aaaa)
通过 show running-configure 无法查看设备配置的明文密码,如下:
Switch#sh run
Building configuration...
Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable secret 5 $1$mERr$hy8E2yMknG1VFOpEO7zOL1 (密码以MD5加密后的乱码显示,无法查看到明文)
!
!

程式语言

用途

获取或设定一个值,该值指示是否启用应用程式域。
命名空间:System.Web.Configuration
程式集:System.Web(在 system.web.dll 中)

语法

Visual Basic(声明)
Public Property Enable As Boolean
Visual Basic(用法)
Dim instance As HttpRuntimeSection
Dim value As Boolean
value = instance.Enable
instance.Enable = value

电气方面

常用来作为晶片或接口的使能连线埠,比如IIC,SPI或FLASH的使用前,CPU需要使能该汇流排或外设的ENABLE脚,通知器件CPU正準备访问或使用它。
ENABLE管脚的使用,可以让CPU处理和访问多外设或多汇流排环境。
声明:此文信息来源于网络,登载此文只为提供信息参考,并不用于任何商业目的。如有侵权,请及时联系我们:baisebaisebaise@yeah.net