vendredi 27 mars 2015

Passing and Getting Hexadecimal output from CRC c function to erlang using Port



I have the CRC Error Code generation Logic built in C language, and would like to implement it into the Erlang or use the C function with the Port or the NIF function to get the desired output.


I have c program that works fine, but for some reason I am not being able to integrate this function with the erlang.


I am kind of new to erlang, please help. Thanks.


Update


Followed this link http://ift.tt/1mMm5xB



/* complex.c */

int foo(int x) {
return x+1;
}

int bar(int y) {
return y*2;
}


The above functions works fine.


But I need to implement the function, Check_Data_CRC_Information(source, lenth); where, source - Array of Hex values. length - integer length of the source array.


I am not being able to send the required values into the Proper format to the Check_Data_CRC_Information function.




Aucun commentaire:

Enregistrer un commentaire