VOL-2014: Rebase bal30-dev branch with master and re-verify sanity with SEBA2.0 and VOLTHA2.x before merge to master
          Squashed all commits from bal30-dev branch to master branch as a single commit.
          Bumped version to 2.0.0-dev .
          Update README.md with the required ONL version for BAL3.1 .

VOL-2130: Wrong queue id assigned for downstream queue on tm_sched
          for the subscriber when using single gem port.
          Use queue_id as 0 when using single gem port.

          Issues need to be taken care:
          VOL-1580: Support reporting ONU Registration ID as part of ONU Activation Indication
          - commented the code developed for VOL-1580 to fetch ONU registration ID as it uses BAL2.6 specific API's.
          - Need to check how the same can be achieved using BAL3.x API's to fetch ONU registration ID

Set .gitreview defaultbranch to bal30-dev
Rebase change - Removed .gitreview defaultbranch so that by default it will point to master

Change-Id: Ib57e52e98cf09f4fa3dbaa9156a4375b7dc6ee43

Rebase: [VOL-1635] [BAL3.0 Bridade] OLT Activation [VOL-1636] [BAL3.0 Bridade] ONU Discovery,
        This OpenOLT agent supports the BAL V3.0.3.3 SDK. OLT/ONU activation from voltha-1.7 is successful

Change-Id: I860b31317172139cd4c4244a93e79e0c3ce4fdf8

Rebase: [VOL-1685][BAL3.0 Bridade] generate OpenOLT debian package file

Change-Id: Ib0332d948602bf7892b6aae91a4147356237f7e2

Rebase: [VOL-1685][BAL3.0 Brigade] generate OpenOLT debian package file
missing copy shell files (dev_mgmt_daemon and openolt).

Change-Id: Id29dc24be4d1d5fc12a26884e5b5a69de91fbd69

Rebase: [VOL-1685][BAL3.0 Brigade] generate OpenOLT debian package file

Change-Id: Ic5453616c0dbdbc1fb1eb241feba1cbfca5e8e85

Rebase: [VOL-1852][BAL3.0 Brigade] Support Edge-core OLT ASFvOLT16 (XGS-PON) and
ASGvOLT64 (GPON) devices

Change-Id: I316d35bc76c38b5381e8896148b4ee5cebbd1099

VOL-1850: Fix packet duplication with TM Queue Mapping profile
          Fix for US and DS scheduler ID allocation irrespective of device type(asfvolt16/asfvolt64)
          README.md file update with BAL3.1.1.1 specifications

Change-Id: I255bf7a4ff35771e9c628bb822ba2190a1fcd5ed

Rebase: [VOL-1787] : This commit sets up a unit-test framework for openolt
                     agent based on gtest, gmock and c-mock utilities.
                     A sample unit-test case to test EnableOlt success case is also
                     added. More test cases will be added in future commit.

Change-Id: If020be489a04d97df5fcbc15e9207deeee2fcfac

Rebase: [VOL-2040]: Patch the macro required by core.cc into bcmos_system.h file

Change-Id: Ic841785b2ce451b1acaf007074b8c458687bc753

Rebase: [VOL-2043] : OLT Enable Test Case

        - Added more test cases for OLT Enable. Now covers all scenarios.
        - Fixed typos in unit test README.md

Change-Id: Ib931d89cedee78fe40ca67761a028365a047ebc3

Rebase: VOL-1941: Use protobufs from the voltha-protos repo, not a copy

        - Use protobufs from the voltha-protos repo, not a copy
        - Provided option to specify the openolt proto version via make option
        - Removed duplicate README.md

Change-Id: Id67714c8119521f8358aaa9245268c47b7e843cf
diff --git a/agent/common/core.h b/agent/common/core.h
index 7f8bfe4..1caf3cc 100644
--- a/agent/common/core.h
+++ b/agent/common/core.h
@@ -20,16 +20,61 @@
 
 #include <grpc++/grpc++.h>
 using grpc::Status;
-#include <openolt.grpc.pb.h>
+#include <voltha_protos/openolt.grpc.pb.h>
 
 #include "state.h"
 
+#define NONE "\033[m"
+#define LIGHT_RED "\033[1;31m"
+#define BROWN "\033[0;33m"
+#define LIGHT_GREEN "\033[1;32m"
+#define OPENOLT_LOG(level, id, fmt, ...)  \
+    if (DEV_LOG_LEVEL_##level == DEV_LOG_LEVEL_ERROR) \
+        BCM_LOG(level, id, "%s" fmt "%s", LIGHT_RED, ##__VA_ARGS__, NONE); \
+    else if (DEV_LOG_LEVEL_##level == DEV_LOG_LEVEL_INFO) \
+        BCM_LOG(level, id, "%s" fmt "%s", NONE, ##__VA_ARGS__, NONE); \
+    else if (DEV_LOG_LEVEL_##level == DEV_LOG_LEVEL_WARNING) \
+        BCM_LOG(level, id, "%s" fmt "%s", BROWN, ##__VA_ARGS__, NONE); \
+    else if (DEV_LOG_LEVEL_##level == DEV_LOG_LEVEL_DEBUG) \
+        BCM_LOG(level, id, "%s" fmt "%s", LIGHT_GREEN, ##__VA_ARGS__, NONE); \
+    else \
+        BCM_LOG(INFO, id, fmt, ##__VA_ARGS__);
 #define COLLECTION_PERIOD 15
 #define BAL_DYNAMIC_LIST_BUFFER_SIZE (32 * 1024)
 #define MAX_REGID_LENGTH  36
 
 extern State state;
 
+enum FLOW_CFG {
+    ONU_ID = 0,
+    FLOW_TYPE = 1,
+    SVC_PORT_ID = 2,
+    PRIORITY = 3,
+    COOKIE = 4,
+    INGRESS_INTF_TYPE= 5,
+    EGRESS_INTF_TYPE= 6,
+    INGRESS_INTF_ID = 7,
+    EGRESS_INTF_ID = 8,
+    CLASSIFIER_O_VID = 9,
+    CLASSIFIER_O_PBITS = 10,
+    CLASSIFIER_I_VID = 11,
+    CLASSIFIER_I_PBITS = 12,
+    CLASSIFIER_ETHER_TYPE = 13,
+    CLASSIFIER_IP_PROTO =14,
+    CLASSIFIER_SRC_PORT = 15,
+    CLASSIFIER_DST_PORT = 16,
+    CLASSIFIER_PKT_TAG_TYPE = 17,
+    EGRESS_QOS_TYPE = 18,
+    EGRESS_QOS_QUEUE_ID = 19,
+    EGRESS_QOS_TM_SCHED_ID = 20,
+    ACTION_CMDS_BITMASK = 21,
+    ACTION_O_VID = 22,
+    ACTION_O_PBITS = 23,
+    ACTION_I_VID = 24,
+    ACTION_I_PBITS = 25,
+    STATE = 26
+};
+
 Status Enable_(int argc, char *argv[]);
 Status ActivateOnu_(uint32_t intf_id, uint32_t onu_id,
     const char *vendor_id, const char *vendor_specific, uint32_t pir);
@@ -39,8 +84,7 @@
     const char *vendor_id, const char *vendor_specific);
 Status EnablePonIf_(uint32_t intf_id);
 Status DisablePonIf_(uint32_t intf_id);
-Status EnableUplinkIf_(uint32_t intf_id);
-Status DisableUplinkIf_(uint32_t intf_id);
+Status SetStateUplinkIf_(uint32_t intf_id, bool set_state);
 unsigned NumNniIf_();
 unsigned NumPonIf_();
 Status OmciMsgOut_(uint32_t intf_id, uint32_t onu_id, const std::string pkt);
@@ -62,6 +106,10 @@
 Status CreateTrafficQueues_(const tech_profile::TrafficQueues *traffic_queues);
 Status RemoveTrafficQueues_(const tech_profile::TrafficQueues *traffic_queues);
 uint32_t GetPortNum_(uint32_t flow_id);
+int get_status_bcm_cli_quit(void);
+uint16_t get_dev_id(void); 
+Status pushOltOperInd(uint32_t intf_id, const char *type, const char *state);
+uint64_t get_flow_status(uint16_t flow_id, uint16_t flow_type, uint16_t data_id);
 
 void stats_collection();
 #endif