[Mono-dev] IOKit Enumeration

Joshua Perry josh at 6bit.com
Tue Apr 22 11:41:06 EDT 2008


Dick, do you have any input on this before I start implementing the  
Win32 Comm API in io-layer?

On Apr 21, 2008, at 5:53 AM, Geoff Norton wrote:

> Josh,
>
>  At a high level it does, but this conversation should be moved over  
> to mono-devel-list, so that the approrpiate maintainers (Dick  
> Porter) can weigh in.  I've cc'd Dick and the mono-devel-list,  
> dropping mono-osx.
>
> -g
>
> On 21-Apr-08, at 2:32 AM, Joshua Perry wrote:
>
>> It seems that I misunderstood what io-layer is.  From what I  
>> gather, it is a Win32 compatibility layer that steps in with Win32  
>> API IO functions on non Windows builds of mono.
>>
>> It looks like io-layer already implements File IO functions and  
>> overlapped IO operations.  If I implement the Comm specific  
>> functions in io-layer we should be able to unify the  
>> System.IO.Ports code to the WinSerialStream code.  Though changing  
>> it from P/Invoking into kernel32.dll to using icalls to io-layer.
>>
>> Win32 Comm API Functions:
>> SetupComm
>> PurgeComm
>> SetCommTimeouts
>> GetCommState
>> SetCommState
>> ClearCommError
>> GetCommModemStatus
>> EscapeCommFunction
>>
>> Does this sound right to you?
>>
>> Josh
>>
>> On Apr 19, 2008, at 8:06 AM, Geoff Norton wrote:
>>
>>> Josh,
>>>
>>> On 15-Apr-08, at 10:49 AM, Joshua Perry wrote:
>>>
>>>>
>>>> The current SerialPort chooses between two ISerialStream
>>>> implementations SerialPortStream and WinSerialStream.
>>>> SerialPortStream is implemented by P/Invoking into MonoPosixHelper
>>>> functions like serial_read and serial_write.  WinSerialStream is
>>>> implemented by P/Invoking the Win32 API serial port and IO  
>>>> functions.
>>>> Outside of enumerating IOKit objects to find the port /dev/  
>>>> nodes, I
>>>> believe that OSX is compatible with standard posix callsl though  
>>>> I'm
>>>> not happy with the current Posix stream as Async operations are not
>>>> implemented.  I would like to implement the async functionality  
>>>> and,
>>>> from the look of things, moving the serial specific functions  
>>>> into io-
>>>> layer would be the right thing to do.
>>>>
>>>
>>> Great, let us know if there are any questions / problems.
>>>
>>>> In XplatUI.cs are you talking about the call to uname to check for
>>>> "Darwin"?
>>>>
>>>
>>> Yep
>>>
>>> -g
>>>
>>
>



More information about the Mono-devel-list mailing list