320-sensor_api.sql / api.beat_the_heart: removal of fscs_id from parameters
320-sensor_api.sql / api.update_presence: same
400-permissions.sql / adjusted GRANT statements for function changes
imls-wifisensor/README / Minor chagnes, not yet fully adjusted.
linux-session-counter/session-counter.ini / I removed a .ini file. I'm not sure if was supposed to be there in the first place? We'll have to add it back if I'm wrong.
config/config.go / Added port to createURI, so that all URIs always have a port number.
" " / GetDurationsURI, renamed pres_uri to presences_uri
" " / GetHeartbeatURI, renamed hb_uri to heartbeat_uri
" " / GetLoginPort, added to match config parameter.
" " / GetDeviceMemory, added to reflect how long sensors remember devices they've seen (default 7200 seconds, or two hours)
" " / GetHeartbeatCron, GetFakesharkNumPerMinute, GetFakesharkNumMacs, GetFakesharkMinFound, GetFakesharkMaxFound, and GetDataCollectionCron all added for new config parameters.
" " / SetConfigDefaults changes to reflect new parameters. Removed "api:directus" from the loggers.
api/api.go / removed fscs references from POST codes.
constants.go / removed MAC_MEMORY_DURATION_SEC to turn it into a configurable parameter instead of a constant.
mock_hw/fake-wireshark-helper.go / renamed consistentMACsHelper to consistentMACarray because it just makes more sense as a name.
mock_hw/fake-wireshark-helper.go / many changes; this may impact unit tests in golang, which has not yet been tested. Changed code to make sure we were correctly generating a list of MACs to select from ONCE, and modified the code for how many are generated every run, so that we generate between a MIN and a MAX number of devices. Provided predictability in device generation.
" " / moved call to SimpleShark out to the top level. Now, this file only contains the helpers for running in "fake" mode. Makes the top level "look the same" in both fake and real cases, which is good.
session-counter.go / Added comments.
session-counter.go / Added a semaphore in runEvery, because it appears we have a race condition between the collection of MAC addresses (writing into the ephemeral DB, which is a hash table), and resetting at the end of the day (which involves reading the table and clearing/GCing it.)
durationsdb.go / debug statement
ephemeral.go / replace constant with config lookup.
heartbeat.go / debug statement change
process_data.go / debug statement change
simple_send.go / Commented out the creation of a send queue within the function. This... would never have sent data. It is completely unclear how we had a working session-counter with the code in this state. I mean, I think I somehow was involved in this particular bit of change... but I don't know if anything could have worked. It would create an empty send queue, in place, every time it ran. Nothing would ever leave the device with this in place, I think. Fixed by commenting out one line (to be removed later).
pres_uri
topresences_uri
hb_uri
toheartbeat_uri
consistentMACsHelper
toconsistentMACarray
because it just makes more sense as a name.session-counter
with the code in this state. I mean, I think I somehow was involved in this particular bit of change... but I don't know if anything could have worked. It would create an empty send queue, in place, every time it ran. Nothing would ever leave the device with this in place, I think. Fixed by commenting out one line (to be removed later).