|
戴眼镜的马
初级用户
 
积分 126
发帖 13
注册 2003-6-30
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
to->>秋蝉
收到了您的Email,我回了,但是被退回。是不是您的Email已经坏了呢?
我是杭州的,一个研究院的。只要是实时控制的。
to->>glinda
谢谢您的指点。麻烦问一下了。在BC31的工程文件文件中,怎么使用*.lib文件呢?是不是直接使用Add Item菜单,把WATTCPLG.lib插入到工程中就可以了呢?这个办法其实我试过的,不行呀。
to->>Qiuchan
Received your email, I replied, but it was returned. Is your email broken?
I'm from Hangzhou, working in a research institute. It's about real-time control.
to->>glinda
Thank you for your guidance. May I ask, in the project file of BC31, how to use the *.lib file? Do I just use the Add Item menu to insert WATTCPLG.lib into the project? I actually tried this method, but it didn't work.
|
|
2003-7-5 00:00 |
|
|
秋蝉
初级用户
 
积分 152
发帖 19
注册 2003-5-22
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
1。ttp://www.jkmicro.com/documentation/pdf/borland.pdf 有关于bc4.5连接wattcp的工程环境定义详细说明(我没有验证)
2。想make也能连接成功就不用BC4.5了:应用程序编译连接批处理如下
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FC2000.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCCALC.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCHIS.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCINIT.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCSET.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCSETSYS.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCSHOW.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include IPX.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include KB_MQ.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include KB_TRQ.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include WJ_ZQ.CPP
tlink c0h FC2000 FCCALC FCHIS FCINIT FCSET FCSETSYS FCSHOW IPX KB_MQ KB_TRQ WJ_ZQ DLD16C,Fc2000,,wattcphg graphics fp87 mathh ch,
3。装好网卡驱动后,运行他的例子程序怎么还说“NO PACKET DRVER FOUND“?你哪里可以吗?
1. http://www.jkmicro.com/documentation/pdf/borland.pdf has detailed descriptions of the project environment definition for connecting WattCP with BC4.5 (I haven't verified it)
2. If you want make to connect successfully, you don't need BC4.5: The batch for application compilation and linking is as follows
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FC2000.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCCALC.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCHIS.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCINIT.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCSET.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCSETSYS.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include FCSHOW.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include IPX.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include KB_MQ.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include KB_TRQ.CPP
bcc -c -mh -r- -v- -IE:\borlandc\include -LE:\borlandc\include WJ_ZQ.CPP
tlink c0h FC2000 FCCALC FCHIS FCINIT FCSET FCSETSYS FCSHOW IPX KB_MQ KB_TRQ WJ_ZQ DLD16C,Fc2000,,wattcphg graphics fp87 mathh ch,
3. After installing the network card driver, why does it still say "NO PACKET DRVER FOUND" when running his example program? Can it work for you?
|
|
2003-7-5 00:00 |
|
|
秋蝉
初级用户
 
积分 152
发帖 19
注册 2003-5-22
状态 离线
|
|
2003-7-5 00:00 |
|
|
秋蝉
初级用户
 
积分 152
发帖 19
注册 2003-5-22
状态 离线
|
|
2003-7-5 00:00 |
|
|
戴眼镜的马
初级用户
 
积分 126
发帖 13
注册 2003-6-30
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
我这里用make后,连接的*.exe运行是没有问题的。
但是从接受到的8019的单片机的灯来看,发送的数据间隔时间是不对的。我已经用了delay(30)这样的话,在接收端8019的灯,应该也是30ms亮一次。可以好像不对。
我在8019这边单步跟踪数据,发现发过来的数据好像是对的。
为什么我一定要在BC31里加入*.lib,道理很简单,因为我想对自己的c文件进行进行单步跟踪呀。可是到现在还是不行呀。
下面我是在DOS应用WATTCP,对原来的\apps\tcptack参考后,自己修改的,通过网络发送514字节,前面2个自己表示后面数据包长度是512个,通过make连接成功的.c源代码。请大家参考,指正。事实说明这个代码发送数据的间隔是有问题的。
#include
#include
#include
#include
#include
#include
#define LIGHT_PORT 12345
int main(int argc, char *argv)
{
longword remoteip;
static tcp_Socket s;
char *host;
unsigned char inbuf,outbuf;
sock_init();
remoteip = inet_addr( "192.168.0.10" );
if ( !tcp_open( &s, 0, remoteip, LIGHT_PORT, NULL )) {
cputs("Unable to open connection."<img src="images/smilies/face-wink.png" align="absmiddle" border="0">;
exit( 1 );
}
printf("Connect..Sucess\n"<img src="images/smilies/face-wink.png" align="absmiddle" border="0">;
// sock_wait_established( &s, sock_delay,NULL, &status);
// sock_puts( &s, inet_ntoa(buffer,gethostid()));
// sock_puts( &s, user );
// sock_wait_input( &s, sock_delay, NULL, &status );
// sock_gets( &s, buffer, sizeof( buffer ));
/* we are connected */
while ( 1 ) {
// if (sock_dataready( &s )) {
// sock_gets( &s, rbuffer, sizeof( rbuffer ));
// add_msg( remoteuser, rbuffer );
// sock_read( &s, inbuf, 5140 );
// }
*(unsigned int*)outbuf = (unsigned int)512;
outbuf = 1;outbuf = 2;
sock_write( &s, outbuf,514 );
delay(30);
printf("Out data Over \n"<img src="images/smilies/face-wink.png" align="absmiddle" border="0">;
if( kbhit() )
break;
}
exit( 0 );
return (0); /* not reached */
}
After using make here, the connection to the *.exe runs without problems. However, from the lights of the 8019 single-chip microcomputer received, the interval of the sent data is incorrect. I have used delay(30), in this case, the light of the 8019 on the receiving end should also light up once every 30ms. But it seems not right. I tracked the data step by step on the 8019 side and found that the data sent over seems to be correct. Why do I have to add *.lib in BC31? The reason is very simple, because I want to step through my own c file. But it's still not working now. The following is the.c source code that I modified after referring to the original \apps\tcptack in the DOS application WATTCP, and it sends 514 bytes over the network. The first 2 bytes represent that the length of the subsequent data packet is 512 bytes. The connection is successful through make. Please refer to and correct it. The fact shows that there is a problem with the interval of data sent by this code.
#include
#include
#include
#include
#include
#include
#define LIGHT_PORT 12345
int main(int argc, char *argv)
{
longword remoteip;
static tcp_Socket s;
char *host;
unsigned char inbuf,outbuf;
sock_init();
remoteip = inet_addr( "192.168.0.10" );
if ( !tcp_open( &s, 0, remoteip, LIGHT_PORT, NULL )) {
cputs("Unable to open connection.");
exit( 1 );
}
printf("Connect..Sucess\n");
// sock_wait_established( &s, sock_delay,NULL, &status);
// sock_puts( &s, inet_ntoa(buffer,gethostid()));
// sock_puts( &s, user );
// sock_wait_input( &s, sock_delay, NULL, &status );
// sock_gets( &s, buffer, sizeof( buffer ));
/* we are connected */
while ( 1 ) {
// if (sock_dataready( &s )) {
// sock_gets( &s, rbuffer, sizeof( rbuffer ));
// add_msg( remoteuser, rbuffer );
// sock_read( &s, inbuf, 5140 );
// }
*(unsigned int*)outbuf = (unsigned int)512;
outbuf = 1;outbuf = 2;
sock_write( &s, outbuf,514 );
delay(30);
printf("Out data Over \n");
if( kbhit() )
break;
}
exit( 0 );
return (0); /* not reached */
}
|
|
2003-7-6 00:00 |
|
|
戴眼镜的马
初级用户
 
积分 126
发帖 13
注册 2003-6-30
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
to-》》1。ttp://www.jkmicro.com/documentation/pdf/borland.pdf 这个地址仅仅是怎么创建一个*.prj。然后加入一个*.cpp文件,并没有说,怎么加入*.lib呀。
请你再验证一下,
to-》》1.ttp://www.jkmicro.com/documentation/pdf/borland.pdf This address only shows how to create a *.prj and add a *.cpp file, but it doesn't say how to add a *.lib. Please verify it again.
|
|
2003-7-6 00:00 |
|
|
Lane
银牌会员
    
积分 1833
发帖 648
注册 2002-11-8
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
我没有编过关于网络的程序,也没有在PRJ中加入过LIB………………
帮不上什么忙了…………
I haven't programmed about networks, and I haven't added LIBs to PRJ...
Can't help much...
|
|
2003-7-6 00:00 |
|
|
glinda
初级用户
 
积分 144
发帖 15
注册 2003-5-26
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
to 秋蝉 那个地址连不上啊?能不能发给我一份啊?谢谢!
blue_viv@sohu.com
to Qiuchan, that address can't be connected. Can you send me a copy? Thanks!
blue_viv@sohu.com
|
|
2003-7-7 00:00 |
|
|
glinda
初级用户
 
积分 144
发帖 15
注册 2003-5-26
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
to 戴眼镜的马 在bc中lib文件是这么用的。但是你应该在工程文件中先将在库中包括了的源文件删掉。
To 戴眼镜的马 In BC, the way to use the lib file is like this. But you should first delete the source files that are included in the library in the project file.
|
|
2003-7-7 00:00 |
|
|
戴眼镜的马
初级用户
 
积分 126
发帖 13
注册 2003-6-30
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
to-->>glinda麻烦问一下:到底怎么用?
是否可以给我发一个编译已经通过了BC31的*.prj,并且在.prj中有库文件.lib包含的。
多谢。
to-->>glindaExcuse me: How exactly to use it?
Can you send me a *.prj that has passed compilation in BC31, and there are library files .lib included in the .prj.
Thanks.
|
|
2003-7-7 00:00 |
|
|
glinda
初级用户
 
积分 144
发帖 15
注册 2003-5-26
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
直接加入lib文件就可以了,你那样做应该是没错的。
我也试着建了一个prj文件加入wattcp的库,不好使。不用咱们重新生成它的库吧?
另外我再问一个傻问题,写完的makefile文件该怎么用啊?:)多谢!
Just add the lib file directly, what you did should be correct.
I also tried to create a prj file and add the wattcp library, but it didn't work. Do we not need to regenerate its library?
Also, I have another silly question. How do I use the written makefile file? : ) Thanks!
|
|
2003-7-7 00:00 |
|
|
戴眼镜的马
初级用户
 
积分 126
发帖 13
注册 2003-6-30
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
to-->>glinda
怎么生成wattcp库呢。呵呵,如果可以生成那太好了。
makefile写好,在当前目录下运行make.exe程序,这个make程序是在\borlandc\bin目录下。所以你的Dos路径要设置一下path=c:\borlandc\bin,应该就可以了。以上的make是BC3.1的。
to-->>glinda
How to generate the wattcp library? Hehe, it would be great if it can be generated.
The makefile is written, and run the make.exe program in the current directory. This make program is in the \borlandc\bin directory. So you need to set the Dos path, set path=c:\borlandc\bin, and it should be okay. The above make is for BC3.1.
|
|
2003-7-7 00:00 |
|
|
glinda
初级用户
 
积分 144
发帖 15
注册 2003-5-26
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
我还想问一下,makefile是不是于在编译器中编译一个工程有一样的作用啊?
I also want to ask, does a makefile have the same function as compiling an engineering project in a compiler?
|
|
2003-7-8 00:00 |
|
|
戴眼镜的马
初级用户
 
积分 126
发帖 13
注册 2003-6-30
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
to->>glinda
是的。makefile的作用就是工程文件的作用。
呵呵。
今天我听斑竹说,你的wattcp好像有点功力的,不知道是否写过一个wattcp的tcp程序呢。
to->>glinda
Yes. The role of the makefile is the same as that of a project file.
Hehe.
Today I heard from the moderator that your wattcp seems quite capable. I wonder if you have written a wattcp TCP program.
|
|
2003-7-8 00:00 |
|
|
glinda
初级用户
 
积分 144
发帖 15
注册 2003-5-26
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
我?不是吧,我也是刚起步啊。跟你还差得远呢!!
我是有任务,必须要搞这个啊!!只好硬着头皮上了,你看我净问些傻问题,就知道我没什么功底了。:)不过我想跟着它的例程编程,一定可以的。
大家一块切磋吧。看你的进展还更快些呢。多多指教啊!
Me? No way, I'm just starting out too. I'm still far behind you!!
I have a task and have to do this!! I can only bite the bullet and do it. You see, I'm just asking silly questions, which shows I don't have much foundation. : ) But I think I can program following its examples.
Let's learn from each other. It seems your progress is faster. Please give me more advice!
|
|
2003-7-8 00:00 |
|