openhub.net
Black Duck Software, Inc.
Black Duck Open Hub
Follow @
OH
Sign In
Join Now
Projects
People
Organizations
Tools
Blog
BDSA
Projects
People
Projects
Organizations
Forums
S
ScientificApplicationWebserver
Settings
|
Report Duplicate
0
I Use This!
×
Login Required
Log in to Open Hub
Remember Me
Inactive
Commits
: Listings
Analyzed
1 day
ago. based on code collected
2 days
ago.
May 02, 2023 — May 02, 2024
Showing page 6 of 8
Search / Filter on:
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.
Matthew Otten
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).
Matthew Otten
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).
Matthew Otten
More...
almost 11 years ago
Fixed minor bugs pointed out by Barry.
Matthew Otten
More...
almost 11 years ago
make: copy include/ams.h to build directory for non-installed use
Jed Brown
More...
almost 11 years ago
Merge branch 'jed/config-makefile-in-source'
Jed Brown
More...
almost 11 years ago
config: attempt to write local Makefile in source directory
Jed Brown
More...
almost 11 years ago
config: os.path.relpath for build instructions
Jed Brown
More...
almost 11 years ago
Removed one last instance of jsonp
Matthew Otten
More...
almost 11 years ago
Changed from JSONP to just JSON; js doe function call on request (jQuery made it super easy!).
Matthew Otten
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.
Matthew Otten
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.
Matthew Otten
More...
almost 11 years ago
Added a comment to the code.
Matthew Otten
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.
Matthew Otten
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!
Matthew Otten
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).
Matthew Otten
More...
almost 11 years ago
$es (which is an array of all the memories).
Matthew Otten
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
Matthew Otten
More...
almost 11 years ago
Merge branch 'matt/cJSON'
Matthew Otten
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.
Matthew Otten
More...
almost 11 years ago
added initial cJSON support. Still needs thorough testing.
Matthew Otten
More...
almost 11 years ago
Changed to old strtok, with more delimiters. Found error with lower number.
Matthew Otten
More...
almost 11 years ago
Lowered the number of delimiters when looking for just the data field, giving a wider variety of strings.
Matthew Otten
More...
almost 11 years ago
Merge branch 'matt/fixStringSupport'
Matthew Otten
More...
almost 11 years ago
Fixed the small memory leak - user (including me when writing tests!) must malloc mutable strings.
Matthew Otten
More...
almost 11 years ago
config: add configure with out-of-source builds, shared libs, install
Jed Brown
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.
Matthew Otten
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?
Matthew Otten
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.
Matthew Otten
More...
almost 11 years ago
Merge branch 'matt/unitTests'
Matthew Otten
More...
almost 11 years ago
←
1
2
3
4
5
6
7
8
→
This site uses cookies to give you the best possible experience. By using the site, you consent to our use of cookies. For more information, please see our
Privacy Policy
Agree