Click here to Skip to main content
15,892,697 members
Home / Discussions / C#
   

C#

 
AnswerRe: LRC calculation... What did I miss? Pin
OriginalGriff7-Nov-09 21:53
mveOriginalGriff7-Nov-09 21:53 
AnswerRe: LRC calculation... What did I miss? Pin
Luc Pattyn8-Nov-09 1:17
sitebuilderLuc Pattyn8-Nov-09 1:17 
GeneralRe: LRC calculation... What did I miss? Pin
Kiotaya8-Nov-09 7:14
Kiotaya8-Nov-09 7:14 
GeneralRe: LRC calculation... What did I miss? Pin
Luc Pattyn8-Nov-09 7:39
sitebuilderLuc Pattyn8-Nov-09 7:39 
GeneralRe: LRC calculation... What did I miss? Pin
Luc Pattyn8-Nov-09 8:13
sitebuilderLuc Pattyn8-Nov-09 8:13 
GeneralRe: LRC calculation... What did I miss? Pin
Kiotaya9-Nov-09 5:44
Kiotaya9-Nov-09 5:44 
GeneralRe: LRC calculation... What did I miss? Pin
Kiotaya7-Jan-10 14:14
Kiotaya7-Jan-10 14:14 
GeneralRe: LRC calculation...Solution pls... Pin
Member 77181421-Mar-11 21:24
Member 77181421-Mar-11 21:24 
Hello would you be able to post the solution for this?
I have a scenario where its been mentioned that my message will be sent in the following format

STX Data ETX BCC

And that BCC = LRC - XOR over all characters excluding STX but including ETX.
I am kind of trying to figure out how this works?

Here is the LRCCalculation method I have implemented.

private char CalculateLongitudinalRedundancyCheck(string source)
        {
            int result = 0;
            for (int i = 0; i < source.Length; i++)
            {
                result = result ^ (Byte)(Encoding.ASCII.GetBytes(source.Substring(i, 1))[0]);
            }
            return (Char)result;
        }


I get the LRC from this and then what...!!
For ex: say my data is something like "345565645023495767714.12.1988021114:33 15.8001".
QuestionRe: LRC calculation...Solution pls... Pin
Michael Sogos 202128-Jun-21 13:37
Michael Sogos 202128-Jun-21 13:37 
QuestionWIA and Windows 7 PinPopular
toby317-Nov-09 18:36
toby317-Nov-09 18:36 
AnswerRe: WIA and Windows 7 Pin
oeatek8-Dec-09 4:43
oeatek8-Dec-09 4:43 
GeneralRe: WIA and Windows 7 Pin
toby318-Dec-09 10:15
toby318-Dec-09 10:15 
QuestionHOw to create MySql database backup programmatically in C#.net Pin
gopal_bnvs7-Nov-09 18:22
gopal_bnvs7-Nov-09 18:22 
Answerbump attempt Pin
Luc Pattyn8-Nov-09 1:19
sitebuilderLuc Pattyn8-Nov-09 1:19 
Questionconnectionstring Pin
farokhian7-Nov-09 18:13
farokhian7-Nov-09 18:13 
AnswerRe: connectionstring Pin
Alegria_Lee7-Nov-09 18:57
Alegria_Lee7-Nov-09 18:57 
QuestionHow to retrieve a MPG picture from DB or convert byte[] to MPG? [modified] Pin
Alegria_Lee7-Nov-09 17:05
Alegria_Lee7-Nov-09 17:05 
AnswerRe: How to retrieve a MPG picture from DB or convert byte[] to MPG? Pin
Jacob Dixon8-Nov-09 5:41
Jacob Dixon8-Nov-09 5:41 
GeneralRe: How to retrieve a MPG picture from DB or convert byte[] to MPG? Pin
Alegria_Lee9-Nov-09 3:29
Alegria_Lee9-Nov-09 3:29 
QuestionConditional X and Y position of a Crystal Reports field Pin
sharad Pyakurel7-Nov-09 16:59
sharad Pyakurel7-Nov-09 16:59 
QuestionSimple BHO problem Pin
fasfasdf7-Nov-09 14:42
fasfasdf7-Nov-09 14:42 
QuestionAccessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 14:27
Jacob Dixon7-Nov-09 14:27 
AnswerRe: Accessing cameras without frameworks... Pin
Christian Graus7-Nov-09 14:35
protectorChristian Graus7-Nov-09 14:35 
GeneralRe: Accessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 14:38
Jacob Dixon7-Nov-09 14:38 
GeneralRe: Accessing cameras without frameworks... Pin
Christian Graus7-Nov-09 14:43
protectorChristian Graus7-Nov-09 14:43 

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.