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

📄 asrcask.c

📁 linux平台下类似著名的电路板作图软件 Spice的源代码
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1987 Kanwar Jit Singh**********//* * singh@ic.Berkeley.edu *//* * This routine gives access to the internal device parameters * of Current Controlled Voltage Source */#include "spice.h"#include <stdio.h>#include "cktdefs.h"#include "devdefs.h"#include "ifsim.h"#include "asrcdefs.h"#include "sperror.h"#include "util.h"#include "suffix.h"/* ARGSUSED */intASRCask(ckt,instPtr,which,value,select)    CKTcircuit *ckt;    GENinstance *instPtr;    int which;    IFvalue *value;    IFvalue *select;{    register ASRCinstance *here = (ASRCinstance*)instPtr;    switch(which) {        case ASRC_CURRENT:            value->tValue = here->ASRCtype == ASRC_CURRENT ?                     here->ASRCtree : NULL;            return (OK);        case ASRC_VOLTAGE:            value->tValue = here->ASRCtype == ASRC_VOLTAGE ?                     here->ASRCtree : NULL;            return (OK);        case ASRC_POS_NODE:            value->iValue = here->ASRCposNode;            return (OK);        case ASRC_NEG_NODE:            value->iValue = here->ASRCnegNode;            return (OK);        case ASRC_OUTPUTCURRENT:	    value->rValue = ckt->CKTrhsOld[here->ASRCbranch];            return (OK);        case ASRC_OUTPUTVOLTAGE:	    value->rValue = ckt->CKTrhsOld[here->ASRCposNode] -		ckt->CKTrhsOld[here->ASRCnegNode];	    return(OK);        default:            return (E_BADPARM);    }    /* NOTREACHED */}

⌨️ 快捷键说明

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