[Mono-osx] IOKit Enumeration

Joshua Perry josh at 6bit.com
Mon Apr 21 02:32:41 EDT 2008


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-osx mailing list