NeXTSTEPDRIVERKIT:Chapter5 Classes
- Classes
클래스(Classes)
The Driver Kit has two main groups of classes--those that user-level nondriver programs can use, and those used by drivers.
Driver Kit 에는 두 가지 주요 클래스 그룹이 있습니다. 즉, 사용자 수준의 nondriver 프로그램이 사용할 수 있는 클래스와 driver 가 사용하는 클래스입니다.
The classes used by drivers are further divided into those that are device-independent and those that are only used for specific kinds of devices.
드라이버가 사용하는 클래스는 장치 독립적인 클래스와 특정 종류의 장치에만 사용되는 클래스로 나뉩니다.
See Chapter 3 for information on the classes used for specific kinds of devices.
특정 종류의 장치에 사용되는 클래스에 대한 정보는 3 장을 참조하십시오.
Some of the methods in the Driver Kit classes are stubs: they simply return without doing anything. Their method description says that they do nothing. They're typically hardware dependent, so you can implement them based on how your hardware operates and what interface you have available to the hardware. However, these methods provide a framework for you to build your driver on.
Driver Kit 클래스의 메소드중 일부는 아무것도 하지 않고 단순히 반환하는 토막(stubs) 입니다. 그들의 메서드 설명에는 그들이 아무것도하지 않는다고 되어 있습니다. 일반적으로 하드웨어에 종속적이기 때문에, 하드웨어 작동 방식과 하드웨어에서 사용할 수 있는 인터페이스에 따라 구현할 수 있지만, 이러한 메서드들은 드라이버를 빌드할 수 있는 프레임 워크를 제공합니다.
Note: The disk driver classes (IODisk, IOLogicalDisk, and IODiskPartition) are public but haven't been documented yet.
Note: 디스크 드라이버 클래스 (IODisk, IOLogicalDisk 및 IODiskPartition)는 공개되어 있지만 아직 문서화되지 않았습니다.
드라이버가 이용할 수 있는 다른 클래스들
Besides the Object class and the classes documented here, four more classes are available for drivers' use. Three of these classes--NXLock, NXConditionLock, and NXSpinLock--are part of the Mach Kit, and are implemented at both user and kernel level. NXRecursiveLock, also part of the Mach Kit, is not available at kernel level. See the "Mach Kit" chapter in NEXTSTEP General Reference for more information.
여기에 설명된 Object 클래스와 클래스 외에도 네 가지 클래스가 드라이버에 사용될 수 있습니다. NXLock, NXConditionLock 및 NXSpinLock 과 같은 세 클래스는 Mach Kit 의 일부이며 사용자 및 커널 수준에서 구현됩니다. Mach Kit 의 일부인 NXRecursiveLock 은 커널 수준에서 사용할 수 없습니다. 자세한 내용은 NEXTSTEP 일반 참조의 "Mach Kit"장을 참조하십시오.
IOAddressRanger
- 상속받은곳 : Object
- 정의된 윛 = : driverkit/IOAddressRanger.h
- 클래스 정의
The IOAddressRanger class provides user interface and type checking to be used in device inspecting modules for the Configure application. IOAddressRangers are used in IODeviceInspector for choosing values for I/O port ranges and ranges of memory.
An IOAddressRanger limits the range to a constant length that you specify with setRangeLength:. The range is also limited to be between the addresses you specify with setAddressLimits::. Whenever an address limit or range length is changed or the selected address range is changed, the IOAddressRanger adjusts the address range as follows:
- If the start address is less than the lower address limit, the start address is changed to be equal to the lower limit.
- If the range contains addresses above the higher limit, the start address is adjusted downward so that the range's last address is equal to the higher limit.
- 인스턴스 변수
None declared in this class.
- 메서드 타입
- Checking address ranges
- checkRangesForConflicts:num:
- checkText:
- Setting and getting the start address
- setStartAddress:
- startAddress
- Action methods
- minus:
- plus:
- Setting and getting the range length
- rangeLength
- setRangeLength:
- Limiting the address range
- setAddressLimits::
- Assigning a delegate
- setDelegate:
- delegate
- Delegate methods
- rangeDidChange:
- 인스턴스 메서드
checkRangesForConflicts:num:
- (BOOL)checkRangesForConflicts:(IOAddressRanger *)ranges num:(unsigned int)numRanges
A configuration inspector invokes this method to check whether this IOAddressRanger uses any addresses already used by the specified IOAddressRangers. If so, this method changes the color of the text in the text field to gray and sets the status button on. If no conflicts exist, this method sets the status button off and changes the color of the text to black. Returns NO if no conflicts exist and YES if conflicts exist.
checkText:
- checkText:sender
Checks whether sender's string value is an address and, if so, sets the range's start address (adjusted as described in the class description), updates the display, and sends the delegate a rangeDidChange: message. If the string isn't an address, the system beeps and updates the range's display. Returns self if the string is an address; otherwise, returns nil.
delegate
- delegate
Returns the IOAddressRanger's delegate, or nil if it doesn't have one.
minus:
- minus:sender
This method is the target of the minus button in the IOAddressRanger. It moves the range down by the amount of the range's length (but no lower than the lower limit), updates the display, and sends the delegate a rangeDidChange: message. As an example, if the range is currently from 0x000e00 to 0x000eff, this method changes the range to be from 0x000d00 to 0x000dff. Returns self.
plus:
- plus:sender
This method is the target of the plus button in the IOAddressRanger. It moves the range higher by the amount of the range's length (but not above the higher limit), updates the display, and sends the delegate a rangeDidChange: message. As an example, if the range is currently from 0x000e00 to 0x000eff, this method changes the range to be from 0x000f00 to 0x000fff. Returns self.
rangeLength
- (unsigned long)rangeLength
Returns the length of the range. This length should be set at initialization using setRangeLength:.
setAddressLimits::
setAddressLimits:(unsigned long)low :(unsigned long)high
Limits the address range to values between low (inclusive) and high (inclusive) and adjusts the start address, as described in the class description. Returns self.
setDelegate:
- setDelegate:anObject
Makes anObject the IOAddressRanger's delegate, and returns self. The delegate is sent a rangeDidChange: message whenever the address range changes.
setRangeLength:
- setRangeLength:(unsigned long)length
Sets the length of the range and returns self. The new length is displayed and the start address is adjusted as described in the class description.
setStartAddress:
- setStartAddress:(unsigned long)address
Sets the start address of the range (adjusted as described in the class description) and returns self.
startAddress
- (unsigned long)startAddress
Returns the start of the range. This length should be set at initialization using setStartAddress:.
- 위임(Delegate) 메서드
rangeDidChange:
- rangeDidChange:sender
Informs the delegate that the range changed.