跳至主要内容

【转】等时传输的数据交易格式

等时传输只需令牌与数据两个封包阶段就可以形成一个数据交易的动作。图1,是一个等时传输的基本数据交易格式。

  图1 等时传输的基本数据交易格式

  用来实现等时数据传输的封包非常类似批量传输,只不过少了用来确认之用的握手封包。在PC主机同意去支持等时数据至TJO设各或从I/O设各输人等时数据之前,主机会协调出一个可保证的排序流程。等时传输是在每一个(微)帧所产生的,而PC会在同意建立这个连接(或管线)之前,将会确定在帧中可使用的带宽有多少。一个具各每一帧最高1 023字节的全速等时传输来说,可以使用到69%的USB带宽。因此,如果有两个全速设备想要建立每一帧传输1 023字节的等时管线,主机就会被第二个管线搞混掉。这是因为第二个数据传输将无法以剩下的带宽来传输。如果此时设各支持了具各在每一帧中较小的数据封包或较少封包的切换设置,那么设各的驱动程序就会加以要求,并切换至另一种配置方式。或者驱动程序在待会再测试一次,希望将有可使用的带宽。而当设备被配置后,等时传输就会被保证有其需要的传输间隔。

  通过图1,可以将等时传输的数据交易划分为下面所列的两种类型,IN与OUT令牌封包,如图2所示。其中,如果主机送出IN令牌封包,设备将会传回数据封包给主机。反之,若主机送出一个OUT令牌封包,将会有一个数据封包紧随在后送出给设备。由于等时传输不支持握手封包,所以数据错误不会再重新传一遍。若需要双方想来传输数据,则需要针对每一个方向配置一个分开的端点与管线。

  图2 时传输的两种基本数据交易格式

  如果主机在高速的总线上与全速设各执行等时传输,主机就会使用前一章所提及的分割数据交易的动作。等时OUT数据交易会使用起始分割数据交易(SS-PLIT),但却没有完成分割数据交易(CSPLIT)。这是因为设备不需要回报给主机任何状态信息。此外,等时传输也不会使用PING特殊封包的通信协议,如图3与4所示。

  图3 典型的等时our数据交易示意图

  图4 典型的等时IN数据交易示意图

  欢迎转载,信息来源维库电子市场网(www.dzsc.com


评论

此博客中的热门博文

【转】smb协议栈使用示例

/*  * * uncdownload.c  * *  * * Utility for downloading files from SMB shares using libsmbclient  * *  * * Copyright(C) 2006 Sophos Plc, Oxford, England.  * *  * * This program is free software; you can redistribute it and/or modify it under the terms of the  * * GNU General Public License Version 2 as published by the Free Software Foundation.  * *  * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  * * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  * * See the GNU General Public License for more details.  * *  * * You should have received a copy of the GNU General Public License along with this program; if not,  * * write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  * *  * */ # include < sys / types . h > # include < sys / time . h > # include ...

【转】Ether Types

Ether Types (last updated 2008-09-09) NOTE: Please see [RFC5342] for current information and registration procedures. This registry will be revised soon and will be replaced with up-to-date information. Many of the networks of all classes are Ethernets (10Mb) or Experimental Ethernets (3Mb). These systems use a message "type" field in much the same way the ARPANET uses the "link" field. If you need an Ether Type, contact: IEEE Registration Authority IEEE Standards Department 445 Hoes Lane Piscataway, NJ 08854 Phone +1 732 562 3813 Fax: +1 732 562 1571 Email: <ieee-registration-authority& ieee.org > http://standards.ieee.org/regauth/index.html The following list of EtherTypes is contributed unverified information from various sources. Another list of EtherTypes is maintained by Michael A. Patton and is accessible at: <URL: http://www.cavebear.com/CaveBear/Ethernet/ > <URL: ftp://ftp.cavebear.com/pub/Ethernet-codes > Assign...

【转】udp编程实例

UDP通讯实例 2008-04-29 15:30:05 / 个人分类: linux C编程 UDP协议的几点好处: 1.UDP不要求保持一个连接; 2.UDP没有因接收方认可收到数据包(或者当数据包没有正确抵达而自动重传)而带来的开销; 3.设计UDP的目的是用于短应用和控制信息; 4.在一个数据包接一个数据包的基础上,UDP要求的 网络 带宽比TCP更小。 UDP的几个缺点: 1.程序员必须创建代码检测传输错误并进行重传(如果应用程序要求这样做); 2.程序员必须把大数据包分片。 code: <1> /* * sender.c--UDP protocol example */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> int port = 6789; int main() {     int socket_descrīptor;     int iter = 0;     char buf[80];     struct sockaddr_in address;     /* Initialize socket address structure for Interner Protocols */     bzero(&address, sizeof(address)); // empty data structure     address.sin_family = AF_INET;     address.sin_addr.s_addr = inet_addr("127.0.0.1");     address...