0
I Use This!
Inactive

Commits : Listings

Analyzed 1 day ago. based on code collected 2 days ago.
May 02, 2023 — May 02, 2024
Commit Message Contributor Files Modified Lines Added Lines Removed Code Location Date
Big overhaul of jsAMS.js. For instance, a button to show all memories on screen would call the function domFunctions.writeMemory(). Passing null to domFunctions.writeMemory returns all memories and fields. To choose specific memories and fields, the following object should be passed: {'memoryName0':['fieldName0','fieldName1',...], 'memoryName1':['fieldName0','fieldName1',...],...} only memoryNames listed and their fields will be written. To refreshData (so, only update the data fields, not any of the other html elements), domFunctions.refresh() can be called. Refresh accepts the same object as domFunctions.writeMemory(). This can be put in a setInterval to allow autorefreshing. To post memories, domFunctions.postAllMemories() is called. The data can either be accessed via ams.memory.memories[i](.field[j]), where i and j are integers, or memories["memoryName"].fields["fieldName"]. Lower level functions, such as getting and posting memories, are found under ams., such as ams.getNames(), ams.getMemory(nameStructure), ams.postAllMemories(). There is a bug where multiple fieldNames are not printed, and I am working on it. Write now it only supports one field or all fields. More... almost 11 years ago
Made the jsAMS.js library with fewer, better functions. to show all memories on screen would call the function domFunctions.Memory(null,null). To write a specific memory, domFunction.writeMemory("name",null) can be called. To write a specific field, domFunction.writeMemory("name","name") would be called. To refreshData (so, only update the data fields, not any of the other html elements), domFunctions.refresh("name","name") can be called. This can be put in a setInterval to allow autorefreshing. Try running amsInitHandlerUpdatingData.c and trying the autorefresh buttons (specific when only example2 is on the screen, all when they are both on the screen). More... almost 11 years ago
jsAMS.js has many functions useful for interacting with the memories from AMS. The simplest way to use this is to have an html page with a div element of ID fieldsInfo and another div element of ID memoryNames. From there, calling domFunctions.memoryNames() from a .js file or from the html page will populate memoryNames with buttons with all the memories and their names. The other functions would typically be mapped to an event handler, such as a button. For instance, a button to show all memories on screen would call the function domFunctions.writeAllMemories(). To write a specific memory, domFunction.writeSingleMemory("name") can be called. To post memories, domFunctions.postAllMemories() is called. The data can either be accessed via ams.memory.memories[i](.field[j]), where i and j are integers, or memories["memoryName"].field["fieldName"]. Lower level functions, such as getting and posting memories, are found under ams., such as ams.getNames(), ams.getMemory("name"), ams.getAllMemories(), ams.postMemories(memory). More... almost 11 years ago
Fixed minor bugs pointed out by Barry. More... almost 11 years ago
make: copy include/ams.h to build directory for non-installed use More... almost 11 years ago
Merge branch 'jed/config-makefile-in-source' More... almost 11 years ago
config: attempt to write local Makefile in source directory More... almost 11 years ago
config: os.path.relpath for build instructions More... almost 11 years ago
Removed one last instance of jsonp More... almost 11 years ago
Changed from JSONP to just JSON; js doe function call on request (jQuery made it super easy!). More... almost 11 years ago
Rolled the API back to pre-alternatives. Added a new function that had the same functionality (still with void*). Will update that. More... almost 11 years ago
Modified jsMemoryPage.js to support drop down lists. Still looking for a better way to support showing what the current value is as opposed to the options from alternatives. More... almost 11 years ago
Added a comment to the code. More... almost 11 years ago
rolled back the makefile because I did it wrong and it broke everything. Added alternatives support; this changed the AMS_New_Field function call and adds two arguments: alternatives, which is a list of acceptable values, and altLen, the number of alternatives. More... almost 11 years ago
Restructured files and altered makefile to allow it to run in new way. I am not well read on makefiles, so I hope I did it right! More... almost 11 years ago
Modified readme slightly. Also, last commit message was bad. I moved the non-dom element functions (such as GETing and POSTing) to its own file, jsAMS.js. Users can use this code to talk to the server. The data is stored in memoryHandler.memory.memories (which is an array of all the memories, or just the specific memory). More... almost 11 years ago
$es (which is an array of all the memories). More... almost 11 years ago
Added a cJSON_Delete call to get rid of a small memory leak, changed AMS_Memory_Destroy(AMS_Memory) to AMS_Memory_Destroy(AMS_Memory*), and moved the typedef AMS_Field to amsprivate.h More... almost 11 years ago
Merge branch 'matt/cJSON' More... almost 11 years ago
Added full cJSON support; moved input checking to the JavaScript side. This should be much more robust than the previous implementation. More... almost 11 years ago
added initial cJSON support. Still needs thorough testing. More... almost 11 years ago
Changed to old strtok, with more delimiters. Found error with lower number. More... almost 11 years ago
Lowered the number of delimiters when looking for just the data field, giving a wider variety of strings. More... almost 11 years ago
Merge branch 'matt/fixStringSupport' More... almost 11 years ago
Fixed the small memory leak - user (including me when writing tests!) must malloc mutable strings. More... almost 11 years ago
config: add configure with out-of-source builds, shared libs, install More... almost 11 years ago
Updated jsonToCStruct and CStructTojson to reflect the iterative nature of memories and fields; instead of one function for all memories and one function for single memories, the all memories function loops over the single memory function. I believe this is cleaner, and makes it much easier to changed the code. More... almost 11 years ago
Attempted to gix the small memory leak; I am not certain how to fix it. I am using strdup to copy the strings from the JSON. This is the only way I know how to do the strings; the other ways (just data = string or strncpy) are bad and not portable and gives unpredictable behavior? More... almost 11 years ago
String support is now back, but there is a very small memory leak that I am trying to figure out because of my use of strdup. More... almost 11 years ago
Merge branch 'matt/unitTests' More... almost 11 years ago