This application note describes a method for developing block-oriented I/O device drivers
for applications that use the DSP/BIOS real-time kernel and includes examples that run
with Code Composer Studio v2.1 on the Texas Instruments TMS320C5402 and
TMS320C6711 DSP Starter Kits (DSKs). The device driver model presented here has
now been superceded with an updated version that supports not only block oriented
devices, but also devices such as UARTs, PCI and USB buses and Multimedia cards.
Documentation on the updated driver model as well as example drivers and source code
can be found in the Device Driver Developer s Kit product now available for download
from the TI Developer s Village.
本書(shū)第二部分講述的是在Wi n 3 2平臺(tái)上的Wi n s o c k編程。對(duì)于眾多的基層網(wǎng)絡(luò)協(xié)議,
Wi n s o c k是訪問(wèn)它們的首選接口。而且在每個(gè)Wi n 3 2平臺(tái)上,Wi n s o c k都以不同的形式存在著。
Wi n s o c k是網(wǎng)絡(luò)編程接口,而不是協(xié)議。它從U n i x平臺(tái)的B e r k e l e y(B S D)套接字方案借鑒了
許多東西,后者能訪問(wèn)多種網(wǎng)絡(luò)協(xié)議。在Wi n 3 2環(huán)境中,Wi n s o c k接口最終成為一個(gè)真正的
“與協(xié)議無(wú)關(guān)”接口,尤其是在Winsock 2發(fā)布之后。
本章專(zhuān)門(mén)講解編寫(xiě)成功網(wǎng)絡(luò)應(yīng)用程序時(shí)所需的基本知識(shí)和A P I調(diào)用。通過(guò)上一章的學(xué)習(xí),
大家已知道從Wi n s o c k地址機(jī)和這些機(jī)器上的服務(wù),可以很容易地訪問(wèn)協(xié)議。在這一章里,
我們打算討論如何從網(wǎng)絡(luò)上的一臺(tái)機(jī)器到另一臺(tái)機(jī)器建立連接,以及如何收發(fā)數(shù)據(jù)
鄰接矩陣類(lèi)的根是A d j a c e n c y W D i g r a p h,因此從這個(gè)類(lèi)開(kāi)始。程序1 2 - 1給出了類(lèi)的描述。程
序中,先用程序1 - 1 3中函數(shù)Make2DArray 為二組數(shù)組a 分配空間,然后對(duì)數(shù)組a 初始化,以描述
一個(gè)n 頂點(diǎn)、沒(méi)有邊的圖的鄰接矩陣,其復(fù)雜性為( n2 )。該代碼沒(méi)有捕獲可能由M a k e 2 D A r r a y
引發(fā)的異常。在析構(gòu)函數(shù)中調(diào)用了程序1 - 1 4中的二維數(shù)組釋放函數(shù)D e l e t e 2 D
“網(wǎng)絡(luò)基本輸入/輸出系統(tǒng)”(Network Basic Input/Output System, NetBIOS)是一種標(biāo)準(zhǔn)的應(yīng)用程序編程接口( A P I),1 9 8 3年由S y t e k公司專(zhuān)為I B M開(kāi)發(fā)成功)