Brian Silverman | 66f079a | 2013-08-26 16:24:30 -0700 | [diff] [blame] | 1 | #ifndef AOS_COMMON_NETWORK_PORT_H_ |
| 2 | #define AOS_COMMON_NETWORK_PORT_H_ |
| 3 | |
| 4 | #include "aos/aos_stdint.h" |
| 5 | |
| 6 | namespace aos { |
| 7 | |
| 8 | // Constants representing the various ports used for communications and some |
| 9 | // documentation about what each is used for. |
| 10 | enum class NetworkPort : uint16_t { |
Brian Silverman | 14fd0fb | 2014-01-14 21:42:01 -0800 | [diff] [blame^] | 11 | // UDP socket sending motor values from the prime to the crio. |
Brian Silverman | 66f079a | 2013-08-26 16:24:30 -0700 | [diff] [blame] | 12 | kMotors = 9710, |
Brian Silverman | 14fd0fb | 2014-01-14 21:42:01 -0800 | [diff] [blame^] | 13 | // UDP socket forwarding drivers station packets from the crio to the prime. |
Brian Silverman | 66f079a | 2013-08-26 16:24:30 -0700 | [diff] [blame] | 14 | kDS = 9711, |
Brian Silverman | 14fd0fb | 2014-01-14 21:42:01 -0800 | [diff] [blame^] | 15 | // UDP socket sending sensor values from the crio to the prime. |
Brian Silverman | 66f079a | 2013-08-26 16:24:30 -0700 | [diff] [blame] | 16 | kSensors = 9712, |
Brian Silverman | 66f079a | 2013-08-26 16:24:30 -0700 | [diff] [blame] | 17 | // HTTP server that sends out camera feeds in mjpg format. |
| 18 | // Should not be changed because this number shows up elsewhere too. |
| 19 | kCameraStreamer = 9714, |
| 20 | }; |
| 21 | |
| 22 | // Constants representing the various devices that talk on the network and the |
| 23 | // last segment of their IP addresses. |
| 24 | enum class NetworkAddress : uint8_t { |
| 25 | // The computer that the cRIO talks to. |
Brian Silverman | 14fd0fb | 2014-01-14 21:42:01 -0800 | [diff] [blame^] | 26 | kPrime = 179, |
Brian Silverman | 66f079a | 2013-08-26 16:24:30 -0700 | [diff] [blame] | 27 | kCRIO = 2, |
| 28 | }; |
| 29 | |
| 30 | } // namespace aos |
| 31 | |
| 32 | #endif // AOS_COMMON_NETWORK_PORT_H_ |