![]() ![]() Public EnhancedSerialPort (string portName, int baudRate) :base(portName, baudRate) Public EnhancedSerialPort (string portName) : base(portName) Public EnhancedSerialPort (IContainer container) : base (container) ![]() Public class EnhancedSerialPort : SerialPort See the License for the specific language governing permissions and WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. distributed under the License is distributed on an "AS IS" BASIS, Unless required by applicable law or agreed to in writing, software You may obtain a copy of the License at you may not use this file except in compliance with the License. Licensed under the Apache License, Version 2.0 (the "License") test the code running by both Microsoft.The port variable must be declared as EnhancedSerialPort type or the wrong Open() method will get called SerialPort.Open() is not a virtual method, therefore I have hidden the method in order to add the thread creation.The only constructor of Mono SerialDataReceivedEventArgs class is marked internal and I have not figured out how to create the objects yet. currently DataReceived (object sender, SerialDataReceivedEventArgs e) event handler gets null value for parameter e.In case of future changes in Mono the application will break reflection is used to access three private members by their names.a standard Mono distribution can be used.Here is a derived class that does the same. The previous approach required rebuilding Mono with a small patch. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |