NetLogo GbCC Dictionary

GbCC 2.0 User Manual

Overview

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.

GbCC Primitives and Commands

gbcc:set gbcc:get gbcc:get-from-user gbcc:store-globals gbcc:restore-globals gbcc:restore-globals-from-user gbcc:broadcast-to-gallery gbcc:compile-observer-code gbcc:run-observer-code gbcc:compile-turtle-code gbcc:run-turtle-code gbcc:compile-patch-code gbcc:run-patch-code

GbCC Reserved Procedures

gbcc-on-enter gbcc-on-exit gbcc-on-select gbcc-on-deselect gbcc-on-go

GbCC Primitives and Commands

gbcc:set

Observer Command Observer Command Observer Command

gbcc:set key value

Stores a value, which is accessible by it's key.

gbcc:set "code" "fd 3"
      

gbcc:get

Observer Command Observer Command Observer Command

gbcc:get key

Returns a value, based on it's key.

show gbcc:get "code"
      

gbcc:get-from-user

Observer Command Observer Command Observer Command

gbcc:get-from-user user-id key

Returns a value, based on it's user-id and key.

to gbcc-on-select [student-id]
  show gbcc:get-from-user student-id "code"
end
      

gbcc:store-globals

Observer Command Observer Command Observer Command

gbcc:store-globals

Stores all global values.

gbcc:store-globals
      

gbcc:restore-globals

Observer Command Observer Command Observer Command

gbcc:restore-globals

Gets stored values and assigns them to their corresponding global variables.

gbcc:restore-globals
      

gbcc:restore-globals-from-user

Observer Command Observer Command Observer Command

gbcc:restore-globals-from-user user-id

Gets stored values, based on user-id, and assigns them to their corresponding global variables.

to gbcc-on-select [student-id]
  gbcc:restore-globals-from-user student-id
end
      

gbcc:broadcast-to-gallery

Observer Command Observer Command Observer Command

gbcc:broadcast-to-gallery key value

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, a screenshot of a plot, or a string of text.

gbcc:broadcast-to-gallery "view" ""

gbcc:broadcast-to-gallery "plot" "population"

gbcc:broadcast-to-gallery "text" "This is my message."

gbcc:broadcast-to-gallery "clear" ""
      

gbcc:compile-observer-code
gbcc:run-observer-code

Observer Command

gbcc:compile-observer-code key value

gbcc:run-observer-code key

Compile observer code, one time. Run compiled code, repeatedly.

gbcc:compile-observer-code "code" "show 3"

gbcc:run-observer-code "code"

gbcc:compile-turtle-code
gbcc:run-turtle-code

Turtle Command

gbcc:compile-turtle-code who key value

gbcc:run-turtle-code who key

Compile turtle code, one time. Run compiled code, repeatedly.

gbcc:compile-turtle-code who "code" "fd 5"

gbcc:run-turtle-code who "code"

gbcc:compile-patch-code
gbcc:run-patch-code

Patch Command

gbcc:compile-patch-code pxcor pycor key value

gbcc:run-patch-code pxcor pycor key

Compile patch code, one time. Run compiled code, repeatedly.

gbcc:compile-patch-code pxcor pycor "code" "set pcolor orange"

gbcc:run-patch-code pxcor pycor "code"

GbCC Reserved Procedures

gbcc-on-enter

gbcc-on-enter [student-id]Observer Command

User-defined procedure which, if it exists, will be called when any user first enters the room.

to gbcc-on-enter [student-id]
  word student-id " just entered"
end
      

gbcc-on-exit

gbcc-on-exit [student-id]Observer Command

User-defined procedure which, if it exists, will be called when any user exits the room.

to gbcc-on-exit [student-id]
  show word student-id " just exited"
end
      

gbcc-on-select

gbcc-on-select [student-id]Observer Command

User-defined procedure which, if it exists, will be called when a user selects a canvas in the gallery.

to gbcc-on-select [student-id]
  show word "Get data from " student-id
end
      

gbcc-on-deselect

gbcc-on-deselect [student-id]Observer Command

User-defined procedure which, if it exists, will be called when a user deselects a canvas.

to gbcc-on-deselect [student-id]
  show word "Remove data gathered from " student-id
end
      

gbcc-on-go

gbcc-on-go [student-id]Observer Command

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 [student-id]
  show word "Get data from " student-id
end