| 
    gusimplewhiteboard
    
   | 
 
Class for interacting with and reading the values of NXT sensors and motors. More...
#include <NXT_Interface.hpp>
Public Member Functions | |
| NXT_Interface () | |
| default constructor  More... | |
| bool | operator== (const NXT_Interface &s) | 
| comparison operator  More... | |
| bool | operator!= (const NXT_Interface &s) | 
| return false if the two interfaces are the same  More... | |
| NXT_Interface (const std::string &str) | |
| string constructor (see from_string() below)  More... | |
| void | from_string (const std::string &str) | 
| parse class properties from a string  More... | |
| std::string | description () const | 
| pretty print method for showing the current property values  More... | |
  Public Member Functions inherited from wb_nxt_interface | |
| ARRAY_PROPERTY (struct nxt_port_object, objects, NUMBER_OF_NXT_PORTS) wb_nxt_interface() | |
| An array of sensors and motors plugged into the nxt ports.  More... | |
Class for interacting with and reading the values of NXT sensors and motors.
Get the state of a touch sensor plugged into port 2 of the NXT
NXT_Interface i = NXT_Status_t.get(); fprintf(stderr, "Button state: %d", i.objects(Port2).data().pressed());
Tell motor B to go 75 percent of its maximum speed forwards
NXT_Interface i; i.set_objects(MotorB); !!TODO: Fix this example fprintf(stderr, "Number of button presses: %d", i.but0());
Definition at line 38 of file NXT_Interface.hpp.
      
  | 
  inline | 
default constructor
Definition at line 44 of file NXT_Interface.hpp.
      
  | 
  inline | 
string constructor (see from_string() below)
| [in] | str | a serialised string containing properties to set in this class | 
Definition at line 100 of file NXT_Interface.hpp.
References from_string().
      
  | 
  inline | 
pretty print method for showing the current property values
Definition at line 114 of file NXT_Interface.hpp.
References Active_Light_Sensor, Motor, NUMBER_OF_NXT_PORTS, Passive_Light_Sensor, PORT, Port1, Sonar_Sensor, and Touch_Sensor.
      
  | 
  inline | 
parse class properties from a string
| [in] | str | a serialised string containing properties to set in this class | 
Definition at line 105 of file NXT_Interface.hpp.
Referenced by NXT_Interface().
      
  | 
  inline | 
return false if the two interfaces are the same
Definition at line 91 of file NXT_Interface.hpp.
      
  | 
  inline | 
comparison operator
Definition at line 48 of file NXT_Interface.hpp.
References Active_Light_Sensor, Motor, NUMBER_OF_NXT_PORTS, Passive_Light_Sensor, Port1, Sonar_Sensor, and Touch_Sensor.