Go to the documentation of this file.00001
00037 #ifndef LibMultiSense_SysNetworkMessage
00038 #define LibMultiSense_SysNetworkMessage
00039
00040 #include "../utility/Portability.hh"
00041
00042 namespace crl {
00043 namespace multisense {
00044 namespace details {
00045 namespace wire {
00046
00047 class SysNetwork {
00048 public:
00049 static CRL_CONSTEXPR IdType ID = ID_CMD_SYS_SET_NETWORK;
00050 static CRL_CONSTEXPR VersionType VERSION = 1;
00051
00052
00053
00054
00055 static CRL_CONSTEXPR uint8_t Interface_Unknown = 0;
00056 static CRL_CONSTEXPR uint8_t Interface_Primary = 1;
00057 static CRL_CONSTEXPR uint8_t Interface_Secondary = 2;
00058
00059
00060
00061
00062 uint8_t interface;
00063 std::string address;
00064 std::string gateway;
00065 std::string netmask;
00066
00067
00068
00069
00070 SysNetwork(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00071 SysNetwork(const std::string& a,
00072 const std::string& g,
00073 const std::string& n) :
00074 interface(Interface_Primary),
00075 address(a),
00076 gateway(g),
00077 netmask(n) {};
00078 SysNetwork() :
00079 interface(Interface_Unknown),
00080 address(),
00081 gateway(),
00082 netmask() {};
00083
00084
00085
00086
00087 template<class Archive>
00088 void serialize(Archive& message,
00089 const VersionType version)
00090 {
00091 message & interface;
00092 message & address;
00093 message & gateway;
00094 message & netmask;
00095 }
00096 };
00097
00098 }}}};
00099
00100 #endif