Rev 674 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 674 | Rev 801 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | HandlerMK::HandlerMK() |
21 | HandlerMK::HandlerMK() |
22 | { |
22 | { |
23 | } |
23 | } |
Line 24... | Line 24... | ||
24 | 24 | ||
25 | // Datensatz nach 16bit Integer |
25 | // Datensatz nach 16bit Integer |
26 | int HandlerMK::Data2Int(unsigned char Data[150] , int Start, bool is_signed) |
26 | int HandlerMK::Data2Int(unsigned char Data[160] , int Start, bool is_signed) |
27 | { |
27 | { |
Line 28... | Line 28... | ||
28 | int Out = (Data[Start+1]<<8) | (Data[Start+0]); |
28 | int Out = (Data[Start+1]<<8) | (Data[Start+0]); |
29 | 29 | ||
Line 137... | Line 137... | ||
137 | 137 | ||
138 | return ptr; |
138 | return ptr; |
Line 139... | Line 139... | ||
139 | } |
139 | } |
140 | 140 | ||
141 | // Base64 Encoder |
141 | // Base64 Encoder |
142 | QString HandlerMK::Encode64(char Data[150],unsigned int Length) |
142 | QString HandlerMK::Encode64(char Data[160],unsigned int Length) |
143 | { |
143 | { |
144 | unsigned int pt = 0; |
144 | unsigned int pt = 0; |
Line 145... | Line 145... | ||
145 | unsigned char a,b,c; |
145 | unsigned char a,b,c; |
Line 146... | Line 146... | ||
146 | unsigned char ptr = 0; |
146 | unsigned char ptr = 0; |
147 | 147 | ||
148 | char TX_Buff[150]; |
148 | char TX_Buff[160]; |
149 | 149 | ||
Line 161... | Line 161... | ||
161 | TX_Buff[pt] = 0; |
161 | TX_Buff[pt] = 0; |
Line 162... | Line 162... | ||
162 | 162 | ||
163 | return QString(TX_Buff); |
163 | return QString(TX_Buff); |
Line 164... | Line 164... | ||
164 | } |
164 | } |
165 | 165 | ||
166 | QString HandlerMK::make_Frame(char t_CMD, int t_Adress, char t_Data[150], unsigned int t_Length) |
166 | QString HandlerMK::make_Frame(char t_CMD, int t_Adress, char t_Data[160], unsigned int t_Length) |
Line 167... | Line 167... | ||
167 | { |
167 | { |