//标记元器件
 public override void stamp()
 {
     if (isOpen)
     {
         CirSim.stampVoltageSource(nodes[0], nodes[1], voltSource[0], 0);
     }
 }
Example #2
0
    //标记元器件
    public override void stamp()
    {
        if (isRun)
        {
            CirSim.stampVoltageSource(0, nodes[1], voltSource[0], 999);                 //输出电压为999
            isRun = false;                                                              //运行标志位置false
        }
        else
        {
            CirSim.stampVoltageSource(0, nodes[1], voltSource[0], 0);                   //输出电压为0
        }

        CirSim.stampResistor(nodes[0], nodes[3], 10);                           //0 3结点间为10欧姆的电阻
    }
Example #3
0
    //标记元器件
    public override void stamp()
    {
        if (ICState == -1)                                                         //开始录音,在连接话筒的两个端口施加电压
        {
            CirSim.stampVoltageSource(nodes[3], nodes[5], voltSource[0], 0.0555f); //标记两个连接话筒的端点 0.0555位话筒接收的电压值
            Debug.Log("ICState状态为-1");
        }

        if (ICState == 1)                                                       //播放录音,在输出端口施加电压
        {
            CirSim.stampVoltageSource(0, nodes[4], voltSource[0], 998f);        //输出电压为998
            Debug.Log("ICState状态为1");
        }

        Debug.Log("ICState状态为0");
        //标记电阻
        CirSim.stampResistor(nodes[6], nodes[0], resistance);          //6 0结点间为5欧姆的电阻
        CirSim.stampResistor(nodes[6], nodes[1], resistance);          //6 1结点间为5欧姆的电阻
        CirSim.stampResistor(nodes[6], nodes[2], resistance);          //6 2结点间为5欧姆的电阻
    }
Example #4
0
 //标记元器件
 public override void stamp()
 {
     CirSim.stampVoltageSource(nodes[0], nodes[1], voltSource[0], 0);        //标记元器件
 }
 //标记元器件
 public override void stamp()
 {
     CirSim.stampVoltageSource(nodes[0], nodes[1], voltSource[0], getVoltage());
 }