blob: 116fc02fa0d0ba635318a5c168dd1bd403541a77 [file] [log] [blame]
Brian Silvermanf3e1de82013-04-09 18:45:41 -07001#include "WPILib/NetworkRobot/NetworkRobot.h"
2#include "WPILib/RobotBase.h"
Brian Silverman66f079a2013-08-26 16:24:30 -07003
4#include "aos/common/network_port.h"
5#include "aos/crio/ip.h"
Brianc1dc7d22014-04-02 12:21:08 -07006#include "aos/common/util/inet_addr.h"
Brian Silverman66f079a2013-08-26 16:24:30 -07007
8using ::aos::util::MakeIPAddress;
9using ::aos::util::GetOwnIPAddress;
Brian Silvermanf3e1de82013-04-09 18:45:41 -070010
11namespace frc971 {
12
13class MyRobot : public NetworkRobot {
14 public:
15 MyRobot() : NetworkRobot(static_cast<uint16_t>(::aos::NetworkPort::kMotors),
Brian Silverman66f079a2013-08-26 16:24:30 -070016 ::MakeIPAddress(::GetOwnIPAddress(),
Brian Silverman14fd0fb2014-01-14 21:42:01 -080017 ::aos::NetworkAddress::kPrime),
Brian Silvermanea79f0d2013-04-26 22:33:49 -070018 static_cast<uint16_t>(::aos::NetworkPort::kDS),
Brian Silverman66f079a2013-08-26 16:24:30 -070019 ::MakeIPAddress(::GetOwnIPAddress(),
Brian Silverman14fd0fb2014-01-14 21:42:01 -080020 ::aos::NetworkAddress::kPrime)) {}
Brian Silvermanf3e1de82013-04-09 18:45:41 -070021};
22
23} // namespace frc971
24
25START_ROBOT_CLASS(::frc971::MyRobot);