NeXTSTEPDRIVERKIT:Chapter5 Protocols

From 흡혈양파의 번역工房
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Protocols

프로토콜

IOConfigurationInspector

채택된곳(Adopted By): IODeviceInspector class, IODisplayInspector class
정의된 위치: driverkit/IODeviceInspector.h


프로토콜 정의

The IOConfigurationInspector protocol is adopted by inspectors that are loaded into the Configure application. Each inspector lets the user inspect and set information about a device, such as a specific brand of Ethernet card. The inspector stores this information in an NXStringTable that is specified to the inspector with the setTable: method.
IOConfigurationInspector 프로토콜은 Configure 응용 프로그램에 로드되는 검사기(inspectors) 에 의해 채택됩니다. 각 검사기를 통해 사용자는 특정 브랜드의 이더넷 카드와 같은 장치에 대한 정보를 검사하고 설정할 수 있습니다. 검사기는 이 정보를 setTable: 메서드를 사용하여 관리자에게 지정된 NXStringTable 에 저장합니다.


The default, customizable inspector implemented by the IODeviceInspector class is sufficient for many devices. However, if IODeviceInspector doesn't suit your configuration needs, you should implement your own inspector class that adopts the IOConfigurationInspector protocol. An example of adopting this protocol is under /NextLibrary/Documentation/NextDev/Examples/DriverKit in the DriverInspector directory.
기본적으로 IODeviceInspector 클래스로 구현된 변경 가능한 검사기는 많은 장치에 대해 충분히 유용합니다. 그러나 IODeviceInspector 가 설정 요구 사항에 맞지 않는다면, IOConfigurationInspector 프로토콜을 채택하는 자체 inspector 클래스를 구현해야 합니다. 이 프로토콜을 채택한 예제는 DriverInspector 디렉토리의 /NextLibrary/Documentation/NextDev/Examples/DriverKit 에 있습니다.


메서드 타입
inspector 의 View 를 얻기
- inspectionView
리소스가 변경되었음을 알리기
- resourcesChanged
description table 의 설정
- setTable


인스턴스 메서드
inspectionView
- (View *)inspectionView

Inspector 의 View 를 반환합니다.


resourcesChanged:
- resourcesChanged:(IOResources *)resources

The Configure application sends this message to all inspectors whenever an interrupt, DMA channel, I/O port, or memory range is chosen or dropped in any inspector. This method should check for conflicts and update the UI.
Configure 응용 프로그램은 인터럽트, DMA 채널, I/O 포트 또는 메모리 범위가 선택되거나 제거될 때마다 모든 Inspector 에게 이 메시지를 전송합니다. 이 메서드는 충돌을 확인하고 UI 를 업데이트 해야 합니다.


This message is sent as often as you might need it, including immediately after a setTable: and after your own changes. You are guaranteed to be deactivated before your current table is freed, but you will not receive a setTable:nil, so don't count on accessing or modifying the table except in response to a user action.
이 메시지는 setTable: 을 포함해서, 필요할 때마다 자주 전송되며 사용자가 직접 변경한 뒤에도 보낼 수 있습니다. 현재 테이블이 해제되기 전에 비활성화 될 것이 확실하지만 setTable:nil 을 받지 않기 때문에, 사용자 조치에 대한 응답 이외에는 테이블에 액세스하거나 수정하지 마십시오.


setTable:
- setTable:(NXStringTable *)anObject

Sets the NXStringTable describing the inspector's device to anObject. You should update the UI when setTable: gives you a table to inspect. Your object should keep a handle to the table. When the user makes changes, immediately update the table; do not use OK/Revert buttons.
Inspector 의 장치를 설명하는 String Table 을 anObject 로 설정합니다. setTable: 로 검사할 테이블을 제공할 때 UI 를 업데이트해야 합니다. 당신의 객체는 테이블의 핸들을 유지해야합니다. 사용자가 변경하면 즉시 테이블을 업데이트합니다. OK/Revert 버튼을 사용하지 마십시오.


IOEventThread

채택된곳(Adopted By): 이벤트 시스템
정의된 위치: driverkit/eventProtocols.h


프로토콜 정의

The IOEventThread protocol provides access to the event system's I/O thread. You can obtain an IOEventThread-compliant object from IOEventSource's owner method.
IOEventThread 프로토콜은 이벤트 시스템의 I/O 스레드에 대한 접근을 제공합니다. IOEventSource 의 소유자 메서드에서 IOEventThread 호환 객체를 가져올 수 있습니다.


메서드 타입
메시지 전송(Sending messages)
- messagessendIOThreadAsyncMsg:to:with:
- sendIOThreadMsg:to:with:


인스턴스 메서드
sendIOThreadAsyncMsg:to:with:
- (IOReturn)sendIOThreadAsyncMsg:(id)instance
to:(SEL)selector
with:(id)data

From the event system's I/O thread, sends the message specified by selector to instance, with the argument data. This method doesn't wait for the selector method to be called, and doesn't detect whether selector is a valid method of instance. Returns IO_R_IPC_FAILURE if an error occurred; otherwise, returns IO_R_SUCCESS.
이벤트 시스템의 I/O 스레드에서 인수 data 와 함께 selector 에 지정된 메시지를 인스턴스로 보냅니다. 이 메서드는 selector 메서드가 호출될 때까지 기다리지 않으며, selector가 유효한 인스턴스 메소드인지 여부는 검출(valid)하지 않습니다. 오류가 발생하면 IO_R_IPC_FAILURE 를 반환하며, 그렇지 않으면 IO_R_SUCCESS 를 반환합니다.


참조

sendIOThreadMsg:to:with:


sendIOThreadMsg:to:with:
- (IOReturn)sendIOThreadMsg:(id)instance
to:(SEL)selector
with:(id)data

From the event system's I/O thread, sends the message specified by selector to instance, with the argument data. This method waits until the selector method has returned. Returns IO_R_IPC_FAILURE if the message couldn't be sent; otherwise, returns IO_R_SUCCESS.
이벤트 시스템의 I/O 스레드에서 인수 data 와 함께 selector 에 지정된 메시지를 인스턴스로 보냅니다. 이 메서드는 selector 메서드가 반환될 때까지 대기합니다. 메시지를 보낼 수 없는 경우 IO_R_IPC_FAILURE 를 반환하며, 그렇지 않으면 IO_R_SUCCESS 를 반환합니다.


참조

sendIOThreadAsyncMsg:to:with:


IONetworkDeviceMethods

채택된곳(Adopted By): IOEthernet, IOTokenRing
정의된 위치: driverkit/IONetwork.h


프로토콜 정의

This protocol must be implemented by network direct device drivers that use IONetwork to tie into the kernel network system. These methods are invoked by IONetwork objects in response to events in the network system.
이 프로토콜은 IONetwork 를 사용해서 커널 네트워크 시스템에 연결하는 네트워크 직접 장치 드라이버에(network direct device drivers)서 구현해야 합니다. 이러한 메서드는 네트워크 시스템의 이벤트에 대한 응답으로서 IONetwork 객체에 의해 호출됩니다.


Note: Network drivers must run at kernel level.
Note: 네트워크 드라이버는 커널 수준에서 실행해야합니다.


메서드 타입
Creating netbufs
- allocateNetbuf
Initializing the hardware
- finishInitialization
Sending out a packet
- outputPacket:address:
Performing control commands
- performCommand:data:


인스턴스 메서드
allocateNetbuf
- (netbuf_t)allocateNetbuf

This method creates and returns a netbuf to be used for an impending output.
이 메서드는 임박한 출력(impending output)에 사용할 netbuf 를 만들고 반환합니다.


This method doesn't always have to return a buffer. For example, you might want to limit the number of buffers your driver instance can allocate (say, 200 kilobytes worth) so that it won't use too much wired-down kernel memory. When this method fails to return a buffer, it should return NULL.
이 메서드에서 항상 버퍼를 반환해야할 필요는 없습니다. 예를 들어 드라이버 인스턴스가 할당할 수 있는 버퍼수(예:200KB)를 제한하여 너무 많은 wired-down 커널 메모리를 사용하지 않을 수 있습니다. 이 메서드는 버퍼를 반환하지 못하는 경우에는 NULL 을 반환해야합니다.


Here's an example of implementing allocateNetbuf.
다음은 allocateNetbuf 구현의 예입니다.

#define my_HDR_SIZE    14
#define my_MTU        1500
#define my_MAX_PACKET  (my_HDR_SIZE + my_MTU)

- netbuf_t allocateNetbuf
{
    if (_numbufs == _maxNumbufs)
        return(NULL);
    else {
        _numbufs++;
        return(nb_alloc(my_MAX_PACKET));
    }
}
참조

nb_alloc() (NEXTSTEP Operating System Software)


finishInitialization
- (int)finishInitialization

This method should perform any initialization that hasn't already been done. For example, it should make sure its hardware is ready to run. You can specify what the integer return value (if any) should be.
이 메소드는 아직 완료되지 않은 초기화에서 수행해야 합니다. 예를 들어, 하드웨어를 실행할 준비가 되었는지 확인해야 합니다. 정수 반환 값(있다면)을 지정합니다.


If you implement this method, you need to check that [self isRunning] == YES.
이 메서드를 구현한다면, [self isRunning] == YES 의 동작을 확인해야 합니다.


outputPacket:address:
- (int)outputPacket:(netbuf_t)packet address:(void *)address

This method should deliver the specified packet to the given address. Its return value should be zero if no error occurred; otherwise, return an error number from the header file sys/errno.h.
이 메서드는 지정된 패킷을 지정된 주소로 전달해야 합니다. 오류가 발생하지 않으면 반환 값은 0 이어야 합니다. 그렇지 않으면 헤더 파일 sys/errno.h 에 정의된 오류 번호를 반환합니다.


If you implement this method, you need to check that [self isRunning] == YES. If so, insert the necessary hardware addresses into the packet and check it for minimum length requirements.
이 메서드를 구현한다면, [self isRunning] == YES 의 동작을 확인해야 합니다. 동작을 확인하려면 필요한 하드웨어 주소를 패킷에 삽입하고 최소 길이 요구 사항을 확인하십시오.


performCommand:data:
- (int)performCommand:(const char *)command data:(void *)data

This method performs arbitrary control operations; the character string command is used to select between these operations. Although you don't have to implement any operations, there are five standard operations. You can also define your own operations.
이 메서드는 임의의 제어 작업을 수행하며, character string 명령은 이러한 조작 사이에서 선택하는데 사용됩니다. 어떤 작업도 구현할 필요는 없지만 5 가지의 표준 작업이 있습니다. 자신 만의 작업을 정의할 수도 있습니다.


The standard commands are listed in the following table. The constant strings listed below are declared in the header file net/netif.h (under the bsd directory of /NextDeveloper/Headers).
표준 명령은 다음 표에 나열되어 있습니다. 아래 나열된 상수 문자열은 헤더 파일 net/netif.h(/NextDeveloper/Headers 디렉토리의 bsd 아래)에 선언되어 있습니다.

Command Operation
IFCONTROL_SETFLAGS Request to have interface flags turned on or off. The data argument for this command is of type union ifr_ifru (which is declared in the header file net/if.h).
인터페이스 플래그를 켜거나 끄도록 요청합니다. 이 명령의 데이터 인수는 union ifr_ifru(net/if.h 헤더파일에 정의되어있음) 유형입니다.
IFCONTROL_SETADDR Set the address of the interface.
인터페이스의 주소를 설정
IFCONTROL_GETADDR Get the address of the interface.
인터페이스의 주소를 가져오기
IFCONTROL_AUTOADDR Automatically set the address of the interface.
인터페이스의 주소를 자동으로 설정
IFCONTROL_UNIXIOCTL Perform a UNIX ioctl() command. This is only for compatibility; ioctl() isn't a recommended interface for network drivers. The argument is of type if_ioctl_t *, where the if_ioctl_t structure contains the UNIX ioctl request (for example, SIOCSIFADDR) in the ioctl_command field and the ioctl data in the ioctl_data field.
UNIX 의 ioctl() 명령을 수행합니다. 이는 호환성을 위한 것입니다. ioctl() 은 네트워크 드라이버에 권장되는 인터페이스가 아닙니다. 인수는 if_ioctl_t * 유형이며, 여기서 if_ioctl_t 구조는 ioctl_command 필드에 UNIX ioctl 요청(예 : SIOCSIFADDR)을 포함하며, ioctl_data 필드에 ioctl 데이터를 포함합니다.


An example of implementing performCommand:data: follows.
performCommand:data: 를 구현하는 예제는 다음과 같습니다.

- (int)performCommand:(const char *)command data:(void *)data
{
    int error = 0;

    if (strcmp(command, IFCONTROL_SETFLAGS) == 0)
        /* do nothing */;
    else
    if (strcmp(command, IFCONTROL_GETADDR) == 0)
        bcopy(&my_address, data, sizeof (my_address));
    else
        error = EINVAL;

    return (error);
}


IOSCSIControllerExported

채택된곳(Adopted By): IOSCSIController class
정의된 위치: driverkit/scsiTypes.h


프로토콜 정의

Indirect device drivers for devices attached to SCSI controllers use the methods in this protocol to communicate with IOSCSIController.
SCSI 컨트롤러에 연결된 장치의 간접 장치 드라이버는 이 프로토콜의 메서드를 사용하여 IOSCSIController 와 통신합니다.


메서드 타입
잘 정렬 된 버퍼 할당(Allocating well-aligned buffers)
- allocateBufferOfLength:actualStart:actualLength:
- getDMAAlignment:
I/O 요청
- executeRequest:buffer:client:
- maxTransfer
SCSI 타겟 예약
- reserveTarget:lun:forOwner:
- releaseTarget:lun:forOwner:
SCSI 버스 재설정
- resetSCSIBus
sc_status_t 값과 동일한 IOReturn 가져오기
- returnFromScStatus:


인스턴스 메서드
allocateBufferOfLength:actualStart:actualLength:
- (void *)allocateBufferOfLength:(unsigned)length
actualStart:(void **)actualStart
actualLength:(unsigned *)actualLength

Allocates and returns a pointer to some well-aligned memory. Well-aligned memory is necessary for calls to executeRequest:buffer:client:. You should use actualStart and actualLength when freeing the memory, as follows (italicized text delineated in angle brackets, that is << >>, is to be filled in with device-specific code):
잘 정렬 된(well-aligned) 메모리에 대한 포인터를 할당하고 반환합니다. 잘 정렬 된 메모리는 executeRequest:buffer:client: 에 대한 호출에 필요합니다. 다음과 같이 메모리를 확보 할 때 actualStart 및 actualLength를 사용해야합니다 (꺽쇠 괄호로 표시된 기울임 꼴 텍스트는 << >> 이며 장치 고유 코드로 채워짐).

dataBuffer = [_controller allocateBufferOfLength:block_size
    actualStart:&freePtr, actualLength:&freeLength];
<< Use the buffer... >>
IOFree(freePtr, freeLength);


다음은 이 메서드의 일반적인 사용법입니다.

IODMAAlignment    dmaAlign;
unsigned int      alignment, alignedLength, freeLength;
void             *alignedPtr = NULL;
unsigned int      maxLength; /* Max length of the current transfer */
/* . . . */
[_controller getDMAAlignment:&dmaAlign];
if(<< we're doing a write >>)
    alignment = dmaAlign.writeLength;
else
    alignment = dmaAlign.readLength;

if(alignment > 1)
    alignedLength = IOAlign(unsigned int, maxLength, alignment);
else
    alignedLength = maxLength;

alignedPtr = [_controller allocateBufferOfLength:alignedLength
    actualStart:&freePtr
    actualLength:&freeLength];

<< If we're going to do a write, copy the data to alignedPtr.
   만약 우리가 write  하려고 한다면, 데이터를 alignedPtr  복사하십시오.
    Set up the request and submit it, as described in the
    executeRequest:buffer:client: description.
    executeRequest:buffer:client: 설명에 설명 된대로
    요청을 설정하고 제출하십시오.
    >>
<< Do any post-I/O processing that's necessary.
   필요한 모든 사후 I/O 처리를 수행하십시오.
    >>

IOFree(freePtr, freeLength);
참조

getDMAAlignment:


executeRequest:buffer:client:
- (sc_status_t)executeRequest:(IOSCSIRequest *)scsiRequest
buffer:(void *)buffer
client:(vm_task_t)client

Executes the specified request. Indirect devices invoke this method whenever they need the IOSCSIController to perform I/O. Subclasses of IOSCSIController must implement this method. A typical implementation of this method consists of the following:
지정된 요청을 실행합니다. 간접 장치는 I/O 를 수행하기 위해 IOSCSIController 가 필요할 때마다 이 메서드를 호출합니다. IOSCSIControlle r의 하위 클래스는 이 메소드를 구현해야 합니다. 이 방법의 일반적인 구현은 다음과 같이 구성됩니다:

  • Using IOScheduleFunc() to schedule a timeout function to be called after scsiRequest->timeoutLength time has elapsed without I/O completion
    IOScheduleFunc() 를 사용하여 I/O 완료없이 scsiRequest->timeoutLength 시간이 경과한 후에 호출할 시간 초과 함수를 예약합니다.
  • Sending the command descriptor block (CDB) specified in scsiRequest to the controller
    scsiRequest 에 지정된 명령 설명자 블록(CDB)을 컨트롤러에 전송
  • When the I/O has completed, unscheduling the timeout function
    I/O 가 완료되면 시간 초과 기능 예약 취소


This method should return scsiRequest->driverStatus, which should be set by the part of the driver that detected I/O completion or timeout.
이 메서드는 I/O 완료 또는 시간 초과를 감지한 드라이버 부분에서 설정해야하는 scsiRequest->driverStatus 를 반환해야합니다.


Indirect devices use this method as shown below (italicized text delineated in angle brackets, that is << >>, is to be filled in with device-specific code):
간접 장치는 아래에 표시된 것처럼이 방법을 사용합니다 (기울임 꼴로 표시된 꺾쇠 괄호 안에있는 텍스트는 << >> 이며 장치 고유 코드(device-specific code)로 채워짐).

void             *alignedPtr = NULL;
unsigned int      alignedLength;
IOSCSIRequest     request;
cdb_t             cdb;

/* . . . */
if (<< we're going to be doing DMA >>) {
    << Ensure we have a well-aligned buffer that starts at alignedPtr
        and continues for alignedLength bytes.  See the
        allocateBuffer: description for one way of doing this. >>
} else {
    alignedLength = 0;
    alignedPtr = 0;
}

bzero(&request, sizeof(request));
request.target = [self target];
request.lun    = [self lun];
request.read = << YES if this is a read; NO otherwise >>;
request.maxTransfer = alignedLength;
request.timeoutLength = << some timeout length, in seconds >>;
request.disconnect = << 1 if allowed to disconnect; otherwise 0 >>;
request.cdb = cdb;
<< Set up the cdb (command descriptor block) field. The type of this
    field, cdb_t, is defined and described in the header file
    bsd/dev/scsireg.h. >>

rtn = [_controller executeRequest:&request
    buffer:alignedPtr
    client:IOVmTaskSelf()];


getDMAAlignment:
- (void)getDMAAlignment:(IODMAAlignment *)alignment

Returns the DMA alignment requirements for the current architecture. IOSCSIController subclasses can override this method to specify any device-specific alignment requirements. See the description of allocateBufferOfLength:actualStart:actualLength: for an example of using this method.
현재 아키텍처의 DMA 정렬(alignment) 요구 사항(requirements)을 반환합니다. IOSCSIController 하위 클래스는 이 메서드를 대체해서 장치별 정렬 요구 사항을 지정할 수 있습니다. 이 메소드의 사용 예는 allocateBufferOfLength:actualStart:actualLength 의 설명을 참조하십시오.

참조

allocateBufferOfLength:actualStart:actualLength:


maxTransfer
- (unsigned)maxTransfer

Returns the maximum number of bytes per DMA transfer. This is the maximum transfer that can be requested in a call to executeRequest:buffer:client:.
DMA 전송 당 최대 바이트 수를 반환합니다. 이것은 executeRequest:buffer:client: 에 대한 호출에서 요청할 수 있는 최대 전송입니다.


releaseTarget:lun:forOwner:
- (void)releaseTarget:(unsigned char)target
lun:(unsigned char)lun
forOwner:owner

Releases the specified target/lun pair. If owner hasn't reserved the pair, this method uses IOLog to print an error message.
target/lun 쌍으로 지정된 것을 해제합니다. 소유자가 쌍(pari)을 예약하지 않은 경우 이 메서드는 IOLog 를 사용하여 오류 메시지를 출력합니다.


참조

reserveTarget:lun:forOwner:


reserveTarget:lun:forOwner:
- (int)reserveTarget:(unsigned char)target
lun:(unsigned char)lun
forOwner:owner

Reserves the specified target/lun pair, if it isn't already reserved. This method is invoked by a client (for example, a SCSIDisk instance) to mark a particular target/lun as being in use by that client. Usually, this happens at probe: time; however, the SCSIGeneric driver uses this method at other times.
지정한 target/lun 쌍이 예약되지 않은 경우 예약합니다. 이 메소드는 클라이언트 (예 : SCSIDisk 인스턴스)에 의해 호출되며, 특정 target/lun 을 해당 클라이언트가 사용중인 것으로 표시합니다. 일반적으로 이것은 probe: 를 실행할때에 발생합니다. 그러나 SCSIGeneric 드라이버는 다른 경우에 이 메서드를 사용합니다.


This method returns a nonzero value if the target/lun pair is already reserved. Otherwise, it returns zero.
이 메소드는 target/lun 쌍이 이미 예약 된 경우 0 이 아닌 값을 반환합니다. 그렇지 않으면, 0 을 반환합니다.

참조

releaseTarget:lun:forOwner:


resetSCSIBus
- (sc_status_t)resetSCSIBus

Resets the SCSI bus. Subclasses of IOSCSIController must implement this method so that it resets the SCSI bus. The sc_status_t enumerated type is defined and described in the header file bsd/dev/scsireg.h.
SCSI 버스를 재설정합니다. IOSCSIController 의 하위 클래스는 이 메소드를 구현햐서 SCSI 버스를 재설정해야 합니다. sc_status_t 열거 형은 bsd/dev/scsireg.h 헤더 파일에 정의 및 설명됩니다.


returnFromScStatus:
- (IOReturn)returnFromScStatus:(sc_status_t)sc_status

Returns the IOReturn value corresponding to the specified sc_status_t value. The sc_status_t enumerated type is defined and described in the header file bsd/dev/scsireg.h.
지정된 sc_status_t 값에 해당하는 IOReturn 값을 반환합니다. sc_status_t 열거 형은 bsd/dev/scsireg.h 헤더 파일 에 정의 및 설명됩니다.


IOScreenEvents

채택된곳(Adopted By): IODisplay
정의된 위치: driverkit/eventProtocols.h


프로토콜 정의

The methods in this protocol are invoked by the event system, at the request of the Window Server or of pointer management software.
이 프로토콜의 메소드는 Window Server 또는 포인터 관리 소프트웨어(pointer management software)의 요청에 따라 이벤트 시스템에 의해 호출됩니다.


메서드 타입
커서 조작(Manipulating the cursor)
- hideCursor:
- moveCursor:frame:token:
- showCursor:frame:token:
장치 포트(device port) 가져 오기
- devicePort
스크린 밝기 설정
- setBrightness:token:


인스턴스 메서드
devicePort
- (port_t)devicePort

Returns the device port, which should be obtained from this instance's IODeviceDescription.
이 인스턴스의 IODeviceDescription 에서 가져야하는 장치 포트를 반환합니다.


hideCursor:
- hideCursor:(int)token

Removes the cursor from the screen.
화면에서 커서를 제거합니다.


moveCursor:frame:token:
- moveCursor:(Point *)cursorLoc
frame:(int)frame
token:(int)token

Removes the cursor from the screen, moves it, and displays the cursor in its new position.
화면에서 커서를 제거하고 이동한 후 새 위치에 커서를 표시합니다.


setBrightness:token:
- setBrightness:(int)level token:(int)token

Sets the brightness of the screen. Many devices (and thus many drivers) don't permit this operation.
화면의 밝기를 설정합니다. 많은 장치(따라서 많은 드라이버)는 이 작업을 허용하지 않습니다.


참조

setBrightness:token: (IOFrameBufferDisplay class)


showCursor:frame:token:
- showCursor:(Point *)cursorLocation
frame:(int)frame
token:(int)token

Displays the cursor at cursorLocation.
cursorLocation 에 커서를 표시합니다.


IOScreenRegistration

채택된곳(Adopted By): 이벤트 시스템
정의된 위치: driverkit/eventProtocols.h


프로토콜 정의

Display drivers use the messages in the IOScreenRegistration protocol to register and unregister themselves with the event system. These methods are called by IODisplay in response to an getIntValues:forParameter:count: call that specifies the "IO_Framebuffer_Register" parameter.
디스플레이 드라이버는 IOScreenRegistration 프로토콜의 메시지를 사용해서 이벤트 시스템에 등록 및 등록 취소합니다. 이러한 메서드는 "IO_Framebuffer_Register" 매개 변수를 지정하는 getIntValues:forParameter:count: 호출에 대한 응답으로 IODisplay 에서 호출합니다.


You shouldn't need to invoke the methods in this protocol, because they're already invoked automatically by IOFrameBufferDisplay and IOSVGADisplay.
이 프로토콜은 이미 IOFrameBufferDisplay 및 IOSVGADisplay 에 의해 자동으로 호출되므로 메서드를 호출할 필요는 없습니다.


인스턴스 메서드
registerScreen:bounds:shmem:size:
- (int)registerScreen:(id)instance
bounds:(Bounds *)bounds
shmem:(void **)address
size:(int *)num

Registers instance as a display driver. Returns a token that's used to refer to the display in other calls to the event system.
인스턴스를 디스플레이 드라이버로 등록합니다. 이벤트 시스템에 대한 다른 호출의 표시를 나타내는데 사용되는 토큰(token)을 반환합니다.


unregisterScreen:
- (void)unregisterScreen:(int)token

Unregisters the instance associated with token as a display driver.
토큰과 연결된 디스플레이 드라이버의 인스턴스를 등록 취소 합니다.