Click here to Skip to main content
15,883,647 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 4:33
ago248629-Mar-18 4:33 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 5:15
ago248629-Mar-18 5:15 
GeneralRe: How to print a recording Pin
ago248611-Apr-18 0:35
ago248611-Apr-18 0:35 
GeneralRe: How to print a recording Pin
ago248611-Apr-18 0:37
ago248611-Apr-18 0:37 
QuestionSerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 3:28
ibrahimayhans28-Mar-18 3:28 
AnswerRe: SerialPort DataReceived Event Read Byte ? Pin
Richard MacCutchan28-Mar-18 3:54
mveRichard MacCutchan28-Mar-18 3:54 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:00
ibrahimayhans28-Mar-18 4:00 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 4:17
mveOriginalGriff28-Mar-18 4:17 
ibrahimayhans wrote:
SerialPort.ReadExisting () Returns an Incomplete Result.

Well, yes. It will.
Serial data is called that because data arrives one bit at a time - a serial stream of data. When seven or eight data bits have been received (together with all appropriate framing characters such as start, stop, and parity bits) the resulkting byte is passed to the input buffer, and the hardware notifies Windows that it is ready. Windows then reads the buffer content, adds it to an internal circular queue, and sends a message to your app which is translated into a DataReceived event.
You handler then gets called and reads the data, however much of it there is.
Subsequent bytes cause the same process to occur. You do not get a "I've got all the data" event, you get an "I've got at least one character for you" event instead. If you want to receive the whole message, then you need to buffer it yourself, and process it until you have a complete "message" built up in your buffer before you start looking at it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:24
ibrahimayhans28-Mar-18 4:24 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 4:26
mveOriginalGriff28-Mar-18 4:26 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:28
ibrahimayhans28-Mar-18 4:28 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 4:43
mveOriginalGriff28-Mar-18 4:43 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:48
ibrahimayhans28-Mar-18 4:48 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 5:01
mveOriginalGriff28-Mar-18 5:01 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:30
ibrahimayhans28-Mar-18 4:30 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
Richard MacCutchan28-Mar-18 4:40
mveRichard MacCutchan28-Mar-18 4:40 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:44
ibrahimayhans28-Mar-18 4:44 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
Richard MacCutchan28-Mar-18 5:28
mveRichard MacCutchan28-Mar-18 5:28 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 5:37
ibrahimayhans28-Mar-18 5:37 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
Richard MacCutchan28-Mar-18 6:03
mveRichard MacCutchan28-Mar-18 6:03 
AnswerRe: SerialPort DataReceived Event Read Byte ? Pin
Gerry Schmitz28-Mar-18 4:12
mveGerry Schmitz28-Mar-18 4:12 
AnswerRe: SerialPort DataReceived Event Read Byte ? Pin
Eddy Vluggen28-Mar-18 5:13
professionalEddy Vluggen28-Mar-18 5:13 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 5:21
ibrahimayhans28-Mar-18 5:21 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 5:56
mveOriginalGriff28-Mar-18 5:56 
AnswerRe: SerialPort DataReceived Event Read Byte ? Pin
Luc Pattyn28-Mar-18 8:23
sitebuilderLuc Pattyn28-Mar-18 8:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.