Classes | Enumerations | Variables
USBInterface.h File Reference
#include <libusb.h>
#include <list>
#include <string>
#include <cmath>
#include <cstdint>
#include <unistd.h>
Include dependency graph for USBInterface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  channelSetting
 An object that represents the settings for one servo, e.g. the information in the Settings tab. One of these objects corresponds to one ServoSettingsControl. More...
struct  maestroStatus
struct  servoStatus
class  USBPololuInterface
struct  uscSettings

Enumerations

enum  ChannelMode { Servo = 0, ServoMultiplied = 1, Output = 2, Input = 3 }
enum  HomeMode { Off = 0, Ignore = 1, Goto = 2 }
enum  uscParameter {
  PARAMETER_INITIALIZED = 0, PARAMETER_SERVOS_AVAILABLE = 1, PARAMETER_SERVO_PERIOD = 2, PARAMETER_SERIAL_MODE = 3,
  PARAMETER_SERIAL_FIXED_BAUD_RATE = 4, PARAMETER_SERIAL_TIMEOUT = 6, PARAMETER_SERIAL_ENABLE_CRC = 8, PARAMETER_SERIAL_NEVER_SUSPEND = 9,
  PARAMETER_SERIAL_DEVICE_NUMBER = 10, PARAMETER_SERIAL_BAUD_DETECT_TYPE = 11, PARAMETER_IO_MASK_C = 16, PARAMETER_OUTPUT_MASK_C = 17,
  PARAMETER_CHANNEL_MODES_0_3 = 12, PARAMETER_CHANNEL_MODES_4_7 = 13, PARAMETER_CHANNEL_MODES_8_11 = 14, PARAMETER_CHANNEL_MODES_12_15 = 15,
  PARAMETER_CHANNEL_MODES_16_19 = 16, PARAMETER_CHANNEL_MODES_20_23 = 17, PARAMETER_MINI_MAESTRO_SERVO_PERIOD_L = 18, PARAMETER_MINI_MAESTRO_SERVO_PERIOD_HU = 19,
  PARAMETER_ENABLE_PULLUPS = 21, PARAMETER_SCRIPT_CRC = 22, PARAMETER_SCRIPT_DONE = 24, PARAMETER_SERIAL_MINI_SSC_OFFSET = 25,
  PARAMETER_SERVO_MULTIPLIER = 26, PARAMETER_SERVO0_HOME = 30, PARAMETER_SERVO0_MIN = 32, PARAMETER_SERVO0_MAX = 33,
  PARAMETER_SERVO0_NEUTRAL = 34, PARAMETER_SERVO0_RANGE = 36, PARAMETER_SERVO0_SPEED = 37, PARAMETER_SERVO0_ACCELERATION = 38,
  PARAMETER_SERVO1_HOME = 39, PARAMETER_SERVO1_MIN = 41, PARAMETER_SERVO1_MAX = 42, PARAMETER_SERVO1_NEUTRAL = 43,
  PARAMETER_SERVO1_RANGE = 45, PARAMETER_SERVO1_SPEED = 46, PARAMETER_SERVO1_ACCELERATION = 47, PARAMETER_SERVO2_HOME = 48,
  PARAMETER_SERVO2_MIN = 50, PARAMETER_SERVO2_MAX = 51, PARAMETER_SERVO2_NEUTRAL = 52, PARAMETER_SERVO2_RANGE = 54,
  PARAMETER_SERVO2_SPEED = 55, PARAMETER_SERVO2_ACCELERATION = 56, PARAMETER_SERVO3_HOME = 57, PARAMETER_SERVO3_MIN = 59,
  PARAMETER_SERVO3_MAX = 60, PARAMETER_SERVO3_NEUTRAL = 61, PARAMETER_SERVO3_RANGE = 63, PARAMETER_SERVO3_SPEED = 64,
  PARAMETER_SERVO3_ACCELERATION = 65, PARAMETER_SERVO4_HOME = 66, PARAMETER_SERVO4_MIN = 68, PARAMETER_SERVO4_MAX = 69,
  PARAMETER_SERVO4_NEUTRAL = 70, PARAMETER_SERVO4_RANGE = 72, PARAMETER_SERVO4_SPEED = 73, PARAMETER_SERVO4_ACCELERATION = 74,
  PARAMETER_SERVO5_HOME = 75, PARAMETER_SERVO5_MIN = 77, PARAMETER_SERVO5_MAX = 78, PARAMETER_SERVO5_NEUTRAL = 79,
  PARAMETER_SERVO5_RANGE = 81, PARAMETER_SERVO5_SPEED = 82, PARAMETER_SERVO5_ACCELERATION = 83
}
 The different parameters that can be read or written with REQUEST_GET_PARAMETER and REQUEST_SET_PARAMETER. These values should only be used by the Usc class. More...
enum  uscRequest {
  REQUEST_GET_PARAMETER = 0x81, REQUEST_SET_PARAMETER = 0x82, REQUEST_GET_VARIABLES = 0x83, REQUEST_SET_SERVO_VARIABLE = 0x84,
  REQUEST_SET_TARGET = 0x85, REQUEST_CLEAR_ERRORS = 0x86, REQUEST_GET_SERVO_SETTINGS = 0x87, REQUEST_GET_STACK = 0x88,
  REQUEST_GET_CALL_STACK = 0x89, REQUEST_SET_PWM = 0x8A, REQUEST_REINITIALIZE = 0x90, REQUEST_ERASE_SCRIPT = 0xA0,
  REQUEST_WRITE_SCRIPT = 0xA1, REQUEST_SET_SCRIPT_DONE = 0xA2, REQUEST_RESTART_SCRIPT_AT_SUBROUTINE = 0xA3, REQUEST_RESTART_SCRIPT_AT_SUBROUTINE_WITH_PARAMETER = 0xA4,
  REQUEST_RESTART_SCRIPT = 0xA5, REQUEST_START_BOOTLOADER = 0xFF
}
enum  uscSerialMode { SERIAL_MODE_USB_DUAL_PORT = 0, SERIAL_MODE_USB_CHAINED = 1, SERIAL_MODE_UART_DETECT_BAUD_RATE = 2, SERIAL_MODE_UART_FIXED_BAUD_RATE = 3 }
 The different serial modes the Maestro can be in. The serial mode determines how the Command Port, TTL Port, the TTL-level UART, and the command processor are connected. More...

Variables

const uint8_t servoParameterBytes = 9

Enumeration Type Documentation

Enumerator:
Servo 
ServoMultiplied 
Output 
Input 

Definition at line 50 of file USBInterface.h.

enum HomeMode
Enumerator:
Off 
Ignore 
Goto 

Definition at line 58 of file USBInterface.h.

The different parameters that can be read or written with REQUEST_GET_PARAMETER and REQUEST_SET_PARAMETER. These values should only be used by the Usc class.

Enumerator:
PARAMETER_INITIALIZED 
PARAMETER_SERVOS_AVAILABLE 
PARAMETER_SERVO_PERIOD 
PARAMETER_SERIAL_MODE 
PARAMETER_SERIAL_FIXED_BAUD_RATE 
PARAMETER_SERIAL_TIMEOUT 
PARAMETER_SERIAL_ENABLE_CRC 
PARAMETER_SERIAL_NEVER_SUSPEND 
PARAMETER_SERIAL_DEVICE_NUMBER 
PARAMETER_SERIAL_BAUD_DETECT_TYPE 
PARAMETER_IO_MASK_C 
PARAMETER_OUTPUT_MASK_C 
PARAMETER_CHANNEL_MODES_0_3 
PARAMETER_CHANNEL_MODES_4_7 
PARAMETER_CHANNEL_MODES_8_11 
PARAMETER_CHANNEL_MODES_12_15 
PARAMETER_CHANNEL_MODES_16_19 
PARAMETER_CHANNEL_MODES_20_23 
PARAMETER_MINI_MAESTRO_SERVO_PERIOD_L 
PARAMETER_MINI_MAESTRO_SERVO_PERIOD_HU 
PARAMETER_ENABLE_PULLUPS 
PARAMETER_SCRIPT_CRC 
PARAMETER_SCRIPT_DONE 
PARAMETER_SERIAL_MINI_SSC_OFFSET 
PARAMETER_SERVO_MULTIPLIER 
PARAMETER_SERVO0_HOME 
PARAMETER_SERVO0_MIN 
PARAMETER_SERVO0_MAX 
PARAMETER_SERVO0_NEUTRAL 
PARAMETER_SERVO0_RANGE 
PARAMETER_SERVO0_SPEED 
PARAMETER_SERVO0_ACCELERATION 
PARAMETER_SERVO1_HOME 
PARAMETER_SERVO1_MIN 
PARAMETER_SERVO1_MAX 
PARAMETER_SERVO1_NEUTRAL 
PARAMETER_SERVO1_RANGE 
PARAMETER_SERVO1_SPEED 
PARAMETER_SERVO1_ACCELERATION 
PARAMETER_SERVO2_HOME 
PARAMETER_SERVO2_MIN 
PARAMETER_SERVO2_MAX 
PARAMETER_SERVO2_NEUTRAL 
PARAMETER_SERVO2_RANGE 
PARAMETER_SERVO2_SPEED 
PARAMETER_SERVO2_ACCELERATION 
PARAMETER_SERVO3_HOME 
PARAMETER_SERVO3_MIN 
PARAMETER_SERVO3_MAX 
PARAMETER_SERVO3_NEUTRAL 
PARAMETER_SERVO3_RANGE 
PARAMETER_SERVO3_SPEED 
PARAMETER_SERVO3_ACCELERATION 
PARAMETER_SERVO4_HOME 
PARAMETER_SERVO4_MIN 
PARAMETER_SERVO4_MAX 
PARAMETER_SERVO4_NEUTRAL 
PARAMETER_SERVO4_RANGE 
PARAMETER_SERVO4_SPEED 
PARAMETER_SERVO4_ACCELERATION 
PARAMETER_SERVO5_HOME 
PARAMETER_SERVO5_MIN 
PARAMETER_SERVO5_MAX 
PARAMETER_SERVO5_NEUTRAL 
PARAMETER_SERVO5_RANGE 
PARAMETER_SERVO5_SPEED 
PARAMETER_SERVO5_ACCELERATION 

Definition at line 437 of file USBInterface.h.

enum uscRequest
Enumerator:
REQUEST_GET_PARAMETER 
REQUEST_SET_PARAMETER 
REQUEST_GET_VARIABLES 
REQUEST_SET_SERVO_VARIABLE 
REQUEST_SET_TARGET 
REQUEST_CLEAR_ERRORS 
REQUEST_GET_SERVO_SETTINGS 
REQUEST_GET_STACK 
REQUEST_GET_CALL_STACK 
REQUEST_SET_PWM 
REQUEST_REINITIALIZE 
REQUEST_ERASE_SCRIPT 
REQUEST_WRITE_SCRIPT 
REQUEST_SET_SCRIPT_DONE 
REQUEST_RESTART_SCRIPT_AT_SUBROUTINE 
REQUEST_RESTART_SCRIPT_AT_SUBROUTINE_WITH_PARAMETER 
REQUEST_RESTART_SCRIPT 
REQUEST_START_BOOTLOADER 

Definition at line 101 of file USBInterface.h.

The different serial modes the Maestro can be in. The serial mode determines how the Command Port, TTL Port, the TTL-level UART, and the command processor are connected.

Enumerator:
SERIAL_MODE_USB_DUAL_PORT 

summary>On the Command Port, user can send commands and receive responses. TTL port/UART are connected to make a USB-to-serial adapter. summary>On the Command Port, user can send commands to Maestro and simultaneously transmit bytes on the UART TX line, and user can receive bytes from the Maestro and the UART RX line. TTL port does not do anything.

SERIAL_MODE_USB_CHAINED 
SERIAL_MODE_UART_DETECT_BAUD_RATE 

On the UART, user can send commands and receive reponses after sending a 0xAA byte to indicate the baud rate. Command Port receives bytes from the RX line. TTL Port does not do anything.

SERIAL_MODE_UART_FIXED_BAUD_RATE 

On the UART, user can send commands and receive reponses at a predetermined, fixed baud rate. Command Port receives bytes from the RX line. TTL Port does not do anything.

Definition at line 71 of file USBInterface.h.


Variable Documentation

const uint8_t servoParameterBytes = 9

Definition at line 513 of file USBInterface.h.



kurt3d
Author(s): Thomas Wiemann, Benjamin Kisliuk, Alexander Mock
autogenerated on Wed Sep 16 2015 10:24:29