geral吧 关注:5贴子:215
  • 11回复贴,共1
[P0]
Type=Normal
Direction=LEFT
Pin_Def=BATT
Pin_Nb=Ae
Pdt_65Pin=61
FP_CON1=56
FP_CON2=0
OS_Num=1,2
OS_PtType=Internal,0
OS_1=Short_Hat,0
OS1_Num=1,2
OS1_PtType=External,0
OS1_1=Switch,SW
OS11_Num=4,0
OS11_1=Circle_Pin,157
OS11_2=Current_PCB,in3,out3
OS11_3=Circle_Pin,158
OS11_4=Circle_Pin,159
OS2_Num=5,0
OS2_1=Switch,SW
OS2_2=Resistor,2.4k,1
OS2_3=LED,0
OS2_4=GND,0
OS2_5=Circle_Pin,127
[Part_Path]
part_path=C:\Users\Administrator\Desktop\CC_PANEL\PART\


IP属地:广东1楼2014-06-16 09:08回复
    // SocketTest1.cpp : 定义控制台应用程序的入口点。
    //
    #include "stdafx.h"
    #include <iostream>
    #include <fstream>
    #include <Windows.h>
    #include <wininet.h>
    using namespace std;
    typedef unsigned char byte;
    #define MAXBLOCKSIZE 1024
    #pragma comment (lib, "wininet.lib")
    void download(const wchar_t*);
    int _tmain(int argc, _TCHAR* argv[])
    {
    download(_T("http://zhidao.baidu.com"));
    return 0 ;
    //if(argc > 1){
    // download((const char*)argv[1]);
    //}else{
    // cout<<"Usage: auto-Update url";
    //}
    //return 0;
    }
    void download(const wchar_t *Url)
    {
    HINTERNET hSession = InternetOpen(_T("RookIE/1.0"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
    if (hSession != NULL)
    {
    HINTERNET handle2 = InternetOpenUrl(hSession, Url, NULL, 0, INTERNET_FLAG_DONT_CACHE, 0);
    if (handle2 != NULL)
    {
    wcout<<Url<<endl;
    byte Temp[MAXBLOCKSIZE];
    ULONG Number = 1;
    ofstream ofs(_T("D:\\baidu.txt"));
    if(ofs)
    {
    while (Number > 0)
    {
    InternetReadFile(handle2, Temp, MAXBLOCKSIZE - 1, &Number);
    ofs<<Temp;
    }
    ofs.close();
    }
    InternetCloseHandle(handle2);
    handle2 = NULL;
    }
    InternetCloseHandle(hSession);
    hSession = NULL;
    }
    }


    IP属地:广东2楼2014-06-30 11:45
    回复
      [P0]
      Type=Normal
      Direction=RIGHT
      Pin_Def=BATT
      Pin_Nb=Ae
      Pdt_65Pin=61
      FP_CON1=56
      FP_CON2=0
      OS_Num=4,3
      OS_PtType1=Internal,0
      OS_PtType2=Internal,0
      OS_PtType3=Internal,0
      OS_1=Short_Hat,0
      OS_2=GND_MODEL,2.4k,1%
      OS_3=Switch,0
      OS_4=External,0
      OS1_Num=4,0
      OS1_1=Circle_Pin,157
      OS1_2=Current_PCB,in3,out3
      OS1_3=Circle_Pin,158
      OS1_4=Circle_Pin,159
      OS2_Num=4,0
      OS2_1=Circle_Pin,157
      OS2_2=Current_PCB,in3,out3
      OS2_3=Circle_Pin,158
      OS2_4=Circle_Pin,159
      OS3_Num=4,0
      OS3_1=Circle_Pin,157
      OS3_2=Current_PCB,in3,out3
      OS3_3=Circle_Pin,158
      OS3_4=Circle_Pin,159
      [Part_Path]
      part_path=C:\Users\Administrator\Desktop\CC_PANEL\PART\
      d=(arxload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
      e=(arxunload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
      [P1]
      Type=Normal
      Direction=RIGHT
      Pin_Def=Ign
      Pin_Nb=Ad
      Pdt_65Pin=64
      FP_CON1=0
      FP_CON2=55
      OS_Num=4,0
      OS_1=Short_Hat,0
      OS_2=GND_MODEL,2.4k,1%
      OS_3=Switch,0
      OS_4=External,0
      [P2]
      Type=Normal
      Direction=RIGHT
      Pin_Def=5V
      Pin_Nb=Pb
      Pdt_65Pin=42
      FP_CON1=22
      FP_CON2=0
      OS_Num=4,0
      OS_1=Short_Hat,0
      OS_2=Switch,0
      OS_3=GND_MODEL,2.4k,1%
      OS_4=External,1
      [P3]
      Type=Normal
      Direction=RIGHT
      Pin_Def=SOLAR_L
      Pin_Nb=Pr
      Pdt_65Pin=18
      FP_CON1=9
      FP_CON2=0
      OS_Num=4,0
      OS_1=Short_Hat,0
      OS_2=Switch,0
      OS_3=V_Resistor,100k
      OS_4=External,1
      [P4]
      Type=Normal
      Direction=RIGHT
      Pin_Def=SOLAR_L
      Pin_Nb=Ps
      Pdt_65Pin=19
      FP_CON1=10
      FP_CON2=0
      OS_Num=4,0
      OS_1=Short_Hat,0
      OS_2=Switch,0
      OS_3=V_Resistor,100k
      OS_4=External,1


      IP属地:广东3楼2014-06-30 21:01
      回复
        [P0]
        Type=Normal
        Direction=RIGHT
        Pin_Def=BATT
        Pin_Nb=Ae
        Pdt_65Pin=61
        FP_CON1=56
        FP_CON2=0
        OS_Num=4,3
        OS_PtType1=Internal,0
        OS_PtType2=Internal,0
        OS_PtType3=Internal,0
        OS_1=Short_Hat,0
        OS_2=GND_MODEL,2.4k,1%
        OS_3=Switch,0
        OS_4=External,0
        OS1_Num=4,0
        OS1_1=Circle_Pin,157
        OS1_2=Current_PCB,in3,out3
        OS1_3=Circle_Pin,158
        OS1_4=Circle_Pin,159
        OS2_Num=4,0
        OS2_1=Circle_Pin,157
        OS2_2=Current_PCB,in3,out3
        OS2_3=Circle_Pin,158
        OS2_4=Circle_Pin,159
        OS3_Num=4,0
        OS3_1=Circle_Pin,157
        OS3_2=Current_PCB,in3,out3
        OS3_3=Circle_Pin,158
        OS3_4=Circle_Pin,159
        [Part_Path]
        part_path=C:\Users\Administrator\Desktop\CC_PANEL\PART\
        (arxload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
        (arxunload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
        [P1]
        Type=Normal
        Direction=RIGHT
        Pin_Def=Ign
        Pin_Nb=Ad
        Pdt_65Pin=64
        FP_CON1=0
        FP_CON2=55
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=GND_MODEL,2.4k,1%
        OS_3=Switch,0
        OS_4=External,0
        [P2]
        Type=Normal
        Direction=RIGHT
        Pin_Def=5V
        Pin_Nb=Pb
        Pdt_65Pin=42
        FP_CON1=22
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=GND_MODEL,2.4k,1%
        OS_4=External,1
        [P3]
        Type=Normal
        Direction=RIGHT
        Pin_Def=M1
        Pin_Nb=Pr
        Pdt_65Pin=18
        FP_CON1=9
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=GND_MODEL,2.4k,1%
        OS_4=5Pin_Motor,motor1$1,12345
        [P4]
        Type=Normal
        Direction=RIGHT
        Pin_Def=M2
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=GND_MODEL,2.4k,1%
        OS_4=5Pin_Motor,motor1$2,12345
        [P5]
        Type=Normal
        Direction=RIGHT
        Pin_Def=M2
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=3,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=5Pin_Motor,motor1$3,12345
        [P6]
        Type=Normal
        Direction=RIGHT
        Pin_Def=M3
        Pin_Nb=Pr
        Pdt_65Pin=18
        FP_CON1=9
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=GND_MODEL,2.4k,1%
        OS_4=5Pin_Motor,motor2$1,12345
        [P7]
        Type=Normal
        Direction=RIGHT
        Pin_Def=M4
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=GND_MODEL,2.4k,1%
        OS_4=5Pin_Motor,motor2$2,12345
        [P8]
        Type=Normal
        Direction=RIGHT
        Pin_Def=M2M2
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=3,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=5Pin_Motor,motor2$3,12345
        [P9]
        Type=Normal
        Direction=RIGHT
        Pin_Def=5V
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=GND_MODEL,2.4k,1%
        OS_4=External,1
        [P10]
        Type=Normal
        Direction=RIGHT
        Pin_Def=sensor
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=V_Resistor,100k,1%
        OS_4=External,1
        [P11]
        Type=Normal
        Direction=RIGHT
        Pin_Def=sensor2
        Pin_Nb=Ps
        Pdt_65Pin=19
        FP_CON1=10
        FP_CON2=0
        OS_Num=4,0
        OS_1=Short_Hat,0
        OS_2=Switch,0
        OS_3=V_Resistor,100k,1%
        OS_4=External,1


        IP属地:广东4楼2014-07-09 01:40
        回复
          思路:
          excel输出时自动计算其面板模块,下拉带电阻,下拉不带电阻,上拉带电阻,上拉不带电阻。特殊模块另外计算,lsah,lsbh,sh等,考虑出现的情况。
          模块导出后作为属性并入,后期读取时可以直接判断并加载对应模块。
          每个LSSH模块需要对label增加定位,增加初始化导入,加枚举,加blkname,Createpart加静态创造函数,留意文本坐标。


          IP属地:广东5楼2014-07-09 01:46
          回复
            [P0]
            Type=Normal
            Direction=RIGHT
            Pin_Def=BATT
            Pin_Nb=Ae
            Pdt_65Pin=61
            FP_CON1=56
            FP_CON2=0
            PanelType=LSSH
            OS_Num=4,3
            OS_PtType1=Internal,0
            OS_PtType2=Internal,0
            OS_PtType3=Internal,0
            OS_1=Short_Hat,0
            OS_2=GND_MODEL,2.4k,1%
            OS_3=Switch,0
            OS_4=External,0
            OS1_Num=4,0
            OS1_1=Circle_Pin,157
            OS1_2=Current_PCB,in3,out3
            OS1_3=Circle_Pin,158
            OS1_4=Circle_Pin,159
            OS2_Num=4,0
            OS2_1=Circle_Pin,157
            OS2_2=Current_PCB,in3,out3
            OS2_3=Circle_Pin,158
            OS2_4=Circle_Pin,159
            OS3_Num=4,0
            OS3_1=Circle_Pin,157
            OS3_2=Current_PCB,in3,out3
            OS3_3=Circle_Pin,158
            OS3_4=Circle_Pin,159
            [Part_Path]
            part_path=C:\Users\Administrator\Desktop\CC_PANEL\PART\
            (arxload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
            (arxunload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
            [P1]
            Type=Normal
            Direction=RIGHT
            Pin_Def=Ign
            Pin_Nb=Ad
            Pdt_65Pin=64
            FP_CON1=0
            FP_CON2=55
            PanelType=LSSH
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=GND_MODEL,2.4k,1%
            OS_3=Switch,0
            OS_4=External,0
            [P2]
            Type=Normal
            Direction=RIGHT
            Pin_Def=ET
            Pin_Nb=Pb
            Pdt_65Pin=42
            PanelType=LSSH
            FP_CON1=22
            FP_CON2=0
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=GND_MODEL,2.4k,1%
            OS_4=External,0
            [P3]
            Type=Normal
            Direction=RIGHT
            Pin_Def=M1
            Pin_Nb=Pr
            Pdt_65Pin=18
            FP_CON1=9
            FP_CON2=0
            PanelType=LSSH
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=GND_MODEL,2.4k,1%
            OS_4=5Pin_Motor,motor1$1,12345
            [P4]
            Type=Normal
            Direction=RIGHT
            Pin_Def=M2
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=LSSH
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=GND_MODEL,2.4k,1%
            OS_4=5Pin_Motor,motor1$2,12345
            [P5]
            Type=Normal
            Direction=RIGHT
            Pin_Def=M2
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=SH
            OS_Num=3,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=5Pin_Motor,motor1$3,12345
            [P6]
            Type=Normal
            Direction=RIGHT
            Pin_Def=M3
            Pin_Nb=Pr
            Pdt_65Pin=18
            FP_CON1=9
            FP_CON2=0
            PanelType=LSSH
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=GND_MODEL,2.4k,1%
            OS_4=5Pin_Motor,motor2$1,12345
            [P7]
            Type=Normal
            Direction=RIGHT
            Pin_Def=M4
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=LSSH
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=GND_MODEL,2.4k,1%
            OS_4=5Pin_Motor,motor2$2,12345
            [P8]
            Type=Normal
            Direction=RIGHT
            Pin_Def=M2M2
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=SH
            OS_Num=3,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=5Pin_Motor,motor2$3,12345
            [P9]
            Type=Normal
            Direction=RIGHT
            Pin_Def=5V
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=LSSH
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=GND_MODEL,2.4k,1%
            OS_4=External,1
            [P10]
            Type=Normal
            Direction=RIGHT
            Pin_Def=sensor
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=PTTM
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=V_Resistor,100k,1%
            OS_4=External,1
            [P11]
            Type=Normal
            Direction=RIGHT
            Pin_Def=sensor2
            Pin_Nb=Ps
            Pdt_65Pin=19
            FP_CON1=10
            FP_CON2=0
            PanelType=PTTM
            OS_Num=4,0
            OS_1=Short_Hat,0
            OS_2=Switch,0
            OS_3=V_Resistor,100k,1%
            OS_4=External,1


            IP属地:广东6楼2014-07-16 09:07
            回复
              [L0]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L1]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT2
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L2]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT3
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L3]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT4
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L4]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT2
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L5]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT2
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L6]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT2
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L7]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT21
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L8]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT22
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L9]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT23
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [L10]
              Type=Normal
              Direction=LEFT
              Pin_Def=BATT24
              Pin_Nb=Ae
              Pdt_65Pin=61
              FP_CON1=56
              FP_CON2=0
              PanelType=LSSH
              OS_Num=3,0
              OS_PtType1=Internal,0
              OS_PtType2=Internal,0
              OS_PtType3=Internal,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              [Part_Path]
              part_path=C:\Users\Administrator\Desktop\CC_PANEL\PART\
              (arxload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
              (arxunload "C:\\Users\\Administrator\\Desktop\\CC_Panel\\x64\\Debug\\GCC_PANEL.arx")
              OS_4=External,3
              OS1_Num=4,0
              OS1_1=Circle_Pin,157
              OS1_2=Current_PCB,in3,out3
              OS1_3=Circle_Pin,158
              OS1_4=Circle_Pin,159
              OS2_Num=4,0
              OS2_1=Circle_Pin,157
              OS2_2=Current_PCB,in3,out3
              OS2_3=Circle_Pin,158
              OS2_4=Circle_Pin,159
              OS3_Num=4,0
              OS3_1=Circle_Pin,157
              OS3_2=Current_PCB,in3,out3
              OS3_3=Circle_Pin,158
              OS3_4=Circle_Pin,159
              [R0]
              Type=Normal
              Direction=RIGHT
              Pin_Def=Ign1
              Pin_Nb=Ad
              Pdt_65Pin=64
              FP_CON1=0
              FP_CON2=55
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              OS_4=External,0
              [R1]
              Type=Normal
              Direction=RIGHT
              Pin_Def=Ign2
              Pin_Nb=Ad
              Pdt_65Pin=64
              FP_CON1=0
              FP_CON2=55
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=GND_MODEL,2.4k,1%
              OS_3=Switch,0
              OS_4=External,0
              [R2]
              Type=Normal
              Direction=RIGHT
              Pin_Def=ET3
              Pin_Nb=Pb
              Pdt_65Pin=42
              PanelType=LSSH
              FP_CON1=22
              FP_CON2=0
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=GND_MODEL,2.4k,1%
              OS_4=External,0
              [R3]
              Type=motor
              Direction=RIGHT
              Pin_Def=M1
              Pin_Nb=Pr
              Pdt_65Pin=18
              FP_CON1=9
              FP_CON2=0
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=GND_MODEL,2.4k,1%
              OS_4=5Pin_Motor,motor1$1,12345
              [R4]
              Type=motor
              Direction=RIGHT
              Pin_Def=M2
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=GND_MODEL,2.4k,1%
              OS_4=5Pin_Motor,motor1$2,12345
              [R5]
              Type=motor
              Direction=RIGHT
              Pin_Def=M22
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=SH
              OS_Num=3,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=5Pin_Motor,motor1$3,12345
              [R6]
              Type=motor
              Direction=RIGHT
              Pin_Def=M3
              Pin_Nb=Pr
              Pdt_65Pin=18
              FP_CON1=9
              FP_CON2=0
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=GND_MODEL,2.4k,1%
              OS_4=5Pin_Motor,motor2$1,12345
              [R7]
              Type=motor
              Direction=RIGHT
              Pin_Def=M4
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=GND_MODEL,2.4k,1%
              OS_4=5Pin_Motor,motor2$2,12345
              [R8]
              Type=motor
              Direction=RIGHT
              Pin_Def=M2M2
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=SH
              OS_Num=3,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=5Pin_Motor,motor2$3,12345
              [R9]
              Type=Normal
              Direction=RIGHT
              Pin_Def=5V
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=LSSH
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=GND_MODEL,2.4k,1%
              OS_4=External,1
              [R10]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R11]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor2
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R12]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor3
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R13]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor4
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R14]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R15]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor2
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R16]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor3
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R17]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor4
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R18]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R19]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor2
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R20]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor3
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,1
              [R21]
              Type=Normal
              Direction=RIGHT
              Pin_Def=sensor4
              Pin_Nb=Ps
              Pdt_65Pin=19
              FP_CON1=10
              FP_CON2=0
              PanelType=PTTM
              OS_Num=4,0
              OS_1=Short_Hat,0
              OS_2=Switch,0
              OS_3=V_Resistor,100k,1%
              OS_4=External,


              IP属地:广东7楼2014-07-22 08:34
              回复
                [R22]
                Type=Normal
                Direction=RIGHT
                Pin_Def=sensor3
                Pin_Nb=Ps
                Pdt_65Pin=19
                FP_CON1=10
                FP_CON2=0
                PanelType=PTTM
                OS_Num=4,0
                OS_1=Short_Hat,0
                OS_2=Switch,0
                OS_3=V_Resistor,100k,1%
                OS_4=External,1
                [R23]
                Type=Normal
                Direction=RIGHT
                Pin_Def=sensor4
                Pin_Nb=Ps
                Pdt_65Pin=19
                FP_CON1=10
                FP_CON2=0
                PanelType=PTTM
                OS_Num=4,0
                OS_1=Short_Hat,0
                OS_2=Switch,0
                OS_3=V_Resistor,100k,1%
                OS_4=External,1
                [R24]
                Type=Normal
                Direction=RIGHT
                Pin_Def=sensor3
                Pin_Nb=Ps
                Pdt_65Pin=19
                FP_CON1=10
                FP_CON2=0
                PanelType=MOTER
                OS_Num=4,0
                OS_1=Short_Hat,0
                OS_2=Switch,0
                OS_3=V_Resistor,100k,1%
                OS_4=External,1
                [R25]
                Type=Normal
                Direction=RIGHT
                Pin_Def=sensor4
                Pin_Nb=Ps
                Pdt_65Pin=19
                FP_CON1=10
                FP_CON2=0
                PanelType=MOTER
                OS_Num=4,0
                OS_1=Short_Hat,0
                OS_2=Switch,0
                OS_3=V_Resistor,100k,1%
                OS_4=External,1
                [motor0]
                width=71
                length=84
                hole_x=34
                hole_y=50
                PinNum=3
                P1=R3
                P2=R4
                P3=R5
                [motor1]
                width=71
                length=84
                hole_x=34
                hole_y=50
                PinNum=3
                P1=R6
                P2=R7
                P3=R8


                IP属地:广东8楼2014-07-22 08:36
                回复
                  // TCPIP_CLASS_TEST_1.cpp : 定义控制台应用程序的入口点。
                  //
                  #include "stdafx.h"
                  #include "TCPIP_CLASS_TEST_1.h"
                  #include <iostream>
                  #include <afxsock.h>
                  #ifdef _DEBUG
                  #define new DEBUG_NEW
                  #endif
                  using std::endl;
                  using std::cout;
                  using std::cin;
                  // 唯一的应用程序对象
                  CWinApp theApp;
                  using namespace std;
                  int socket_test(void);
                  int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
                  {
                  int nRetCode = 0;
                  // 初始化 MFC 并在失败时显示错误
                  if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
                  {
                  // TODO: 更改错误代码以符合您的需要
                  _tprintf(_T("错误: MFC 初始化失败\n"));
                  nRetCode = 1;
                  }
                  else
                  {
                  // TODO: 在此处为应用程序的行为编写代码。
                  socket_test();
                  }
                  return nRetCode;
                  }
                  int socket_test(void){
                  CSocket CS,cserver;
                  int iPort=1024;
                  LPCTSTR addrs=_T("127.0.0.1");
                  ::AfxSocketInit();
                  if(!CS.Socket()){
                  cout<<"Error on socket"<<endl;
                  return -1;
                  }
                  bool optval=true;
                  int optvallen=sizeof(bool);
                  /*if(!CS.SetSockOpt(SO_REUSEADDR,(void*)optval,optvallen,65535)){
                  cout<<"setsocket error"<<endl;
                  return -2;
                  }*/
                  SOCKADDR_IN saddr_in,server_addr;
                  saddr_in.sin_addr.s_addr=inet_addr("127.0.0.1");
                  saddr_in.sin_family=AF_INET;
                  saddr_in.sin_port=htons(iPort);
                  if(!CS.Bind((SOCKADDR*)&saddr_in,sizeof(SOCKADDR))){
                  cout<<"bind fail"<<endl;
                  return -3;
                  }
                  if(!CS.Listen(5)){
                  cout<<"listen fail, errorcode = "<<WSAGetLastError()<<endl;
                  return -4;
                  }
                  int client_addrlen;
                  if(!CS.Accept(cserver,(SOCKADDR*)&server_addr,&client_addrlen)){
                  cout<<"accept fail, errorcode = "<<WSAGetLastError()<<endl;
                  return -5;
                  }
                  cout<<"client addr = "<<server_addr.sin_addr.s_addr<<endl;
                  char asend[15]="abc";
                  CS.Send((void*)asend,15);
                  CS.Close();
                  return 0;
                  }


                  IP属地:广东9楼2014-12-22 19:32
                  收起回复
                    // TCP_IP_TESE_1_VC2005.cpp : 定义控制台应用程序的入口点。
                    //
                    #include "stdafx.h"
                    #include <WinSock2.h>
                    #include <ws2tcpip.h>
                    #include <iostream>
                    #pragma comment(lib,"ws2_32.lib")
                    using std::cout;
                    using std::endl;
                    int InitTCP(LPWSADATA lpWSAData);
                    int ExitTCP(void);
                    int _tmain(int argc, _TCHAR* argv[])
                    {
                    LPWSADATA lpWSAData=new WSADATA();
                    if(InitTCP(lpWSAData)!=0){
                    return 1;
                    }
                    SOCKET sk;
                    sk=socket(AF_INET,SOCK_STREAM,0);
                    if(sk==SOCKET_ERROR){
                    cout<<"SK ERR: "<<sk<<endl;
                    return 2;
                    }
                    struct sockaddr_in sock;
                    sock.sin_family=AF_INET;
                    sock.sin_port=htons(800);
                    //sock.sin_addr.s_addr=inet_addr("127.0.0.1");
                    sock.sin_addr.s_addr=inet_addr("0.0.0.0");
                    //if(connect(sk,(struct sockaddr*)&sock,sizeof(sock))==SOCKET_ERROR){
                    //cout<<"connect fail, error code = "<<WSAGetLastError()<<endl;
                    //return SOCKET_ERROR;
                    //}
                    //cout<<"connect ok"<<endl;
                    int ret;
                    if((ret=bind(sk,(struct sockaddr *)&sock,sizeof(sock)))==SOCKET_ERROR){
                    cout<<"bind fail, error code = "<<WSAGetLastError()<<endl;
                    return 4;
                    }
                    cout<<"bind ok, ret = "<<ret<<endl;
                    if((ret=listen(sk,1))==SOCKET_ERROR){
                    cout<<"listen fail, error code = "<<WSAGetLastError()<<endl;
                    return 5;
                    }
                    cout<<"listen OK, ret = "<<ret<<endl;
                    sockaddr_in sock_c;
                    int *addr_len= new int();
                    *addr_len=(int)sizeof(sock_c);
                    SOCKET sk2;
                    sk2=accept(sk,(struct sockaddr *)&sock_c,addr_len);
                    //cout<<"accept error, error code = "<<WSAGetLastError()<<endl;
                    //return 6;
                    cout<<"accept OK"<<endl;
                    cout<<"address is: "<<sock_c.sin_addr.s_addr<<endl
                    <<"port is: "<<sock_c.sin_port<<endl;
                    ::Sleep(1000);
                    char buff[] = "hahaha";
                    if((ret = send(sk2,buff,10,0))<0){
                    cout<<"send fail, error code = "<<WSAGetLastError()<<endl
                    <<"ret = "<<ret<<endl;
                    return 7;
                    }
                    closesocket(sk);
                    ExitTCP();
                    delete lpWSAData;
                    return 0;
                    }
                    int InitTCP(LPWSADATA lpWSAData){
                    WORD wVersionRequested;
                    wVersionRequested = MAKEWORD(2, 2);//winsock 2.2
                    int err;
                    if (err=WSAStartup(wVersionRequested,lpWSAData)!=0)
                    {
                    cout<<"startup fail"<<endl;
                    return err;
                    }
                    cout<<"start up ok"<<endl
                    <<"version is: "<<lpWSAData->wVersion<<endl
                    <<"iMaxsockets: " <<lpWSAData->iMaxSockets<<endl
                    <<"iMaxUdpdg: "<<lpWSAData->iMaxUdpDg<<endl
                    //<<"vendorinfo: "<<lpWSAData->lpVendorInfo<<endl
                    <<"szdescription: "<<lpWSAData->szDescription<<endl
                    <<"systemstatus: "<<lpWSAData->szSystemStatus<<endl
                    <<"High Version: "<<lpWSAData->wHighVersion<<endl;
                    if (LOBYTE(lpWSAData->wVersion) != 2 || HIBYTE(lpWSAData->wVersion) != 2){
                    cout<<"Could not find a usable version of Winsock.dll"<<endl;
                    WSACleanup();
                    return 1;
                    }
                    else{
                    cout<<"The Winsock 2.2 dll was found okay"<<endl;
                    }
                    return 0;
                    }
                    int ExitTCP(void){
                    WSACleanup();
                    return 0;
                    }


                    IP属地:广东10楼2014-12-22 19:32
                    收起回复