Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/19/2016 in all areas

  1. These are going to all become private functions in the near future. I am only going to have a few functions available to the normal user. This is my general plan for a library. LV_DCG_Compile_String_Program.vi (Complete C program or Library going to disk as DLL ) (Overwrites if name is same as previous compiled code) Inputs Mode (Memory, Exe, Dll) required Program name/name of exe or dll (String) required Code (String) required Error in Outputs Error out (Set if not compiled and string with why) LV_DCG_Compile_String_Library.vi (Collection of functions) (Overwrites if name is same as previous compiled code) Inputs Library name (String) required Code (String) required Error in Outputs Error out (Set if not compiled and string with why) LV_DCG_List.vi (List compiled programs and library functions) Inputs Mode (Programs, Libraries, Library Functions, All Library Functions, All) Library Name (String) Error In Outputs Names (1D array of strings) (Programs names, libraries, or library functions in "Library_Name.Function_Name") Error Out LV_DCG_Run_Program.vi (Runs Programs using argc argv or none at all) Inputs name (String) required Arguments in (1d array of strings) Error in Outputs Program Return (int) Error out LV_DCG_Run_Function.vi (Requires the function prototype, return type, and data in) Inputs (I am thinking about this one) name (String) Required Return Size (int) Required Prototype and data (1D Array of Cluster(Data type(u8) ,value(var)) Error In Outputs Program Return (1d array of bytes of size return size) Error out LV_DCG_Manage.vi (Remove program, Remove Library, Remove All) I'll add preprocessor and other functions for adding dlls and such later. But I want it simple and sweet. No libbitcoin (C++) but libccoin or picocoin. I like the check for a zero on the pointer, that could save a lot of debug time. No clue why I used an int for the pointer. I see DSNewPtr and DSDisposePtr but no MoveBlock. I remember the GetValueByPointer xnode and being burned because it wouldn't compile. Hmmm it compiles now Still no poking unless you use moveblock. Do they have some look but don't touch policy at NI? This reminded me of Dr Cold hands at MEPS. We were told to bend down and spread em. Then Dr was going to take a peek and if the Dr didn't like what he saw he would take a poke. I have a dream that one day Call Library Function Node will accept function pointers rather than just a path.
    1 point
  2. OK. So it is a thin wrapper around the Tiny C Compiler.(Note that TCC is LGPL licenced ) It looks like the "State" is an opaque pointer to a structure so you might want to choose "Unsigned Pointer-Sized Integer" so that it is 32 and 64 bit ready. I would also suggest putting each function in a case structure and checking for 0. You can't test a pointer in C to see if it exists so the best you can do is hope that the library returns null pointers when memory is released or memory can't be allocated. For your DSNewPtr, which is a LabVIEW function; there are already VIs for that and others. I forget whether they are under resources or in vi.lib but I think you should separate out LabVIEW functions and application specific functions. LabVIEW functions are reuseable and usually cross platform , whereas application specific ones are or may not be. Looking forward to being able to auto-compile libbitcoin from LabVIEW
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.