Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 1 | /* |
Nicolas Palpacuer | b78def4 | 2018-06-07 12:55:26 -0400 | [diff] [blame] | 2 | Copyright (C) 2018 Open Networking Foundation |
Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 3 | |
| 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation, either version 3 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef OPENOLT_CORE_H_ |
| 19 | #define OPENOLT_CORE_H_ |
| 20 | |
| 21 | #include <grpc++/grpc++.h> |
| 22 | using grpc::Status; |
| 23 | #include <openolt.grpc.pb.h> |
| 24 | |
| 25 | Status Enable_(); |
| 26 | Status ActivateOnu_(uint32_t intf_id, uint32_t onu_id, |
| 27 | const char *vendor_id, const char *vendor_specific); |
Jonathan Davis | 70c2181 | 2018-07-19 15:32:10 -0400 | [diff] [blame^] | 28 | Status DeactivateOnu_(uint32_t intf_id, uint32_t onu_id, |
| 29 | const char *vendor_id, const char *vendor_specific); |
| 30 | Status DeleteOnu_(uint32_t intf_id, uint32_t onu_id, |
| 31 | const char *vendor_id, const char *vendor_specific); |
Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 32 | Status EnablePonIf_(uint32_t intf_id); |
Nicolas Palpacuer | 05ea0ea | 2018-07-06 11:47:21 -0400 | [diff] [blame] | 33 | Status DisablePonIf_(uint32_t intf_id); |
Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 34 | Status OmciMsgOut_(uint32_t intf_id, uint32_t onu_id, const std::string pkt); |
| 35 | Status OnuPacketOut_(uint32_t intf_id, uint32_t onu_id, const std::string pkt); |
Nicolas Palpacuer | b78def4 | 2018-06-07 12:55:26 -0400 | [diff] [blame] | 36 | Status UplinkPacketOut_(uint32_t intf_id, const std::string pkt); |
Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 37 | Status FlowAdd_(uint32_t onu_id, |
| 38 | uint32_t flow_id, const std::string flow_type, |
| 39 | uint32_t access_intf_id, uint32_t network_intf_id, |
Nicolas Palpacuer | d6cf5aa | 2018-07-16 15:14:39 -0400 | [diff] [blame] | 40 | uint32_t gemport_id, uint32_t priority, |
Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 41 | const ::openolt::Classifier& classifier, |
| 42 | const ::openolt::Action& action); |
| 43 | |
| 44 | static Status SchedAdd_(int intf_id, int onu_id, int agg_port_id); |
Jonathan Davis | 70c2181 | 2018-07-19 15:32:10 -0400 | [diff] [blame^] | 45 | static Status SchedRemove_(int intf_id, int onu_id, int agg_port_id); |
Shad Ansari | b7b0ced | 2018-05-11 21:53:32 +0000 | [diff] [blame] | 46 | |
| 47 | static inline int mk_sched_id(int onu_id) { |
| 48 | return 1023 + onu_id; |
| 49 | } |
| 50 | |
| 51 | static inline int mk_agg_port_id(int onu_id) { |
| 52 | return 1023 + onu_id; |
| 53 | } |
| 54 | |
| 55 | #endif |