Færdiggjort

Convert a few functions C++ to VB.NET 2.0 Code

Convert approx. 20 C++ functions to VB.NET 2.0 functions.

note the memcpy() function and shifting bits.

for example:

bool ecu::write_cmd(

? unsigned char cmd,

? unsigned int addr,

? unsigned char* data,

? unsigned int datalen)

{

? unsigned char d[264];

? if (datalen > 255)

? ? return false;

? d[0] = cmd_extended;? //= 0x3A;

? d[1] = datalen;

? int16_to_byte(d+2,addr & 0xFFFF,true);

? d[4] = cmd;

? memcpy(d+5,data,datalen);

? d[datalen+5] = (0x100 - (checksum32(d+1,datalen+4,1,true) & 0xFF)) & 0xFF;

? if (!ser->write_echocheck(d,datalen+6))

? ? return false;

? return ser->read_match_byte(mitsu_rsp_ok);

}

void int16_to_byte(unsigned char* data,int i, bool littleEndian)

{

? if (littleEndian)

? {

? ? data[0] = i >> 8;

? ? data[1] = i & 0xFF;

? }

? else

? {

? ? data[1] = i >> 8;

? ? data[0] = i & 0xFF;

? }

}

## Deliverables

zip password is vbnet

Please see attached zip file.

I started converting some of it.. I only? converted the first few functions. the form has two buttons (two pathways)..? one for Read()? one for Write()? ? ? I started converting the Read functions as you can see in the form code...

Full testing will not be possible as you will not have the Read/Write device attached, nor will you have the code for the device level read write. you can just make an empty function for the device level read write:? ser->Read ser->write

Full testing will be done by me, I can fix up any simple errors during my testing (such as Out-by-One errors).? Bigger problems will come back to the coder.

Thanks,

Hamish.

Evner: C programmering, PHP

Se mere: vb note, vb.net if, unsigned bits, simple vb net code, simple programming problems, shifting bits, programming functions, int i, if vb net, if else c programming, functions programming, functions in programming, function in vb.net example, example of vb.net, example of vb net, else if c programming, data 0, c read example, c# programming problems, c programming problems

Om arbejdsgiveren:
( 129 bedømmelser ) Auckland, New Zealand

Projekt ID: #3330091

Tildelt til:

hozayen

See private message.

$85 USD in 14 dage
(11 bedømmelser)
3.7

3 freelancere byder i gennemsnit $85 på dette job

mfrank410

See private message.

$85 USD in 14 dage
(6 bedømmelser)
3.5
zomaro

See private message.

$85 USD in 14 dage
(0 bedømmelser)
0.0