Switch.cpp 482 Bytes
Newer Older
/jdi/'s avatar
/jdi/ committed
1
2
3
4
5
6
7
/*
 * Switch.cpp
 *
 *  Created on: 29.09.2015
 *      Author: jdi
 */

/jdi/'s avatar
/jdi/ committed
8
9
#include <string>
#include "Types/bytes.h"
/jdi/'s avatar
/jdi/ committed
10
11
#include "Switch.h"

/jdi/'s avatar
/jdi/ committed
12
13
14
15
16
17
18
19
20
21
void Switch::parse(datasets arr) {
	device.type = arr[1].value;
	settings.hostname = arr[2].value;
	device.mac = arr[3].value;
	settings.ip_addr = arr[4].value;
	settings.ip_mask = arr[5].value;
	settings.gateway = arr[6].value;
	device.firmware_version = arr[7].value;
	device.hardware_version = arr[8].value;
	settings.dhcp=arr[9].value[0];
/jdi/'s avatar
/jdi/ committed
22
23
}