Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cells command in ransim seems not working properly #255

Open
dozen12 opened this issue Nov 14, 2021 · 1 comment
Open

Get cells command in ransim seems not working properly #255

dozen12 opened this issue Nov 14, 2021 · 1 comment

Comments

@dozen12
Copy link

dozen12 commented Nov 14, 2021

func runGetCellsCommand(cmd *cobra.Command, args []string) error {
if noHeaders, _ := cmd.Flags().GetBool("no-headers"); !noHeaders {
cli.Output("%-17s %7s %7s %7s %9s %9s %7s %7s %10s %7s %7s %10s %10s %8s %8s %4s %4s %s\n",
"NCGI", "#UEs", "Max UEs", "TxDB", "Lat", "Lng", "Azimuth", "Arc",
"A3Offset", "TTT", "A3Hyst", "PCellOffset", "FreqOffset", "PCI", "Color", "Idle", "Conn", "Neighbors(NCellOffset)")
}
client, conn, err := getCellClient(cmd)
if err != nil {
return err
}
defer conn.Close()
if watch, _ := cmd.Flags().GetBool("watch"); watch {
stream, err := client.WatchCells(context.Background(), &modelapi.WatchCellsRequest{NoReplay: false})
if err != nil {
return err
}
for {
r, err := stream.Recv()
if err != nil {
break
}
cell := r.Cell
cli.Output("%-17x %7d %7d %7.2f %9.3f %9.3f %7d %7d %10d %7d %7d %10d %10d %8d %8s %4d %4d %s\n",
cell.NCGI, len(cell.CrntiMap), cell.MaxUEs, cell.TxPowerdB,
cell.Location.Lat, cell.Location.Lng, cell.Sector.Azimuth, cell.Sector.Arc,
cell.MeasurementParams.EventA3Params.A3Offset, cell.MeasurementParams.TimeToTrigger, cell.MeasurementParams.Hysteresis,
cell.MeasurementParams.EventA3Params.A3Offset, cell.MeasurementParams.FrequencyOffset, cell.Pci, cell.Color,
cell.RrcIdleCount, cell.RrcConnectedCount, catNCGIsWithOcn(cell.Neighbors, cell.MeasurementParams.NcellIndividualOffsets))
}
} else {
stream, err := client.ListCells(context.Background(), &modelapi.ListCellsRequest{})
if err != nil {
return err
}
for {
r, err := stream.Recv()
if err != nil {
break
}
cell := r.Cell
cli.Output("%-17x %7d %7d %7.2f %9.3f %9.3f %7d %7d %10d %7d %7d %10d %10d %8d %8s %4d, %4d, %s\n",
cell.NCGI, len(cell.CrntiMap), cell.MaxUEs, cell.TxPowerdB,
cell.Location.Lat, cell.Location.Lng, cell.Sector.Azimuth, cell.Sector.Arc,
cell.MeasurementParams.EventA3Params.A3Offset, cell.MeasurementParams.TimeToTrigger, cell.MeasurementParams.Hysteresis,
cell.MeasurementParams.EventA3Params.A3Offset, cell.MeasurementParams.FrequencyOffset, cell.Pci, cell.Color,
cell.RrcIdleCount, cell.RrcConnectedCount, catNCGIsWithOcn(cell.Neighbors, cell.MeasurementParams.NcellIndividualOffsets))
}
}
return nil
}

It seems that get cells command print A3Offset (EventA3Params) instead of PCellIndividualOffset.
A3Offset is printed twice and I think L145 and L166 should be fixed.

@woojoong88
Copy link
Contributor

Thanks for the report. Will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants