use of org.omecproject.up4.Up4EventSubject in project up4 by omec-project.
the class DefaultDbufClient method handleNotification.
void handleNotification(Dbuf.Notification notification) {
switch(notification.getMessageTypeCase()) {
case READY:
// TODO: Store dataplane IPv4 and UDP addr
log.info("Dbuf service at {} is READY={} [{}]", serviceAddr, isReady(), TextFormat.shortDebugString(notification.getReady()));
break;
case FIRST_BUFFER:
var ueAddress = Ip4Address.valueOf(notification.getFirstBuffer().getNewBufferId());
log.info("Received FIRST_BUFFER: ueAddress={} [{}]", ueAddress, TextFormat.shortDebugString(notification.getFirstBuffer()));
up4Manager.postEvent(new Up4Event(Up4Event.Type.DOWNLINK_DATA_NOTIFICATION, new Up4EventSubject(ueAddress)));
break;
case DROPPED_PACKET:
// Not sure what to do with this. Drop stats should already be reported to Aether
// monitoring.
log.info("Received DROPPED_PACKET: {}", TextFormat.shortDebugString(notification.getDroppedPacket()));
break;
case MESSAGETYPE_NOT_SET:
break;
default:
log.warn("Notification type unhandled: {}", notification.getMessageTypeCase());
}
}
Aggregations