Documentation

STATE Variable Reference

STATE variables are used extensively by the Oculus Java application to store real-time information about the current status, or state, of the robot’s various functions and systems. Some are very handy to access from the Telnet Programming Interface, when programming the robot via an external script. The ‘state’ command description is as follows:

state (optional) {STRING} (optional) {STRING}
  Uses format: key, or key value
  If called with no arguments: returns list of all non-null robot STATE variables
  If called with one argument: returns value for single key
  If called with two arguments: sets key to value

Whenever a state variable changes, it is immediately written to the telnet output stream, preceded by the <‍state‍> tag. External scripts can set up event-handlers to react to these.

State Variable Groups:
Motors
Dock
Lights
RTMP Users
System
Video/Audio

MOTORS

firmware {STRING}
  Name returned by microcontroller connected to motors (typically ArduinOculus, which returns ‘OculusDC’)

serialport {STRING}
  Name of serial-over-USB port communicating with microcontroller connected to motors

motionenabled {BOOLEAN}
  TRUE if wheel motors are allowed to move (typically FALSE when docked)

speed {STRING}
  Current motor speed setting

tempdirection {STRING}
  Temporary direction of motion, used by wheel movement macros

moving {BOOLEAN}
  TRUE if wheel motors are moving

sliding {BOOLEAN}
  TRUE if ‘slide’ wheel movement macro is in motion

movingforward {BOOLEAN}
  TRUE if motors are moving wheels in forward direction

camservopos {INT}
  Actual position, in degrees, of mirror tilt servo motor

DOCK

dockgrabbusy {BOOLEAN}
  TRUE if auto-docking system is in the process of grabbing single frame from video feed, and trying to find the dock target within the image

docking {BOOLEAN}
  TRUE if final docking macro is in progress, where robot is moving straight forward in increments, looking for battery charging status

dockstatus {STRING)
  Current state of dock. Can be ‘docked,’ ‘un-docked,’ or ‘docking’

autodocking {BOOLEAN}
  TRUE if overall auto-docking routine is in progress

dockxsize {INT}
  Last detected width of dock target, in pixels (320×240 resolution)

dockslope {FLOAT}
  Last detected slope of dock target, in degrees

dockxpos {INT}
  Last detected center X position of dock target, in pixels (320×240 resolution)

dockypos {INT}
  Last detected center Y position of dock target, in pixels (320×240 resolution)

LIGHTS

floodlighton {BOOLEAN}
  TRUE if flood light is on

spotlightbrightness {INT}
  Brightness of spotlight: 100=full, 0=off

lightport {STRING}
  Name of serial-over-USB port communicating with OcuLED lights microcontroller

RTMP USERS

driver {STRING}
  Current driver username, connected via RTMP

logintime {LONG}
  Last time driver RTMP client logged in (in milliseconds since epoch)

pendinguserconnected {STRING}
  Username of rtmp connected user waiting to be driver/passenger

SYSTEM

boottime {LONG}
  Time of server application startup (in milliseconds since epoch)

batterystatus {STRING}
  Current status of battery. Can be ‘charging’ or ‘draining’

batterylife {INT}
  Current battery charge percentage

localaddress {STRING}
  IP address of robot system within the local wifi network. NOTE: this value can be inaccurate if the system has networking complexities such as virtual networks, or multiple NICs

externaladdres {STRING}
  External IP address of robot system, obtained from ‘http://checkip.dyndns.org/’

httpPort {INT}
  Robot’s web-server HTTP port (default 5080)

VIDEO/AUDIO

stream {STRING}
  Current mode of robot camera/microphone stream. Can be ‘camera,’ ‘camandmic,’ ‘mic,’ or ‘stop’

videosoundmode {STRING}
  Video encoding mode employed by robot Flash/Actionscript camera/mic capture. ‘LOW’ refers to h263 video with Nelly-Moser audio, and ‘HIGH’ refers to h264 video with SPEEX audio. This varies automatically depending on the capabilities of various server and client operating systems

driverstream {BOOLEAN}
  TRUE if driver (rtmp client) ‘self’ camera/microphone stream is active

muteOnROVmove {BOOLEAN}
  TRUE if system is set to mute robot mic on wheel motor movement

volume {INT}
  (percent) system volume

framegrabbusy {BOOLEAN}
  TRUE if waiting for single-frame pixel data to be fetched from robot Flash/Actionscript camera/mic capture

streamActivityThreshold {STRING}
  Current value of video/audio activity thresholds, set by ‘setstreamactivitythreshold’ command

streamActivityThresholdEnabled {LONG}
  Time streamActivityThreshold was set (in milliseconds since epoch), NULL if no activity detection is set

motiondetectwatching {BOOLEAN}
  TRUE if Java vision motion detection routine is running, set by ‘motiondetectgo’ command

motiondetected {INT}
  Value of last Java vision successful motion detection. Higher value means more extreme motion

CART 0 items | US$
    Check Order Status
Follow →
instagram twitter facebook youtube
@XaxxonTech Twitter
© 2019 Xaxxon
Products Documentation Downloads Source Code
Warranty & Returns About Us Contact/Support News
instagram twitter facebook youtube