完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
Heloi需要检索存储在远程服务器的TXT文件中的非常简单的数据,即:DATA TXT22.5,请您告诉我是否可以读取该文件并用GANICCTCPUM获取内容?我正在考虑用这种方式来证明这一点,但我真的不确定它最好继续进行:因为我需要在PIC需求上检索数据,PIC在需要时调用“CalimDebug .php”,该文件将读取预期的TXT文件内容,这是由于PHP代码,并将通过TCP。EngEngCPCPServer将接收它并用它做任何事情。任何建议或更好的解决方案将非常感谢。
以上来自于百度翻译 以下为原文 Hello I need to retrieve a very simple data stored into a TXT file located at distant server, ie : data.txt 22.5 Could you please tell me if i could read that file and get the contents with GenericTCPClient ? I'm thinking about this way to archieve that but i really not sure it the best to proceed : Since i need to retrieving the data on PIC demand, PIC calls "claimdata.php" when needed, that file would read the expected TXT file contents thanks to PHP code and would send it back to the PIC through TCP. Then, GenericTCPServer would receive it and do things with it. Any advices or better solution would be much appreciated. |
|
相关推荐
5个回答
|
|
是的,使用GraceTCP客户端,可能使用XML或JSON
以上来自于百度翻译 以下为原文 Yes, use GenericTCPClient and possibly XML or JSON |
|
|
|
是的,但是如何用GypCTCP客户端解析XML或其他文件呢?你能发布一个代码片段吗?
以上来自于百度翻译 以下为原文 Yes, but how do you parse xml or other file with GenericTCPclient ? Can you post a code snippet ? |
|
|
|
是的,但是如何用GypCTCP客户端解析XML或其他文件呢?你能发布一个代码片段吗?
以上来自于百度翻译 以下为原文 Yes, but how do you parse xml or other file with GenericTCPclient ? Can you post a code snippet ? |
|
|
|
无需解析任何东西。TCP客户端就是你所需要的。HTTP是如果远程服务器是Web服务器,通常使用的协议。只需向服务器发送几个头,然后再接收文件。文件前面会有几个头,你可以跳过。如果在远程主机上没有Web服务器,你就不需要HTTP。如果你愿意,你可以写一个程序,它会在远程服务器上侦听,并且只要有人把文件发送回来。这样,PIC将接收文件,而没有任何报头。
以上来自于百度翻译 以下为原文 There's no need to parse anything. TCP client is all you need. HTTP is the protocol you would normally use if the remote server is a Web server. You just send few headers to the server and receive the file back. There will be few headers in front of the file, which you can simply skip. If there's no Web server on the remote host, you don't need HTTP. If you wish, you can write a program which will listen on the remote server and as soon as anybody connects send the file back. This way, PIC will receive file as is without any headers. |
|
|
|
是的,正如Northguy所说的——如果你想使它变得很容易。否则,一旦你建立了所有的基础设施,你就可以添加XML或JSON解析。
以上来自于百度翻译 以下为原文 Yep, as Northguy says - if you want to make it very easy. Otherwise, once you have all the infrastructure set up, you can add XML or JSON parsing. |
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3174 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
734浏览 1评论
615浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
506浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
631浏览 0评论
528浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 21:38 , Processed in 1.391257 second(s), Total 87, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号