def user_options(id): if machine_id != id: raise WrongMachineID return { "tracking": ControlThread.user_options(), "recording": ControlThreadVideoRecording.user_options() }
def user_options(id): ''' Passing back options regarding what information can be changed on the the device. This populates the form on the node GUI ''' if machine_id != id: raise WrongMachineID return { "tracking": ControlThread.user_options(), "recording": ControlThreadVideoRecording.user_options(), "streaming": {}, "update_machine": { "machine_options": [{ "overview": "Machine information that can be set by the user", "arguments": [{ "type": "number", "name": "etho_number", "description": "An ID number (1-999) unique to this ethoscope", "default": get_machine_info(id)['machine-number'] }, { "type": "boolean", "name": "isexperimental", "description": "Specify if the ethoscope is to be treated as experimental", "default": isExperimental() }, { "type": "str", "name": "node_ip", "description": "The IP address that you want to record as the node (do not change this value unless you know what you are doing!)", "default": get_machine_info(id)['node_ip'] }, { "type": "str", "name": "ESSID", "description": "The name of the WIFI SSID", "default": get_machine_info(id)['WIFI_SSID'] }, { "type": "str", "name": "Key", "description": "The WPA password for the WIFI SSID", "default": get_machine_info(id)['WIFI_PASSWORD'] }], "name": "Ethoscope Options" }], } }