VOL-1194 Get device info (vendor, versions, technology, resource manager parameters)

Change-Id: Ie6b4b8c298696321e34444ac3d3b4a965c449bba
diff --git a/src/core.cc b/src/core.cc
index d756297..7f4e6da 100644
--- a/src/core.cc
+++ b/src/core.cc
@@ -38,6 +38,10 @@
 #include <bal_api_end.h>
 }
 
+#define NUM_OF_PON_PORTS 16
+const std::string technology = "xgspon";
+const std::string firmware_version = "BAL.2.6.0.1__Openolt.2018.09.05";
+
 State state;
 
 static Status SchedAdd_(int intf_id, int onu_id, int agg_port_id, int sched_id, int pir);
@@ -51,6 +55,25 @@
     return 1023 + intf_id * 112 + onu_id;
 }
 
+
+Status GetDeviceInfo_(openolt::DeviceInfo* device_info) {
+
+    device_info->set_vendor("EdgeCore");
+    device_info->set_model("asfvolt16");
+    device_info->set_hardware_version("");
+    device_info->set_firmware_version(firmware_version);
+    device_info->set_technology(technology);
+    device_info->set_onu_id_start(1);
+    device_info->set_onu_id_end(XGPON_NUM_OF_ONUS - 1);
+    device_info->set_alloc_id_start(1024);
+    device_info->set_alloc_id_end(XGPON_NUM_OF_ALLOC_IDS * NUM_OF_PON_PORTS - 1);
+    device_info->set_gemport_id_start(RSC_MGR_XGPON_MIN_BASE_SERVICE_PORT_ID);
+    device_info->set_gemport_id_end(XGPON_NUM_OF_GEM_PORT_IDS_PER_PON * NUM_OF_PON_PORTS - 1);
+    device_info->set_pon_ports(NUM_OF_PON_PORTS);
+
+    return Status::OK;
+}
+
 Status Enable_(int argc, char *argv[]) {
     bcmbal_access_terminal_cfg acc_term_obj;
     bcmbal_access_terminal_key key = { };