dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnetlib/System/IO/Ports Handshake.cs, NONE, 1.1 Pa


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnetlib/System/IO/Ports Handshake.cs, NONE, 1.1 Parity.cs, NONE, 1.1 SerialErrorEventArgs.cs, NONE, 1.1 SerialErrorEventHandler.cs, NONE, 1.1 SerialErrors.cs, NONE, 1.1 SerialPinChangedEventArgs.cs, NONE, 1.1 SerialPinChangedEventHandler.cs, NONE, 1.1 SerialPinChanges.cs, NONE, 1.1 SerialPort.cs, NONE, 1.1 SerialReceived.cs, NONE, 1.1 SerialReceivedEventArgs.cs, NONE, 1.1 SerialReceivedEventHandler.cs, NONE, 1.1 StopBits.cs, NONE, 1.1
Date: Tue, 04 Nov 2003 07:00:29 +0000

Update of /cvsroot/dotgnu-pnet/pnetlib/System/IO/Ports
In directory subversions:/tmp/cvs-serv7725/System/IO/Ports

Added Files:
        Handshake.cs Parity.cs SerialErrorEventArgs.cs 
        SerialErrorEventHandler.cs SerialErrors.cs 
        SerialPinChangedEventArgs.cs SerialPinChangedEventHandler.cs 
        SerialPinChanges.cs SerialPort.cs SerialReceived.cs 
        SerialReceivedEventArgs.cs SerialReceivedEventHandler.cs 
        StopBits.cs 
Log Message:


Check in an initial implementation of the .NET Framework 1.2
serial port classes.


--- NEW FILE: SerialPort.cs ---
/*
 * SerialPort.cs - Implementation of the "System.IO.Ports.SerialPort" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
[...1121 lines suppressed...]
                                {
                                        throw new ArgumentOutOfRangeException
                                                ("offset", 
S._("ArgRange_Array"));
                                }
                                else if(count < 0)
                                {
                                        throw new ArgumentOutOfRangeException
                                                ("count", 
S._("ArgRange_Array"));
                                }
                                else if((buffer.Length - offset) < count)
                                {
                                        throw new 
ArgumentException(S._("Arg_InvalidArrayRange"));
                                }
                        }

}; // class SerialPort

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialErrorEventArgs.cs ---
/*
 * SerialErrorEventArgs.cs - Implementation of the
 *              "System.IO.Ports.SerialErrorEventArgs" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public class SerialErrorEventArgs : EventArgs
{
        // Internal state.
        private SerialErrors eventType;

        // Constructor.
        internal SerialErrorEventArgs(SerialErrors eventType)
                        {
                                this.eventType = eventType;
                        }

        // Properties.
        public SerialErrors EventType
                        {
                                get
                                {
                                        return eventType;
                                }
                                set
                                {
                                        eventType = value;
                                }
                        }

}; // class SerialErrorEventArgs

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialReceived.cs ---
/*
 * SerialReceived.cs - Implementation of the
 *              "System.IO.Ports.SerialReceived" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public enum SerialReceived
{
        ReceivedChars   = 0,
        EofReceived             = 1

}; // enum SerialReceived

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: Handshake.cs ---
/*
 * Handshake.cs - Implementation of the "System.IO.Ports.Handshake" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public enum Handshake
{
        None                                    = 0,
        XOnXOff                                 = 1,
        RequestToSend                   = 2,
        RequestToSendXOnXOff    = 3

}; // enum Handshake

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: StopBits.cs ---
/*
 * StopBits.cs - Implementation of the "System.IO.Ports.StopBits" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public enum StopBits
{
        One                             = 0,
        Two                             = 1,
        OnePointFive    = 2

}; // enum StopBits

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialErrorEventHandler.cs ---
/*
 * SerialErrorEventHandler.cs - Implementation of the
 *              "System.IO.Ports.SerialErrorEventHandler" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public delegate void SerialErrorEventHandler
                        (Object sender, SerialErrorEventArgs e);

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialPinChanges.cs ---
/*
 * SerialPinChanges.cs - Implementation of the
 *              "System.IO.Ports.SerialPinChanges" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public enum SerialPinChanges
{
        CtsChanged              = 0,
        DsrChanged              = 1,
        CDChanged               = 2,
        Ring                    = 3,
        Break                   = 4

}; // enum SerialPinChanges

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialErrors.cs ---
/*
 * SerialErrors.cs - Implementation of the
 *              "System.IO.Ports.SerialErrors" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public enum SerialErrors
{
        TxFull          = 0,
        RxOver          = 1,
        Overrun         = 2,
        RxParity        = 3,
        Frame           = 4

}; // enum SerialErrors

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialPinChangedEventArgs.cs ---
/*
 * SerialPinChangedEventArgs.cs - Implementation of the
 *              "System.IO.Ports.SerialPinChangedEventArgs" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public class SerialPinChangedEventArgs : EventArgs
{
        // Internal state.
        private SerialPinChanges eventType;
        private bool newValue;

        // Constructor.
        internal SerialPinChangedEventArgs(SerialPinChanges eventType,
                                                                           bool 
newValue)
                        {
                                this.eventType = eventType;
                                this.newValue = newValue;
                        }

        // Properties.
        public SerialPinChanges EventType
                        {
                                get
                                {
                                        return eventType;
                                }
                                set
                                {
                                        eventType = value;
                                }
                        }
        public bool NewValue
                        {
                                get
                                {
                                        return newValue;
                                }
                                set
                                {
                                        newValue = value;
                                }
                        }

}; // class SerialPinChangedEventArgs

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: Parity.cs ---
/*
 * Parity.cs - Implementation of the "System.IO.Ports.Parity" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public enum Parity
{
        None            = 0,
        Odd                     = 1,
        Even            = 2,
        Mark            = 3,
        Space           = 4

}; // enum Parity

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialPinChangedEventHandler.cs ---
/*
 * SerialPinChangedEventHandler.cs - Implementation of the
 *              "System.IO.Ports.SerialPinChangedEventHandler" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public delegate void SerialPinChangedEventHandler
                        (Object sender, SerialPinChangedEventArgs e);

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialReceivedEventArgs.cs ---
/*
 * SerialReceivedEventArgs.cs - Implementation of the
 *              "System.IO.Ports.SerialReceivedEventArgs" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public class SerialReceivedEventArgs : EventArgs
{
        // Internal state.
        private SerialReceived eventType;

        // Constructor.
        internal SerialReceivedEventArgs(SerialReceived eventType)
                        {
                                this.eventType = eventType;
                        }

        // Properties.
        public SerialReceived EventType
                        {
                                get
                                {
                                        return eventType;
                                }
                                set
                                {
                                        eventType = value;
                                }
                        }

}; // class SerialReceivedEventArgs

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports

--- NEW FILE: SerialReceivedEventHandler.cs ---
/*
 * SerialReceivedEventHandler.cs - Implementation of the
 *              "System.IO.Ports.SerialReceivedEventHandler" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.IO.Ports
{

#if CONFIG_SERIAL_PORTS

// Framework 1.2
public delegate void SerialReceivedEventHandler
                        (Object sender, SerialReceivedEventArgs e);

#endif // CONFIG_SERIAL_PORTS

}; // namespace System.IO.Ports





reply via email to

[Prev in Thread] Current Thread [Next in Thread]