Add halsim_ds_socket to allow a simulated robot to talk to the real DS (#1180)

This implements enough of the UDP and TCP protocol used by the FRC
driver station to allow us to talk to either QDriverStation or to the
real Driver Station.

This was inspired by a similar function in Toast by Jaci, and also
uses a lot of the research found in the QDriverStation project.
This commit is contained in:
Jeremy White
2018-07-22 17:00:06 -05:00
committed by Peter Johnson
parent 5bf5821138
commit 74a306d47a
7 changed files with 691 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <vector>
typedef struct {
std::vector<int16_t> axes;
uint8_t button_count;
uint32_t buttons;
std::vector<int16_t> povs;
} DSCommJoystickPacket;