GbCC (Group-based Cloud Computing) applications allow users to enter a room where everyone accesses their own instance of a particular NetLogo model. Everyone can share data about their model, in a gallery space.
Manage Data
gbcc:set
gbcc:get
gbcc:get-from-user
gbcc:store-globals
gbcc:restore-globals
gbcc:restore-globals-from-user
gbcc:store-state
gbcc:restore-state
gbcc:restore-state-from-user
Broadcast to Gallery
gbcc:broadcast-view
gbcc:broadcast-text
gbcc:broadcast-plot
gbcc:broadcast-avatar
gbcc:clear-broadcast
gbcc:clear-broadcasts
Messages
gbcc:send
gbcc:broadcast
Patches
gbcc:show-patches
gbcc:hide-patches
Canvases
gbcc:adopt-canvas
gbcc:mute-canvas
gbcc:unmute-canvas
gbcc:get-canvas-list
gbcc:get-vacant-indices
Users
gbcc:who-am-i
gbcc:my-role
gbcc:get-user-list
gbcc:get-active-user-list
File Storage
gbcc:import-our-data
gbcc:export-our-data
gbcc:import-our-data-file
gbcc:import-my-data
gbcc:export-my-data
gbcc:import-my-data-file
gbcc-on-enter gbcc-on-exit gbcc-on-select gbcc-on-deselect gbcc-on-go gbcc-on-message gbcc-on-mousedown gbcc-on-mouseup
Returns a value, based on it's user-id and key.
to gbcc-on-select [user-id] show gbcc:get-from-user user-id "code" end
Gets stored values and assigns them to their corresponding global variables.
gbcc:restore-globals
Gets stored values, based on user-id, and assigns them to their corresponding global variables.*** new ***
to gbcc-on-select [user-id] gbcc:restore-globals-from-user user-id end
Stores users own state, (including state of NetLogo model and GbCC extensions).*** new ***
gbcc:store-state
Restores users own previously stored state (including state of NetLogo model and GbCC extensions).*** new ***
gbcc:restore-state
Gets stored state, based on user-id, and load state.
to gbcc-on-select [user-id] gbcc:restore-state-from-user user-id end
Sends data to the user's canvas, in the gallery. This data is displayed in everyone's gallery. User can send a screenshot of the view.
gbcc:broadcast-view "my-view"
Sends data to the user's canvas, in the gallery. This data is displayed in everyone's gallery. User can send text.
gbcc:broadcast-text "some-tag" "my-message"
Sends data to the user's canvas, in the gallery. This data is displayed in everyone's gallery. User can send a screenshot a plot.
gbcc:broadcast-plot "my-plot-name"
Sends data to the user's canvas, in the gallery. This data is displayed in everyone's gallery. User can send a turtle shape, an integer representing a color and text that can appear below the shape.
gbcc:broadcast-avatar "star" 15 "my-name"
Remove specific canvas data from the user's canvas, in the gallery. Data is cleared in everyone's gallery.*** new ***
gbcc:clear-broadcast "my-plot-name"
Remove all canvas data from the user's canvas, in the gallery. Data is cleared in everyone's gallery.*** new ***
gbcc:clear-broadcasts
Returns a list of any users who have ever existed in the session.*** new ***
show gbcc:get-user-list
Returns a list of any users who are currently in the session.*** new ***
show gbcc:get-active-user-list
Each patch becomes white. Useful when adjusting opacity when viewing a graph or map.
gbcc:hide-patches
Send a user a message tag and a message. *** new ***
gbcc:send user-id "animal" "cat"
Send all users a message tag and a message. *** new ***
gbcc:broadcast "animal" "cat"
Allow a user to take over a canvas.*** new ***
gbcc:adopt-canvas user-id 3
Allow a teacher to mute a canvas. *** new ***
gbcc:mute-canvas 3
Allow a teacher to unmute a canvas. *** new ***
gbcc:unmute-canvas 3
Returns a list of user-ids, in canvas order. *** new ***
show gbcc:get-canvas-list
Returns a list of unclaimed canvases, by canvas-ids. *** new ***
gbcc:get-vacant-indices
A user, with the role of teacher, can import previous data from multiple users. *** new ***
gbcc:import-our-data
A user, with the role of teacher, can import previous data from multiple users, from a file saved on the server. *** new ***
gbcc:import-our-data "our-class-data.txt"
A user can export all data from all users in a session. *** new ***
gbcc:export-our-data "our-class-data.txt"
A user can import previous data from a single user. *** new ***
gbcc:import-my-data
A user can import previous data from a single user, from a file saved on the server. *** new ***
gbcc:import-my-data "my-data.txt"
A user can export all data their own user. *** new ***
gbcc:export-my-data "my-data.txt"
User-defined procedure which, if it exists, will be called when any user first enters the room.
to gbcc-on-enter [ user-id role ] show "This is called when a user enters." show word user-id " is the unique identifier for this user." if (role = "teacher") [ show "User is a teacher." ] if (role = "student") [ show "User is a student." ] end
User-defined procedure which, if it exists, will be called when any user exits the room.
to gbcc-on-exit [ user-id role ] show "This is called when a user exits." show word user-id " is the unique identifier for this user." if (role = "teacher") [ show "User is a teacher." ] if (role = "student") [ show "User is a student." ] end
User-defined procedure which, if it exists, will be called when a user selects a canvas in the gallery.
to gbcc-on-select [ user-id role ] show "This is called when a user's canvas is selected." show word user-id " is the unique identifier for this user." if (role = "teacher") [ show "User is a teacher." ] if (role = "student") [ show "User is a student." ] end
User-defined procedure which, if it exists, will be called when a user deselects a canvas in the gallery.
to gbcc-on-deselect [ user-id role ] show "This is called when a user's canvas is deselected." show word user-id " is the unique identifier for this user." if (role = "teacher") [ show "User is a teacher." ] if (role = "student") [ show "User is a student." ] end
User-defined procedure which, if it exists, will be called when a user selects a canvas in the gallery, by clicking on it's forever icon. This procedure will be called, continuously, until the canvas is deselected.
;; runs continuously to gbcc-on-go [ user-id role ] show "This is called when a user's canvas is selected using it's forever button." show word user-id " is the unique identifier for this user." if (role = "teacher") [ show "User is a teacher." ] if (role = "student") [ show "User is a student." ] end
User-defined procedure which, if it exists, will be called when a user does gbcc:send or gbcc:broadcast. *** new ***
to gbcc-on-message [ user-id role message-tag message ] show "This is called when a user is sent something with gbcc:send or gbcc:broadcast." show word user-id " is the unique identifier for this user." if (role = "teacher") [ show "User is a teacher." ] if (role = "student") [ show "User is a student." ] show "The message is about " message-tag show "The message is " message end
User-defined procedure which, if it exists, will be called when a user does mousedown on View. *** new ***
to gbcc-on-mousedown [ patch-x patch-y ] show "This is called when a user does mousedown on the View." show word ("mouse is at (" patch-x ", " patch-y ")" end
User-defined procedure which, if it exists, will be called when a user does mouseup on View. *** new ***
to gbcc-on-mouseup [ patch-x patch-y ] show "This is called when a user does mouseup on the View." show word ("mouse is at (" patch-x ", " patch-y ")" end