Add E2SM-CCC implementation#7
Conversation
aferaudo
left a comment
There was a problem hiding this comment.
There some things to be fixed. I will do it.
| """ | ||
| E2SM-CCC REPORT decorator for the xDevSM-dApp framework. | ||
|
|
||
| Implements the periodic REPORT Style 2 (cell-level) flow: | ||
| - subscribe(): builds Event Trigger Definition Format 3 + Action | ||
| Definition Format 2 as JSON and ships them via the OSC subscription | ||
| manager. | ||
| - decode_message(): parses the JSON indication header/message bytes | ||
| received from the FlexRIC ccc_sm plugin and dispatches them to the | ||
| user-registered callback. | ||
| """ |
There was a problem hiding this comment.
I think we need to delete some comments here. I'll do it
| from sm_framework.py_oran.ccc.constants import ( | ||
| SM_CCC_ID, | ||
| STRUCT_O_NRCELLDU, | ||
| REPORT_TYPE_ALL, | ||
| REPORT_STYLE_CELL_LEVEL, | ||
| ) | ||
| from sm_framework.py_oran.ccc.ccc_encoder import ( | ||
| encode_event_trigger_periodic, | ||
| encode_action_definition_cell_level, | ||
| ) | ||
| from sm_framework.py_oran.ccc.ccc_decoder import ( | ||
| CccIndicationHeader, | ||
| CccIndicationMessage, | ||
| ) | ||
|
|
There was a problem hiding this comment.
maybe we can leave the same notation as above
|
|
||
| def subscribe( | ||
| self, | ||
| gnb, |
There was a problem hiding this comment.
@Noemi2001 can you tell me what passes the xapp here? Is it the json object or the inventory name? In case I change it to a JSON object (just to use the same notation as kpm).
There was a problem hiding this comment.
The xApp invokes the subscribe method as follows:
gnb, gnb_info = xapp_gen.get_selected_e2node_info(args.gnb_target)
....
ccc_xapp.subscribe(
gnb=gnb,
period_ms=args.event_trigger,
attributes=all_o_nr_cell_du_attrs,
)So, the arguments passed by the xapp are:
gnb: the gNB object retrieved viaxapp_gen.get_selected_e2node_info(args.gnb_target)period_ms: the reporting period (ms) taken from the--event-triggerCLI argument.attributes: the listall_o_nr_cell_du_attrs, containing the O-RANO-NRCellDUattributes to be monitored.
| def subscribe_arfcn_bw_bwps(self, gnb, period_ms: int = 1000): | ||
| """One-call helper for the three target metrics of this iteration.""" | ||
| return self.subscribe( | ||
| gnb=gnb, | ||
| period_ms=period_ms, | ||
| ran_cfg_structure_name=STRUCT_O_NRCELLDU, | ||
| attributes=["arfcnDL", "bSChannelBwDL", "bWPList"], | ||
| ) |
There was a problem hiding this comment.
@Noemi2001 how is this used in the xApp? So I can add a better description :)
There was a problem hiding this comment.
It's a wrapper around subscribe() that hardcodes the three "minimal" attributes, but currently my xApp does not use it anymore (it directly calls subscribe(...) with all 20 O-NRCellDU attributes)
| """ | ||
| Pure-Python JSON decoders for the E2SM-CCC IEs received from the RIC. | ||
|
|
||
| The FlexRIC ccc_sm plugin forwards the on-wire JSON bytes verbatim into | ||
| the indication header / message OCTET STRINGs, so on the dApp side we | ||
| just need `json.loads`. Two thin wrappers expose the decoded dicts and | ||
| a few helpers to drill into Indication Message Format 2 (cell-level). | ||
| """ |
There was a problem hiding this comment.
this comment should be deleted
| """ | ||
| Pure-Python JSON encoders for the E2SM-CCC IEs that ride inside the | ||
| E2AP OCTET STRINGs. The dApp builds Python dicts that mirror the JSON | ||
| Schema in O-RAN.WG3.TS.E2SM-CCC §9.4.2 and ships them to the SM as bytes. | ||
| """ |
No description provided.